This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [PATCH] <asm/byteorder.h> missing prototypes warning
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: cygwin-patches at cygwin dot com
- Date: Fri, 03 Apr 2009 08:01:35 +0100
- Subject: Re: [PATCH] <asm/byteorder.h> missing prototypes warning
- References: <49D57E45.4000409@users.sourceforge.net>
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.
cheers,
DaveK