This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc 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]

GNU C Library master sources branch master updated. glibc-2.26-386-gb38a42a


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  b38a42a098664a96842a23ef480d4b8c69ecd05c (commit)
      from  5e6f32531eab502afb094ad62aad333c63a58cfd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b38a42a098664a96842a23ef480d4b8c69ecd05c

commit b38a42a098664a96842a23ef480d4b8c69ecd05c
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sun Sep 24 22:20:10 2017 +0200

    hurd: Fix bits/socket.h conformity
    
    	* sysdeps/mach/hurd/bits/socket.h: Include <bits/wordsize.h> instead
    	of <limits.h>
    	(__need_NULL): Do not define.
    	(__ss_aligntype): Use __WORDSIZE instead of ULONG_MAX to determine
    	alignment.
    	[!__USE_MISC] (pseudo_AF_XTP, pseudo_AF_RTIP, pseudo_AF_PIP,
    	CMGROUP_MAX, cmsgcred): Do not define.
    	(CMSG_FIRSTHDR, __cmsg_nxthdr): Use (struct cmsghdr *) 0 instead of
    	NULL.
    	* bits/socket.h: Likewise.

diff --git a/ChangeLog b/ChangeLog
index 7336c52..1c44a53 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,16 @@
 	__mmap, __fxstat64, __xstat64, __access, __access_noerrno, __getpid,
 	__getcwd, __sbrk, __strtoul_internal, _exit, abort): Use check_no_hidden
 	to make sure that these symbols are defined.
+	* sysdeps/mach/hurd/bits/socket.h: Include <bits/wordsize.h> instead
+	of <limits.h>
+	(__need_NULL): Do not define.
+	(__ss_aligntype): Use __WORDSIZE instead of ULONG_MAX to determine
+	alignment.
+	[!__USE_MISC] (pseudo_AF_XTP, pseudo_AF_RTIP, pseudo_AF_PIP,
+	CMGROUP_MAX, cmsgcred): Do not define.
+	(CMSG_FIRSTHDR, __cmsg_nxthdr): Use (struct cmsghdr *) 0 instead of
+	NULL.
+	* bits/socket.h: Likewise.
 
 2017-09-22  Joseph Myers  <joseph@codesourcery.com>
 
diff --git a/bits/socket.h b/bits/socket.h
index b527f9c..d70fb6d 100644
--- a/bits/socket.h
+++ b/bits/socket.h
@@ -24,10 +24,9 @@
 #endif
 
 #define	__need_size_t
-#define __need_NULL
 #include <stddef.h>
 
-#include <limits.h>		/* XXX Is this allowed?  */
+#include <bits/wordsize.h>
 #include <bits/types.h>
 
 /* Type for length arguments in socket calls.  */
@@ -127,13 +126,19 @@ enum __socket_type
 #define	AF_APPLETALK	PF_APPLETALK
 #define	AF_ROUTE	PF_ROUTE
 #define	AF_LINK		PF_LINK
-#define	pseudo_AF_XTP	PF_XTP
+#ifdef __USE_MISC
+# define	pseudo_AF_XTP	PF_XTP
+#endif
 #define	AF_COIP		PF_COIP
 #define	AF_CNT		PF_CNT
-#define pseudo_AF_RTIP	PF_RTIP
+#ifdef __USE_MISC
+# define pseudo_AF_RTIP	PF_RTIP
+#endif
 #define	AF_IPX		PF_IPX
 #define	AF_SIP		PF_SIP
-#define pseudo_AF_PIP	PF_PIP
+#ifdef __USE_MISC
+# define pseudo_AF_PIP	PF_PIP
+#endif
 #define AF_INET6	PF_INET6
 #define	AF_MAX		PF_MAX
 
@@ -153,7 +158,7 @@ struct sockaddr
 
 /* Structure large enough to hold any socket address (with the historical
    exception of AF_UNIX).  */
-#if ULONG_MAX > 0xffffffff
+#if __WORDSIZE == 64
 # define __ss_aligntype	__uint64_t
 #else
 # define __ss_aligntype	__uint32_t
@@ -232,7 +237,7 @@ struct cmsghdr
 
 #define CMSG_FIRSTHDR(mhdr) \
   ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr)		      \
-   ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
+   ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
 
 #define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
 			   & (size_t) ~(sizeof (size_t) - 1))
@@ -251,7 +256,7 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
 {
   if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
     /* The kernel header does this so there may be a reason.  */
-    return NULL;
+    return (struct cmsghdr *) 0;
 
   __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
 			       + CMSG_ALIGN (__cmsg->cmsg_len));
