]> granicus.if.org Git - gc/commitdiff
Do not include sigcontext.h if NO_SIGCONTEXT_H (Linux)
authorIvan Maidanski <ivmai@mail.ru>
Sun, 6 Jan 2013 09:32:09 +0000 (13:32 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 6 Jan 2013 09:36:47 +0000 (10:36 +0100)
* os_dep.c: Do not include [asm/]sigcontext.h (and linux/version.h)
if NO_SIGCONTEXT_H is defined (only if LINUX and not POWERPC).

os_dep.c

index 669ff5860bfdee025a82271ddf3e4147e93c2a23..563cd6ce4c38d66f452d0cab648b03bdad66f1cc 100644 (file)
--- a/os_dep.c
+++ b/os_dep.c
@@ -16,7 +16,7 @@
 
 #include "private/gc_priv.h"
 
-#if defined(LINUX) && !defined(POWERPC)
+#if defined(LINUX) && !defined(POWERPC) && !defined(NO_SIGCONTEXT_H)
 # include <linux/version.h>
 # if (LINUX_VERSION_CODE <= 0x10400)
     /* Ugly hack to get struct sigcontext_struct definition.  Required  */
         /* has the right declaration for glibc 2.1.                     */
 #       include <sigcontext.h>
 #     endif /* 0 == __GLIBC_MINOR__ */
-#   else /* not 2 <= __GLIBC__ */
+#   else /* __GLIBC__ < 2 */
       /* libc5 doesn't have <sigcontext.h>: go directly with the kernel   */
       /* one.  Check LINUX_VERSION_CODE to see which we should reference. */
 #     include <asm/sigcontext.h>
-#   endif /* 2 <= __GLIBC__ */
+#   endif /* __GLIBC__ < 2 */
 # endif
-#endif
+#endif /* LINUX && !POWERPC */
 
 #if !defined(OS2) && !defined(PCR) && !defined(AMIGA) && !defined(MACOS) \
     && !defined(MSWINCE) && !defined(__CC_ARM)