This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[BZ #14809] Fix Linux header guards


Linux 3.7 changed the include header guards and we thus need to follow.

I suggest to add this to 2.15 and 2.16 branches as well and will do
the commit if approved

Btw. _LIST_H and *_COMPILER_H are not used in kernel 3.7 
but I guess they were previously, so I leave all the old defines in so
that using older LInux kernel headers works.

Tested on Linux/x86-64. Ok to commit?

Andreas

2012-11-07  Andreas Jaeger  <aj@suse.de>

	[BZ #14809]
	* sysdeps/unix/sysv/linux/sys/sysctl.h (_UAPI_LINUX_KERNEL_H)
	(_UAPI_LINUX_TYPES_H): Starting with Linux 3.7, the include header
	guards are changed.  Only define if not yet defined, #undef back
	after including linux/sysctl.h if defined here.

diff --git a/sysdeps/unix/sysv/linux/sys/sysctl.h b/sysdeps/unix/sysv/linux/sys/sysctl.h
index cfa71ad..8b58905 100644
--- a/sysdeps/unix/sysv/linux/sys/sysctl.h
+++ b/sysdeps/unix/sysv/linux/sys/sysctl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1999, 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -39,6 +39,14 @@
 # define __user
 # define __undef__LINUX_COMPILER_H
 #endif
+#ifndef  _UAPI_LINUX_KERNEL_H
+# define _UAPI_LINUX_KERNEL_H
+# define __undef_UAPI_LINUX_KERNEL_H
+#endif
+#ifndef _UAPI_LINUX_TYPES_H
+# define _UAPI_LINUX_TYPES_H
+# define __undef_UAPI_LINUX_TYPES_H
+#endif
 
 #include <linux/sysctl.h>
 
@@ -59,6 +67,14 @@
 # undef __user
 # undef __undef__LINUX_COMPILER_H
 #endif
+#ifdef  __undef_UAPI_LINUX_KERNEL_H
+# undef _UAPI_LINUX_KERNEL_H
+# undef __undef_UAPI_LINUX_KERNEL_H
+#endif
+#ifdef __undef_UAPI_LINUX_TYPES_H
+# undef _UAPI_LINUX_TYPES_H
+# undef __undef_UAPI_LINUX_TYPES_H
+#endif
 
 #include <bits/sysctl.h>
 

-- 
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]