]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
linux-generic: add header guard for <not-cancel.h>
authorChris Metcalf <cmetcalf@tilera.com>
Wed, 16 May 2012 13:34:38 +0000 (09:34 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Wed, 16 May 2012 13:34:38 +0000 (09:34 -0400)
In general we just try to include <not-cancel.h> once, thus avoiding
any issues with multiple inclusion.

However, the getaddrinfo sources are somewhat tangled, and .c files
include each other to get the final result.  Each .c file currently has
its own include of <not-cancel.h>.  While you could properly re-factor
this for the case of gai.c, the posix/tst-rfc3484.c tests directly include
one of the sub-files (sysdeps/posix/getaddrinfo.c), and it starts to
feel fragile.

ChangeLog.linux-generic
sysdeps/unix/sysv/linux/generic/not-cancel.h

index 811b6c6145cc826bf7f388e86f8f85cb7749e8c3..f74df7c84f09b186443e7f41a6474ce88cd3c8a2 100644 (file)
@@ -1,3 +1,8 @@
+2012-05-16  Chris Metcalf  <cmetcalf@tilera.com>
+
+       * sysdeps/unix/sysv/linux/generic/not-cancel.h: Add
+       multiple-inclusion guard.
+
 2012-05-16  Chris Metcalf  <cmetcalf@tilera.com>
 
        * sysdeps/unix/sysv/linux/generic/bits/typesizes.h:
index ae46e168fe222f5d616edc732f20ca4e400f1bc7..512252a8d06a7b99979fa71cfc87f9813c06df68 100644 (file)
@@ -17,6 +17,9 @@
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
+#ifndef _LINUX_GENERIC_NOT_CANCEL_H
+#define _LINUX_GENERIC_NOT_CANCEL_H
+
 #include <sysdeps/unix/sysv/linux/not-cancel.h>
 #include <fcntl.h>
 
@@ -27,3 +30,5 @@
 #undef open_not_cancel_2
 #define open_not_cancel_2(name, flags) \
   INLINE_SYSCALL (openat, 3, AT_FDCWD, (const char *) (name), (flags))
+
+#endif