-----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-----
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 */
-- 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/