From 981416291cd4bd63e6f0e4b0b3e237ee85756ede Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Wed, 16 May 2012 09:34:38 -0400 Subject: [PATCH] linux-generic: add header guard for In general we just try to include 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 . 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 | 5 +++++ sysdeps/unix/sysv/linux/generic/not-cancel.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog.linux-generic b/ChangeLog.linux-generic index 811b6c6..f74df7c 100644 --- a/ChangeLog.linux-generic +++ b/ChangeLog.linux-generic @@ -1,5 +1,10 @@ 2012-05-16 Chris Metcalf + * sysdeps/unix/sysv/linux/generic/not-cancel.h: Add + multiple-inclusion guard. + +2012-05-16 Chris Metcalf + * 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 ae46e16..512252a 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 . */ +#ifndef _LINUX_GENERIC_NOT_CANCEL_H +#define _LINUX_GENERIC_NOT_CANCEL_H + #include #include @@ -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 -- 2.7.4