]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Move Linux kernel version conditionals to kernel-features.h.
authorJoseph Myers <joseph@codesourcery.com>
Fri, 10 Aug 2012 15:53:27 +0000 (15:53 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 10 Aug 2012 15:53:27 +0000 (15:53 +0000)
ChangeLog
ports/ChangeLog.ia64
ports/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h
sysdeps/unix/sysv/linux/kernel-features.h
sysdeps/unix/sysv/linux/sysconf.c

index 0edfa16bdc10662cee09dceb199aa725c1b66d13..386f8493c2c29f3887eb4d1ac053c6b97e6c3abc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-08-10  Joseph Myers  <joseph@codesourcery.com>
+
+       * sysdeps/unix/sysv/linux/kernel-features.h
+       (__LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL): Define.
+       [__LINUX_KERNEL_VERSION >= __LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL]
+       (__ASSUME_ARG_MAX_STACK_BASED): Define.
+       * sysdeps/unix/sysv/linux/sysconf.c (__sysconf)
+       [__LINUX_KERNEL_VERSION < 0x020617]: Change condition to
+       !__ASSUME_ARG_MAX_STACK_BASED.  Compare version with
+       __LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL.
+
 2012-08-09  Jeff Law <law@redhat.com>
 
        [BZ #13939]
index 933ac23c2d0afa93d57518f35bc2073f5d1df709..943df8d66b69fb064aaaf30d14de7f5f03ab90fb 100644 (file)
@@ -1,3 +1,10 @@
+2012-08-10  Joseph Myers  <joseph@codesourcery.com>
+
+       * sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h
+       (_dl_discover_osversion): Do not condition on
+       __LINUX_KERNEL_VERSION < 0x020617.
+       (HAVE_DL_DISCOVER_OSVERSION): Likewise.
+
 2012-08-03  Mike Frysinger  <vapier@gentoo.org>
 
        [BZ #12194]
index e30e33d2bc2db6f14ae87dda2a7e361ae4b1bd51..0962129b1f45f76cbbb45c1b756a046a8fdf015d 100644 (file)
@@ -1,5 +1,5 @@
 /* System-specific settings for dynamic linker code.  IA-64 version.
-   Copyright (C) 2003, 2004, 2006, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003-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
@@ -65,9 +65,7 @@ extern int _dl_sysinfo_break attribute_hidden;
 #define DL_ARGV_NOT_RELRO 1
 
 
-/* The _dl_discover_osversion function is so far only needed in sysconf
-   to check for kernels later than 2.6.23.  */
-#if !defined __ASSEMBLER__ && __LINUX_KERNEL_VERSION < 0x020617
+#ifndef __ASSEMBLER__
 /* Get version of the OS.  */
 extern int _dl_discover_osversion (void) attribute_hidden;
 # define HAVE_DL_DISCOVER_OSVERSION    1
index 21fba884e8f5acf282fdb0271e593cc443801f71..bf81c4a07f76f0c38bd5e9c68b35a19ef0b269d9 100644 (file)
 # define __ASSUME_O_CLOEXEC    1
 #endif
 
+/* From 2.6.23 onwards the value of ARG_MAX depends on the stack
+   size.  */
+#define __LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL 0x020617
+#if __LINUX_KERNEL_VERSION >= __LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL
+# define __ASSUME_ARG_MAX_STACK_BASED  1
+#endif
+
 /* Support for ADJ_OFFSET_SS_READ was added in 2.6.24.  */
 #if __LINUX_KERNEL_VERSION >= 0x020618
 # define __ASSUME_ADJ_OFFSET_SS_READ   1
index 5c8f45d784f0a20da7a5105d1d34240fea1f7f79..47ce5ef07cce78888f04eab34f8333bfdc4b2925 100644 (file)
@@ -1,5 +1,5 @@
 /* Get file-specific information about a file.  Linux version.
-   Copyright (C) 2003,2004,2006 2008,2009,2011 Free Software Foundation, Inc.
+   Copyright (C) 2003-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
@@ -88,11 +88,11 @@ __sysconf (int name)
       return HAS_CPUCLOCK (name);
 
     case _SC_ARG_MAX:
-#if __LINUX_KERNEL_VERSION < 0x020617
-      /* Determine whether this is a kernel 2.6.23 or later.  Only
-        then do we have an argument limit determined by the stack
-        size.  */
-      if (GLRO(dl_discover_osversion) () >= 0x020617)
+#if !__ASSUME_ARG_MAX_STACK_BASED
+      /* Determine whether this is a kernel with an argument limit
+        determined by the stack size.  */
+      if (GLRO(dl_discover_osversion) ()
+         >= __LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL)
 #endif
        /* Use getrlimit to get the stack limit.  */
        if (__getrlimit (RLIMIT_STACK, &rlimit) == 0)