This is the mail archive of the libc-hacker@sourceware.cygnus.com 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]

NR_OPEN and POSIX test


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


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