about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/bits
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-06-08 06:48:41 +0000
committerUlrich Drepper <drepper@redhat.com>2000-06-08 06:48:41 +0000
commitbb7901065e58c8c05b0d95bad856a3b31eec5bd2 (patch)
tree4b2b420d5519362e729982099df71e1cbf3b4526 /sysdeps/unix/sysv/linux/bits
parent104d06900c76cb7211d1b5556fb20292098335a8 (diff)
downloadglibc-bb7901065e58c8c05b0d95bad856a3b31eec5bd2.tar.gz
glibc-bb7901065e58c8c05b0d95bad856a3b31eec5bd2.tar.xz
glibc-bb7901065e58c8c05b0d95bad856a3b31eec5bd2.zip
Update.
	* sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine OPEN_MAX
	unless user defined it.
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits')
-rw-r--r--sysdeps/unix/sysv/linux/bits/local_lim.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/local_lim.h b/sysdeps/unix/sysv/linux/bits/local_lim.h
index 7d63461137..e9d8182193 100644
--- a/sysdeps/unix/sysv/linux/bits/local_lim.h
+++ b/sysdeps/unix/sysv/linux/bits/local_lim.h
@@ -18,14 +18,19 @@
    Boston, MA 02111-1307, USA.  */
 
 /* The kernel header pollutes the namespace with the NR_OPEN symbol
-   and defines LINK_MAX although filesystems have different maxima.
-   Remove this after including the header if necessary.  */
+   and defines LINK_MAX although filesystems have different maxima.  A
+   similar thing is true for OPEN_MAX: the limit can be changed at
+   runtime and therefore the macro must not be defined.  Remove this
+   after including the header if necessary.  */
 #ifndef NR_OPEN
 # define __undef_NR_OPEN
 #endif
 #ifndef LINK_MAX
 # define __undef_LINK_MAX
 #endif
+#ifndef OPEN_MAX
+# define __undef_OPEN_MAX
+#endif
 
 /* The kernel sources contain a file with all the needed information.  */
 #include <linux/limits.h>
@@ -40,6 +45,11 @@
 # undef LINK_MAX
 # undef __undef_LINK_MAX
 #endif
+/* Have to remove OPEN_MAX?  */
+#ifdef __undef_OPEN_MAX
+# undef OPEN_MAX
+# undef __undef_OPEN_MAX
+#endif
 
 /* Maximum amount by which a process can descrease its asynchronous I/O
    priority level.  */