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.
This commit is contained in:
Chris Metcalf 2012-05-16 09:34:38 -04:00
parent 32e8667947
commit 981416291c
2 changed files with 10 additions and 0 deletions

View 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:

View 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