This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
NR_OPEN and POSIX test
- To: libc-hacker@cygnus.com (GNU C Library)
- Subject: NR_OPEN and POSIX test
- From: hjl@lucon.org (H.J. Lu)
- Date: Tue, 10 Nov 1998 10:34:04 -0800 (PST)
Hi,
<limits.h> includes <linux/limits.h> which defines NR_OPEN. The POSIX
test doesn't like it. Here is a patch.
Thanks.
--
H.J. Lu (hjl@gnu.org)
---
Tue Nov 10 07:31:48 1998 H.J. Lu <hjl@gnu.org>
* sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
if it is defined in <linux/limits.h>.
* linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h:
Likewise.
Index: sysdeps/unix/sysv/linux/bits/local_lim.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc/sysdeps/unix/sysv/linux/bits/local_lim.h,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 local_lim.h
--- sysdeps/unix/sysv/linux/bits/local_lim.h 1997/12/05 00:30:14 1.1.1.2
+++ sysdeps/unix/sysv/linux/bits/local_lim.h 1998/11/10 18:27:39
@@ -18,7 +18,14 @@
Boston, MA 02111-1307, USA. */
/* The kernel sources contain a file with all the needed information. */
+#ifndef NR_OPEN
+#define __undef_NR_OPEN
+#endif
#include <linux/limits.h>
+#ifdef __undef_NR_OPEN
+#undef NR_OPEN
+#undef __undef_NR_OPEN
+#endif
/* Maximum amount by which a process can descrease its asynchronous I/O
priority level. */
Index: linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 local_lim.h
--- linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h 1998/03/17 20:54:18 1.1.1.1
+++ linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h 1998/11/10 18:29:02
@@ -18,7 +18,14 @@
Boston, MA 02111-1307, USA. */
/* The kernel sources contain a file with all the needed information. */
+#ifndef NR_OPEN
+#define __undef_NR_OPEN
+#endif
#include <linux/limits.h>
+#ifdef __undef_NR_OPEN
+#undef NR_OPEN
+#undef __undef_NR_OPEN
+#endif
/* The number of data keys per process. */
#define _POSIX_THREAD_KEYS_MAX 128