[glibc] 01/01: hurd: Fix sys/socket.h conformity
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch glibc-2.26
in repository glibc.
commit c1d9ab76f710ca739a92fb9368516021e09e33da
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Sun Sep 24 20:45:21 2017 +0000
hurd: Fix sys/socket.h conformity
- patches/hurd-i386/git-socket-limit.diff: New patch.
- testsuite-xfail-debian.mk: Update.
---
debian/changelog | 3 +-
debian/patches/hurd-i386/git-socket-limit.diff | 108 +++++++++++++++++++++++++
debian/patches/series | 1 +
debian/testsuite-xfail-debian.mk | 7 --
4 files changed, 111 insertions(+), 8 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 7084145..db2d59a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -81,7 +81,8 @@ glibc (2.26-0experimental0) UNRELEASED; urgency=medium
- patches/hurd-i386/git-hidden-def.diff: New patch.
- patches/hurd-i386/git-hidden-def.diff-2: New patch.
- patches/hurd-i386/git-dl-sysdep-check.diff: New patch.
- - testsuite-xfail-debian.mk: Update with new tests failing on hurd-i386.
+ - patches/hurd-i386/git-socket-limit.diff: New patch.
+ - testsuite-xfail-debian.mk: Update for hurd-i386.
-- Adam Conrad <adconrad@0c3.net> Sat, 02 Sep 2017 12:15:10 -0600
diff --git a/debian/patches/hurd-i386/git-socket-limit.diff b/debian/patches/hurd-i386/git-socket-limit.diff
new file mode 100644
index 0000000..7e11e8e
--- /dev/null
+++ b/debian/patches/hurd-i386/git-socket-limit.diff
@@ -0,0 +1,108 @@
+commit 3bab02907b2c8d2893480208890ec062063994f9
+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/sysdeps/mach/hurd/bits/socket.h b/sysdeps/mach/hurd/bits/socket.h
+index 9a412f0833..831d7eaccf 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'. */
diff --git a/debian/patches/series b/debian/patches/series
index 3d424a6..e154e32 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -160,6 +160,7 @@ hurd-i386/unsubmitted-exp-hidden-jump.diff
hurd-i386/git-hidden-def.diff
hurd-i386/git-hidden-def-2.diff
hurd-i386/git-dl-sysdep-check.diff
+hurd-i386/git-socket-limit.diff
i386/local-biarch.diff
i386/unsubmitted-quiet-ldconfig.diff
diff --git a/debian/testsuite-xfail-debian.mk b/debian/testsuite-xfail-debian.mk
index 831b426..24edf53 100644
--- a/debian/testsuite-xfail-debian.mk
+++ b/debian/testsuite-xfail-debian.mk
@@ -555,7 +555,6 @@ test-xfail-UNIX98/sys/ipc.h/conform = yes
test-xfail-UNIX98/sys/msg.h/conform = yes
test-xfail-UNIX98/sys/resource.h/conform = yes
test-xfail-UNIX98/sys/shm.h/conform = yes
-test-xfail-UNIX98/sys/socket.h/conform = yes
test-xfail-UNIX98/sys/statvfs.h/conform = yes
test-xfail-UNIX98/sys/un.h/conform = yes
test-xfail-XOPEN2K8/arpa/inet.h/conform = yes
@@ -566,7 +565,6 @@ test-xfail-XOPEN2K8/sys/ipc.h/conform = yes
test-xfail-XOPEN2K8/sys/msg.h/conform = yes
test-xfail-XOPEN2K8/sys/resource.h/conform = yes
test-xfail-XOPEN2K8/sys/shm.h/conform = yes
-test-xfail-XOPEN2K8/sys/socket.h/conform = yes
test-xfail-XOPEN2K8/sys/statvfs.h/conform = yes
test-xfail-XOPEN2K8/sys/un.h/conform = yes
test-xfail-XOPEN2K/arpa/inet.h/conform = yes
@@ -576,7 +574,6 @@ test-xfail-XOPEN2K/sys/ipc.h/conform = yes
test-xfail-XOPEN2K/sys/msg.h/conform = yes
test-xfail-XOPEN2K/sys/resource.h/conform = yes
test-xfail-XOPEN2K/sys/shm.h/conform = yes
-test-xfail-XOPEN2K/sys/socket.h/conform = yes
test-xfail-XOPEN2K/sys/statvfs.h/conform = yes
test-xfail-XOPEN2K/sys/un.h/conform = yes
test-xfail-XPG3/sys/ipc.h/conform = yes
@@ -585,7 +582,6 @@ test-xfail-XPG3/sys/shm.h/conform = yes
test-xfail-XPG4/sys/ipc.h/conform = yes
test-xfail-XPG4/sys/msg.h/conform = yes
test-xfail-XPG4/sys/shm.h/conform = yes
-test-xfail-XPG4/sys/socket.h/conform = yes
test-xfail-POSIX2008/dirent.h/linknamespace = yes
test-xfail-POSIX2008/grp.h/linknamespace = yes
@@ -733,11 +729,9 @@ test-xfail-test-errno = yes
test-xfail-UNIX98/arpa/inet.h/conform = yes
test-xfail-UNIX98/netdb.h/conform = yes
test-xfail-UNIX98/netinet/in.h/conform = yes
-test-xfail-UNIX98/sys/socket.h/conform = yes
test-xfail-POSIX2008/arpa/inet.h/conform = yes
test-xfail-POSIX2008/netdb.h/conform = yes
test-xfail-POSIX2008/netinet/in.h/conform = yes
-test-xfail-POSIX2008/sys/socket.h/conform = yes
test-xfail-XPG42/arpa/inet.h/conform = yes
test-xfail-XPG42/fcntl.h/conform = yes
test-xfail-XPG42/netdb.h/conform = yes
@@ -746,7 +740,6 @@ test-xfail-XPG42/sys/ipc.h/conform = yes
test-xfail-XPG42/sys/msg.h/conform = yes
test-xfail-XPG42/sys/resource.h/conform = yes
test-xfail-XPG42/sys/shm.h/conform = yes
-test-xfail-XPG42/sys/socket.h/conform = yes
test-xfail-XPG42/sys/stat.h/conform = yes
test-xfail-XPG42/sys/statvfs.h/conform = yes
test-xfail-XPG42/sys/un.h/conform = yes
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-glibc/glibc.git
Reply to: