This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
[ARM,MIPS,M68K] O_SYNC fcntl.h updates
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: libc-ports at sourceware dot org
- Date: Tue, 15 Dec 2009 18:16:32 +0000 (UTC)
- Subject: [ARM,MIPS,M68K] O_SYNC fcntl.h updates
This patch updates O_SYNC in bits/fcntl.h headers in line with recent libc
and kernel changes. (The previously used value had only O_DSYNC semantics
and keeps those for binary compatibility, so is kept as the value of
O_DSYNC, but O_SYNC gets a new value which has full O_SYNC semantics in
new kernels.)
I've committed the ARM and MIPS changes; OK to commit the M68K ones?
Other ports maintainers will also need to update their ports; HPPA will
need special care in view of the "Note that parisc really screwed up their
headers" in the commit message for the relevant kernel patch.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index c20b095..03bfd34 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2009-12-15 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Redefine O_SYNC and
+ O_DSYNC to match 2.6.33+ kernels.
+
2009-11-19 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Introduce new symbol
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index 42d6a91..b1eb009 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,8 @@
+2009-12-15 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Redefine O_SYNC and
+ O_DSYNC to match 2.6.33+ kernels.
+
2009-11-23 Andreas Schwab <schwab@linux-m68k.org>
* sysdeps/unix/sysv/linux/m68k/bits/stat.h: Use struct timespec
diff --git a/ChangeLog.mips b/ChangeLog.mips
index b3125f4..9dfe2a5 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2009-12-15 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Redefine O_SYNC and
+ O_DSYNC to match 2.6.33+ kernels.
+
2009-12-09 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/socket.h: Define mmsghdr and
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index d597c10..4971473 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -41,7 +41,7 @@
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
-#define O_SYNC 010000
+#define O_SYNC 04010000
#define O_FSYNC O_SYNC
#define O_ASYNC 020000
@@ -57,7 +57,7 @@
We define the symbols here but let them do the same as O_SYNC since
this is a superset. */
#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_DSYNC 010000 /* Synchronize data. */
# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
index 8ed8eb6..1f98cf5 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
@@ -40,7 +40,7 @@
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
-#define O_SYNC 010000
+#define O_SYNC 04010000
#define O_FSYNC O_SYNC
#define O_ASYNC 020000
@@ -56,7 +56,7 @@
We define the symbols here but let them do the same as O_SYNC since
this is a superset. */
#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_DSYNC 010000 /* Synchronize data. */
# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 5496912..24fb974 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -36,7 +36,7 @@
#define O_WRONLY 01
#define O_RDWR 02
#define O_APPEND 0x0008
-#define O_SYNC 0x0010
+#define O_SYNC 0x4010
#define O_NONBLOCK 0x0080
#define O_NDELAY O_NONBLOCK
#define O_CREAT 0x0100 /* not fcntl */
@@ -58,7 +58,7 @@
We define the symbols here but let them do the same as O_SYNC since
this is a superset. */
#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_DSYNC 0x0010 /* Synchronize data. */
# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
--
Joseph S. Myers
joseph@codesourcery.com