@@ -260,7 +265,7 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
       || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
 	  > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
     /* No more entries.  */
-    return NULL;
+    return (struct cmsghdr *) 0;
   return __cmsg;
 }
 #endif	/* Use `extern inline'.  */
@@ -276,6 +281,7 @@ enum
 #define SCM_CREDS SCM_CREDS
   };
 
+#ifdef __USE_MISC
 /* Unfortunately, BSD practice dictates this structure be of fixed size.
    If there are more than CMGROUP_MAX groups, the list is truncated.
    (On GNU systems, the `cmcred_euid' field is just the first in the
@@ -296,6 +302,7 @@ struct cmsgcred
     int cmcred_ngroups;
     __gid_t cmcred_groups[CMGROUP_MAX];
   };
+#endif
 
 /* Protocol number used to manipulate socket-level options
    with `getsockopt' and `setsockopt'.  */
diff --git a/sysdeps/mach/hurd/bits/socket.h b/sysdeps/mach/hurd/bits/socket.h
index 9a412f0..bac77f5 100644
--- a/sysdeps/mach/hurd/bits/socket.h
+++ b/sysdeps/mach/hurd/bits/socket.h
@@ -25,10 +25,9 @@
 #endif
 
 #define	__need_size_t
-#define __need_NULL
 #include <stddef.h>
 
-#include <limits.h>		/* XXX Is this allowed?  */
+#include <bits/wordsize.h>
 #include <sys/types.h>
 
 /* Type for length arguments in socket calls.  */
@@ -131,13 +130,19 @@ enum __socket_type
 #define	AF_APPLETALK	PF_APPLETALK
 #define	AF_ROUTE	PF_ROUTE
 #define	AF_LINK		PF_LINK
-#define	pseudo_AF_XTP	PF_XTP
+#ifdef __USE_MISC
+# define	pseudo_AF_XTP	PF_XTP
+#endif
 #define	AF_COIP		PF_COIP
 #define	AF_CNT		PF_CNT
-#define pseudo_AF_RTIP	PF_RTIP
+#ifdef __USE_MISC
+# define pseudo_AF_RTIP	PF_RTIP
+#endif
 #define	AF_IPX		PF_IPX
 #define	AF_SIP		PF_SIP
-#define pseudo_AF_PIP	PF_PIP
+#ifdef __USE_MISC
+# define pseudo_AF_PIP	PF_PIP
+#endif
 #define AF_INET6	PF_INET6
 #define	AF_MAX		PF_MAX
 
@@ -157,7 +162,7 @@ struct sockaddr
 
 /* Structure large enough to hold any socket address (with the historical
    exception of AF_UNIX).  */
-#if ULONG_MAX > 0xffffffff
+#if __WORDSIZE == 64
 # define __ss_aligntype	__uint64_t
 #else
 # define __ss_aligntype	__uint32_t
@@ -236,7 +241,7 @@ struct cmsghdr
 
 #define CMSG_FIRSTHDR(mhdr) \
   ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr)		      \
-   ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
+   ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
 
 #define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
 			   & (size_t) ~(sizeof (size_t) - 1))
@@ -255,7 +260,7 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
 {
   if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
     /* The kernel header does this so there may be a reason.  */
-    return NULL;
+    return (struct cmsghdr *) 0;
 
   __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
 			       + CMSG_ALIGN (__cmsg->cmsg_len));
@@ -264,7 +269,7 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
       || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
 	  > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
     /* No more entries.  */
-    return NULL;
+    return (struct cmsghdr *) 0;
   return __cmsg;
 }
 #endif	/* Use `extern inline'.  */
@@ -280,6 +285,7 @@ enum
 #define SCM_CREDS SCM_CREDS
   };
 
+#ifdef __USE_MISC
 /* Unfortunately, BSD practice dictates this structure be of fixed size.
    If there are more than CMGROUP_MAX groups, the list is truncated.
    (On GNU systems, the `cmcred_euid' field is just the first in the
@@ -300,6 +306,7 @@ struct cmsgcred
     int cmcred_ngroups;
     __gid_t cmcred_groups[CMGROUP_MAX];
   };
+#endif
 
 /* Protocol number used to manipulate socket-level options
    with `getsockopt' and `setsockopt'.  */

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                       |   10 ++++++++++
 bits/socket.h                   |   25 ++++++++++++++++---------
 sysdeps/mach/hurd/bits/socket.h |   25 ++++++++++++++++---------
 3 files changed, 42 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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