This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]