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 X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: Sean Seefried 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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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/