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]

A patch for LOCK_XX


Another item for VSX-PCT.

-- 
H.J. Lu (hjl@gnu.org)
---
Sat Oct 24 18:10:50 1998  H.J. Lu  <hjl@gnu.org>

	* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (LOCK_SH,
	LOCK_EX, LOCK_NB, LOCK_UN): Protect with __USE_BSD.
	* sysdeps/unix/sysv/linux/i386/bits/fcntl.h (LOCK_SH, LOCK_EX,
	LOCK_NB, LOCK_UN): Likwise.
	* sysdeps/unix/sysv/linux/mips/bits/fcntl.h (LOCK_SH, LOCK_EX,
	LOCK_NB, LOCK_UN): Likwise.
	* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (LOCK_SH, LOCK_EX,
	LOCK_NB, LOCK_UN): Likwise.
	* sysdeps/unix/sysv/linux/bits/fcntl.h (LOCK_SH, LOCK_EX,
	LOCK_NB, LOCK_UN): Likwise.

Index: sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h,v
retrieving revision 1.1.1.6
diff -u -r1.1.1.6 fcntl.h
--- fcntl.h	1998/10/24 14:11:20	1.1.1.6
+++ fcntl.h	1998/10/24 14:18:16
@@ -89,12 +89,14 @@
 #define F_EXLCK		16	/* or 3 */
 #define F_SHLCK		32	/* or 4 */
 
+#ifdef __USE_BSD
 /* operations for bsd flock(), also used by the kernel implementation */
 #define LOCK_SH		1	/* shared lock */
 #define LOCK_EX		2	/* exclusive lock */
 #define LOCK_NB		4	/* or'd with one of the above to prevent
 				   blocking */
 #define LOCK_UN		8	/* remove lock */
+#endif
 
 /* We don't need to support __USE_FILE_OFFSET64.  */
 struct flock
Index: sysdeps/unix/sysv/linux/i386/bits/fcntl.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 fcntl.h
--- fcntl.h	1998/10/24 14:11:25	1.1.1.2
+++ fcntl.h	1998/10/24 14:18:20
@@ -96,12 +96,14 @@
 #define F_EXLCK		4	/* or 3 */
 #define F_SHLCK		8	/* or 4 */
 
+#ifdef __USE_BSD
 /* operations for bsd flock(), also used by the kernel implementation */
 #define LOCK_SH		1	/* shared lock */
 #define LOCK_EX		2	/* exclusive lock */
 #define LOCK_NB		4	/* or'd with one of the above to prevent
 				   blocking */
 #define LOCK_UN		8	/* remove lock */
+#endif
 
 struct flock
   {
Index: sysdeps/unix/sysv/linux/mips/bits/fcntl.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc/sysdeps/unix/sysv/linux/mips/bits/fcntl.h,v
retrieving revision 1.3
diff -u -r1.3 fcntl.h
--- fcntl.h	1998/09/12 18:16:58	1.3
+++ fcntl.h	1998/10/24 14:18:21
@@ -38,8 +38,15 @@
 #define O_EXCL		0x0400	/* not fcntl */
 #define O_NOCTTY	0x0800	/* not fcntl */
 #define O_FSYNC		O_SYNC
-#define O_ASYNC		020000
+#define O_ASYNC		0x1000
 
+#ifdef __USE_GNU
+# define O_LARGEFILE	0x2000	/* Allow large file opens.  */
+# define O_NOFOLLOW	0x4000	/* Do not follow links.  */
+# define O_DIRECT	0x8000	/* Direct disk access hint.  */
+# define O_DIRECTORY	0x10000	/* Must be a directory.  */
+#endif
+
 #define O_NDELAY	O_NONBLOCK
 
 /* XXX missing */
@@ -82,12 +89,14 @@
 #define F_EXLCK		4	/* or 3 */
 #define F_SHLCK		8	/* or 4 */
 
+#ifdef __USE_BSD
 /* operations for bsd flock(), also used by the kernel implementation */
 #define LOCK_SH		1	/* shared lock */
 #define LOCK_EX		2	/* exclusive lock */
-#define LOCK_NB		4	/* or'd with one of the above to prevent		XXXXXXXXXXXXXXXXXX
+#define LOCK_NB		4	/* or'd with one of the above to prevent
 				   blocking */
 #define LOCK_UN		8	/* remove lock */
+#endif
 
 typedef struct flock
   {
Index: sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 fcntl.h
--- fcntl.h	1998/10/24 14:11:33	1.1.1.5
+++ fcntl.h	1998/10/24 14:18:25
@@ -79,12 +79,14 @@
 #define F_EXLCK		4	/* or 3 */
 #define F_SHLCK		8	/* or 4 */
 
+#ifdef __USE_BSD
 /* operations for bsd flock(), also used by the kernel implementation */
 #define LOCK_SH		1	/* shared lock */
 #define LOCK_EX		2	/* exclusive lock */
 #define LOCK_NB		4	/* or'd with one of the above to prevent
 				   blocking */
 #define LOCK_UN		8	/* remove lock */
+#endif
 
 struct flock
   {
Index: sysdeps/unix/sysv/linux/bits/fcntl.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc/sysdeps/unix/sysv/linux/bits/fcntl.h,v
retrieving revision 1.1.1.9
diff -u -r1.1.1.9 fcntl.h
--- fcntl.h	1998/10/24 14:11:21	1.1.1.9
+++ fcntl.h	1998/10/24 14:18:17
@@ -96,12 +96,14 @@
 #define F_EXLCK		4	/* or 3 */
 #define F_SHLCK		8	/* or 4 */
 
+#ifdef __USE_BSD
 /* operations for bsd flock(), also used by the kernel implementation */
 #define LOCK_SH		1	/* shared lock */
 #define LOCK_EX		2	/* exclusive lock */
 #define LOCK_NB		4	/* or'd with one of the above to prevent
 				   blocking */
 #define LOCK_UN		8	/* remove lock */
+#endif
 
 struct flock
   {


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