[PATCH] Fix "/*" within comment warning
Corinna Vinschen
vinschen@redhat.com
Tue Mar 22 09:49:00 GMT 2016
On Mar 21 16:27, Corinna Vinschen wrote:
> On Mar 21 16:19, Corinna Vinschen wrote:
> > On Mar 21 10:09, Yaakov Selkowitz wrote:
> > > On 2016-03-21 09:50, Corinna Vinschen wrote:
> > > >On Mar 21 09:11, Yaakov Selkowitz wrote:
> > > >>On 2016-03-21 06:44, Corinna Vinschen wrote:
> > > >>>>+/* These types are required by netinet/ *.h on Cygwin */
> > > >>>> #if __BSD_VISIBLE || defined(__CYGWIN__)
> > > >>>> #ifndef _BSDTYPES_DEFINED
> > > >>>> /* also defined in mingw/gmon.h and in w32api/winsock[2].h */
> > > >>>
> > > >>>Apart from the comment patch, do we really need "|| defined(__CYGWIN__)"
> > > >>>here?
> > > >>
> > > >>The comment explains the very reason why those types are always needed.
> > > >
> > > >The comment doesn't really explain it. Why is it needed for Cygwin
> > > >if it's not needed for glibc?
> > >
> > > Because our netinet headers are from BSD and use BSD types.
> >
> > Glibc's headers do as well.
>
> I mean, that was the whole point of asking this question. If you read
> https://sourceware.org/ml/newlib/2016/msg00282.html 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.
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
#endif
-/* These types are required by netinet/*.h on Cygwin */
-#if __BSD_VISIBLE || defined(__CYGWIN__)
+#if __MISC_VISIBLE
#ifndef _BSDTYPES_DEFINED
/* also defined in mingw/gmon.h and in w32api/winsock[2].h */
#ifndef __u_char_defined
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20160322/13455eed/attachment.sig>
More information about the Newlib
mailing list