[PATCH] <asm/byteorder.h> missing prototypes warning

Dave Korn dave.korn.cygwin@googlemail.com
Fri Apr 3 07:05:00 GMT 2009

Yaakov (Cygwin/X) wrote:

> This is similar in concept to the <stdio.h> patch I just posted to
> newlib@.  It looks like I mistakenly removed the prototypes when I was
> trying to fix the C99 inline issue in <asm/byteorder.h>.
> Since this makes four lines which need the C99 inline workaround, I
> decided to make a macro similar to that in <stdio.h>.  I didn't use the
> same macro name, since I didn't want to deal with a possible collision
> with, or dependency on, <stdio.h>.  Perhaps there is a better way of
> dealing with this; I'm certainly open to ideas.

  I'll suggest upstream that since this macro trick is going to spread
increasingly to more and more header files, maybe we should actually provide a
predefined preprocessor macro for it.  If it's acceptable, I'll backport
support to the cygwin distro version.

  Maybe we can call it __extern__ (so it looks like a c99-compatible extension
keyword and doesn't cause problems for non-GCC compilers) and define it as
"'extern' if !__GNUC_STDC_INLINE__".  That might work well.


More information about the Cygwin-patches mailing list