X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <49CB0C1E.2050901@users.sourceforge.net> Date: Thu, 26 Mar 2009 00:01:18 -0500 From: "Yaakov (Cygwin/X)" User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) 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> <49CAF18F DOT 5000506 AT gmail DOT com> <49CAF394 DOT 3080705 AT gmail DOT com> In-Reply-To: <49CAF394.3080705@gmail.com> Content-Type: multipart/mixed; boundary="------------050200000400090900060608" 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 --------------050200000400090900060608 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Dave Korn wrote: > Dave Korn wrote: >> See also http://gcc.gnu.org/ml/gcc/2007-03/threads.html#01088 for background >> and a solution. You mean like this (attached)? > Oh, but see also: > > http://sourceware.org/ml/newlib/2007/msg00326.html > > for an important bugfix to that solution. Is that relevant here, given that __ntoh{l,s} is only used if !defined __NO_INLINE__ ? Yaakov -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAknLDB4ACgkQpiWmPGlmQSMJQACeLt39LvmBQtrPIZDdlR4CNYrB yS4An3XKWnZPwSBxWf8WWhaih/fAoIau =OcWE -----END PGP SIGNATURE----- --------------050200000400090900060608 Content-Type: text/x-patch; name="cygwin-c99-inline.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cygwin-c99-inline.patch" Index: include/asm/byteorder.h =================================================================== RCS file: /cvs/src/src/winsup/cygwin/include/asm/byteorder.h,v retrieving revision 1.10 diff -u -r1.10 byteorder.h --- include/asm/byteorder.h 23 Mar 2009 14:26:55 -0000 1.10 +++ include/asm/byteorder.h 26 Mar 2009 04:58:56 -0000 @@ -30,10 +30,10 @@ extern uint32_t htonl(uint32_t); extern uint16_t htons(uint16_t); -extern __inline__ uint32_t __ntohl(uint32_t); -extern __inline__ uint16_t __ntohs(uint16_t); - -extern __inline__ uint32_t +#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__) +extern +#endif +__inline__ uint32_t __ntohl(uint32_t x) { __asm__("xchgb %b0,%h0\n\t" /* swap lower bytes */ @@ -50,7 +50,10 @@ (((uint32_t)(x) & 0x00ff0000U) >> 8) | \ (((uint32_t)(x) & 0xff000000U) >> 24))) -extern __inline__ uint16_t +#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__) +extern +#endif +__inline__ uint16_t __ntohs(uint16_t x) { __asm__("xchgb %b0,%h0" /* swap bytes */ --------------050200000400090900060608 Content-Type: text/plain; charset=us-ascii -- 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/ --------------050200000400090900060608--