delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <473C19CE.1A5F7200@dessent.net> |
Date: | Thu, 15 Nov 2007 02:05:02 -0800 |
From: | Brian Dessent <brian AT dessent DOT net> |
X-Mailer: | Mozilla 4.79 [en] (Windows NT 5.0; U) |
MIME-Version: | 1.0 |
To: | Sean Seefried <sean DOT seefried AT nicta DOT com DOT au> |
CC: | cygwin AT cygwin DOT com |
Subject: | Re: Request for information on the __INSIDE_CYGWIN__ #define |
References: | <00048651-54EE-44D7-8D44-5D34AE3F8ED2 AT nicta DOT com DOT au> |
X-IsSubscribed: | yes |
Reply-To: | cygwin AT cygwin DOT com |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Sean Seefried wrote: > The expression "__declspec(dllimport)" is a Microsoft extension and > this is included precisely when __INSIDE_CYGWIN__ is *not* defined. > Since I assume Cygwin is built using Visual C++ and > __declspec(dllimport) is only accepted by this compiler I assume you > have to have it undefined when compiling. Or is there something > fundamental I'm missing here? dllimport and dllexport are fully supported by gcc, they are not specific to VC++. It would be impossible for gcc to be a functioning windows compiler if it did not support them. And Cygwin is most certainly not built with any MS tools. The reason for the #ifdef is that these headers are included inside Cygwin itself. In other words, you can't dllimport a symbol that's in the same module, you can only dllimport from other external modules. > If I'm right (and I know I'm probably wrong) then __INSIDE_CYGWIN__ > would have to be defined when compiling things with gcc. Where is it > defined though? It's only defined when compiling Cygwin itself (in winsup.h), *not* when generally using gcc. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |