This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[patch] sync macros in linux/sh/bits/fcntl.h with other linux hosts
- From: Mike Frysinger <vapier at gentoo dot org>
- To: libc-alpha at sources dot redhat dot com
- Cc: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Date: Sun, 26 Feb 2006 01:35:28 -0500
- Subject: [patch] sync macros in linux/sh/bits/fcntl.h with other linux hosts
- Geoman: IS A RETARD
simple patch to bring the SuperH version of bits/fcntl.h up to date with all
the other linux hosts
-mike
2006-02-26 Mike Frysinger <vapier@gentoo.org>
* sysdeps/unix/sysv/linux/sh/bits/fcntl.h
[__USE_GNU] (F_SETLEASE, F_GETLEASE, F_NOTIFY): New macros.
[__USE_GNU] (LOCK_MAND, LOCK_READ, LOCK_WRITE, LOCK_RW): New macros.
[__USE_GNU] (DN_ACCESS, DN_MODIFY, DN_CREATE, DN_DELETE, DN_RENAME,
DN_ATTRIB, DN_MULTISHOT): New macros.
--- sysdeps/unix/sysv/linux/sh/bits/fcntl.h
+++ sysdeps/unix/sysv/linux/sh/bits/fcntl.h
@@ -1,5 +1,5 @@
-/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995, 1996, 1997, 1998, 2000, 2004
+/* O_*, F_*, FD_* bit values for Linux/SuperH.
+ Copyright (C) 1995-1998, 2000, 2004, 2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -90,6 +90,12 @@
# define F_GETSIG 11 /* Get number of signal to be sent. */
#endif
+#ifdef __USE_GNU
+# define F_SETLEASE 1024 /* Set a lease. */
+# define F_GETLEASE 1025 /* Enquire what lease is active. */
+# define F_NOTIFY 1026 /* Request notfications on a directory. */
+#endif
+
/* For F_[GET|SET]FL. */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
@@ -111,6 +117,24 @@
# define LOCK_UN 8 /* remove lock */
#endif
+#ifdef __USE_GNU
+# define LOCK_MAND 32 /* This is a mandatory flock: */
+# define LOCK_READ 64 /* ... which allows concurrent read operations. */
+# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
+# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
+#endif
+
+#ifdef __USE_GNU
+/* Types of directory notifications that may be requested with F_NOTIFY. */
+# define DN_ACCESS 0x00000001 /* File accessed. */
+# define DN_MODIFY 0x00000002 /* File modified. */
+# define DN_CREATE 0x00000004 /* File created. */
+# define DN_DELETE 0x00000008 /* File removed. */
+# define DN_RENAME 0x00000010 /* File renamed. */
+# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
+# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
+#endif
+
struct flock
{
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */