This is the mail archive of the mailing list for the newlib 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] Fix "/*" within comment warning

On 2016-03-22 15:14, Corinna Vinschen wrote:
On Mar 22 11:10, Yaakov Selkowitz wrote:
On 2016-03-22 04:49, Corinna Vinschen wrote:
On Mar 21 16:27, Corinna Vinschen wrote:
I mean, that was the whole point of asking this question.  If you read you see that I
specificially refer to these types, u_char, u_short, etc.  grep for them
on Linux and you'll see more then hundred header files using these
types.  They are guarded with __USE_MISC in sys/types.h and there's no
explicit enabling invocation in any of the files using these types.

Due to the incompatibility in licences between glibc and newlib/cygwin, I
have been avoiding looking at the headers directly.

So my proposal is this:

diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 52530c5..8ab8670 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -90,8 +90,7 @@ typedef	quad_t *	qaddr_t;
  #  define	quad		quad_t

-/* These types are required by netinet/*.h on Cygwin */
-#if __BSD_VISIBLE || defined(__CYGWIN__)
  /* also defined in mingw/gmon.h and in w32api/winsock[2].h */
  #ifndef __u_char_defined

That only works if the parts of our netinet/*.h which use these are
similarly guarded, or their struct members converted to the u_intN_t types
(as in netinet/ip6.h).'

Again, the same headers in Linux use the same types, and these
headers do NOT use similar guards.  They just include sys/types.h
and expect these types to exist.  If that's good enough for glibc...

Not sure I understand; `grep -r __USE_ /usr/include/netinet/' shows lots of __USE_MISC and even a __USE_GNU ...


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