aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2012-05-16 09:34:38 -0400
committerChris Metcalf <cmetcalf@tilera.com>2012-05-16 09:34:38 -0400
commit981416291cd4bd63e6f0e4b0b3e237ee85756ede (patch)
tree5a27ec45a37465ebd720176e70bebdf70840098c
parent32e8667947c67298608e1b5bee496e3f310170fe (diff)
downloadglibc-981416291cd4bd63e6f0e4b0b3e237ee85756ede.tar.xz
glibc-981416291cd4bd63e6f0e4b0b3e237ee85756ede.zip
linux-generic: add header guard for <not-cancel.h>
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.
-rw-r--r--ChangeLog.linux-generic5
-rw-r--r--sysdeps/unix/sysv/linux/generic/not-cancel.h5
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog.linux-generic b/ChangeLog.linux-generic
index 811b6c6145..f74df7c84f 100644
--- a/ChangeLog.linux-generic
+++ b/ChangeLog.linux-generic
@@ -1,5 +1,10 @@
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:
Remove now-unused __SNSECONDS_T_TYPE, and add new
__SYSCALL_ULONG_TYPE and __SYSCALL_SLONG_TYPE types.
diff --git a/sysdeps/unix/sysv/linux/generic/not-cancel.h b/sysdeps/unix/sysv/linux/generic/not-cancel.h
index ae46e168fe..512252a8d0 100644
--- a/sysdeps/unix/sysv/linux/generic/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/generic/not-cancel.h
@@ -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