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.23-412-g1c1e7fb


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  1c1e7fb65828c99d6e0f0f3857089b559a0c8189 (commit)
      from  f06f3f05b48c72e2c9b0fa78671f94fd22d67da8 (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=1c1e7fb65828c99d6e0f0f3857089b559a0c8189

commit 1c1e7fb65828c99d6e0f0f3857089b559a0c8189
Author: Carlos O'Donell <carlos@redhat.com>
Date:   Thu Jun 2 23:30:11 2016 -0400

    Fix macro API for __USE_KERNEL_IPV6_DEFS.
    
    The use of __USE_KERNEL_IPV6_DEFS with ifndef is bad
    practice per: https://sourceware.org/glibc/wiki/Wundef.
    This change moves it to use 'if' and always define the
    macro.
    
    Please note that this is not the only problem with this
    code. I have a series of fixes after this one to resolve
    breakage with this code and add regression tests for it
    via compile-only source testing (to be discussed in another
    thread).
    
    Unfortunately __USE_KERNEL_XATTR_DEFS is set by the kernel
    and not glibc, and uses 'define', so we can't fix that yet.

diff --git a/ChangeLog b/ChangeLog
index 7dfe575..4e7fd30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2016-06-02  Carlos O'Donell  <carlos@redhat.com>
+
+	* sysdeps/unix/sysv/linux/bits/in.h [defined _UAPI_LINUX_IN6_H ||
+	defined _UAPI_IPV6_H]: Define __USE_KERNEL_IPV6_DEFS to 1.
+	[!(defined _UAPI_LINUX_IN6_H || defined _UAPI_IPV6_H)]: Define
+	__USE_KERNEL_IPV6_DEFS to 0.
+	* inet/netinet/in.h: Use '#if !__USE_KERNEL_IPV6_DEFS'.
+	Update comment.
+
 2016-06-01  Florian Weimer  <fweimer@redhat.com>
 
 	[BZ #19861]
diff --git a/inet/netinet/in.h b/inet/netinet/in.h
index 6122ab5..c801593 100644
--- a/inet/netinet/in.h
+++ b/inet/netinet/in.h
@@ -92,10 +92,10 @@ enum
     IPPROTO_MAX
   };
 
-/* If __USE_KERNEL_IPV6_DEFS is defined then the user has included the kernel
+/* If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel
    network headers first and we should use those ABI-identical definitions
-   instead of our own.  */
-#ifndef __USE_KERNEL_IPV6_DEFS
+   instead of our own, otherwise 0.  */
+#if !__USE_KERNEL_IPV6_DEFS
 enum
   {
     IPPROTO_HOPOPTS = 0,   /* IPv6 Hop-by-Hop options.  */
@@ -206,7 +206,7 @@ enum
 #define INADDR_ALLRTRS_GROUP    ((in_addr_t) 0xe0000002) /* 224.0.0.2 */
 #define INADDR_MAX_LOCAL_GROUP  ((in_addr_t) 0xe00000ff) /* 224.0.0.255 */
 
-#ifndef __USE_KERNEL_IPV6_DEFS
+#if !__USE_KERNEL_IPV6_DEFS
 /* IPv6 address */
 struct in6_addr
   {
@@ -249,7 +249,7 @@ struct sockaddr_in
 			   sizeof (struct in_addr)];
   };
 
-#ifndef __USE_KERNEL_IPV6_DEFS
+#if !__USE_KERNEL_IPV6_DEFS
 /* Ditto, for IPv6.  */
 struct sockaddr_in6
   {
@@ -285,7 +285,7 @@ struct ip_mreq_source
   };
 #endif
 
-#ifndef __USE_KERNEL_IPV6_DEFS
+#if !__USE_KERNEL_IPV6_DEFS
 /* Likewise, for IPv6.  */
 struct ipv6_mreq
   {
@@ -532,7 +532,7 @@ extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)
 #ifdef __USE_GNU
 struct cmsghdr;			/* Forward declaration.  */
 
-#ifndef __USE_KERNEL_IPV6_DEFS
+#if !__USE_KERNEL_IPV6_DEFS
 /* IPv6 packet information.  */
 struct in6_pktinfo
   {
diff --git a/sysdeps/unix/sysv/linux/bits/in.h b/sysdeps/unix/sysv/linux/bits/in.h
index d75c07b..9bdadf3 100644
--- a/sysdeps/unix/sysv/linux/bits/in.h
+++ b/sysdeps/unix/sysv/linux/bits/in.h
@@ -30,7 +30,9 @@
 /* This is not quite the same API since the kernel always defines s6_addr16 and
    s6_addr32. This is not a violation of POSIX since POSIX says "at least the
    following member" and that holds true.  */
-# define __USE_KERNEL_IPV6_DEFS
+# define __USE_KERNEL_IPV6_DEFS 1
+#else
+# define __USE_KERNEL_IPV6_DEFS 0
 #endif
 
 /* Options for use with `getsockopt' and `setsockopt' at the IP level.

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

Summary of changes:
 ChangeLog                         |    9 +++++++++
 inet/netinet/in.h                 |   14 +++++++-------
 sysdeps/unix/sysv/linux/bits/in.h |    4 +++-
 3 files changed, 19 insertions(+), 8 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]