X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <49CAF18F.5000506@gmail.com> Date: Thu, 26 Mar 2009 03:07:59 +0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: gcc4: extern inline vs. c99 References: <49CAC59C DOT 4080306 AT users DOT sourceforge DOT net> In-Reply-To: <49CAC59C.4080306@users.sourceforge.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 Yaakov (Cygwin/X) wrote: > gcc-4 -std=c99 appears to be treating extern inline functions as if they > were marked dllexport, leading to all sorts of linking problems. STC: Hi Yaakov, This is nothing to do with dllexport, as it happens. The semantics of "extern inline" have changed in recent GCC to align with the C99 standard. The old "extern inline" semantics were a GNU extension, and in relying on it, the netinet.h header is probably being not strictly ANSI compliant. It needs fixing up so that it knows what kind of inline to use according to the language standard in effect. Fortunately GCC provides us with the predefined preprocessor macro '__GNUC_STDC_INLINE__' to let us know when the new behaviour is in effect. See also http://gcc.gnu.org/ml/gcc/2007-03/threads.html#01088 for background and a solution. cheers, DaveK -- 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/