This is the mail archive of the libc-alpha@sourceware.org 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]
Other format: [Raw text]

Re: Sharing of bits/fcntl.h on Linux (SPARC, x86)


On 10/22/2012 06:33 PM, Joseph S. Myers wrote:
> On Mon, 22 Oct 2012, Andreas Jaeger wrote:
> 
>> On which architecture? I'll investigate and fix.
> 
> This was on x86_64, but I don't see *any* __O_SYNC definitions, for any
> architecture, so I expect it will be broken everywhere.

This should be fixed with the appended patch that I'm currently
testing and will commit afterwards,

Andreas

2012-10-22  Andreas Jaeger  <aj@suse.de>

	* sysdeps/unix/sysv/linux/bits/fcntl-linux.h (O_RSYNC): Define to
	__O_RSYNC if it exists, otherwise to O_SYNC.


diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
index f0c0d7d..dbd76ad 100644
--- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
+++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
@@ -135,7 +135,11 @@
    since this is a superset.  */
 #if defined __USE_POSIX199309 || defined __USE_UNIX98
 # define O_DSYNC	__O_DSYNC	/* Synchronize data.  */
-# define O_RSYNC	__O_SYNC	/* Synchronize read operations.	 */
+# if defined __O_RSYNC
+#  define O_RSYNC	__O_RSYNC	/* Synchronize read operations.	 */
+# else
+#  define O_RSYNC	O_SYNC		/* Synchronize read operations.	 */
+# endif
 #endif
 
 /* Values for the second argument to `fcntl'.  */

-- 
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


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