From: Chris Metcalf Date: Wed, 16 May 2012 13:34:38 +0000 (-0400) Subject: linux-generic: add header guard for X-Git-Tag: glibc-2.16-ports-before-merge~115 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=981416291cd4bd63e6f0e4b0b3e237ee85756ede;p=thirdparty%2Fglibc.git 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. --- diff --git a/ChangeLog.linux-generic b/ChangeLog.linux-generic index 811b6c6145c..f74df7c84f0 100644 --- a/ChangeLog.linux-generic +++ b/ChangeLog.linux-generic @@ -1,3 +1,8 @@ +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: diff --git a/sysdeps/unix/sysv/linux/generic/not-cancel.h b/sysdeps/unix/sysv/linux/generic/not-cancel.h index ae46e168fe2..512252a8d06 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