This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Fix O_LARGEFILE for Linux/SPARC and s390 (was: Re: [PATCH] ARM: Use <bits/fcntl-linux.h> )
- From: Andreas Jaeger <aj at suse dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: "libc-ports at sourceware dot org" <libc-ports at sourceware dot org>,libc-alpha at sourceware dot org
- Date: Mon, 22 Oct 2012 09:26:51 +0200
- Subject: Fix O_LARGEFILE for Linux/SPARC and s390 (was: Re: [PATCH] ARM: Use <bits/fcntl-linux.h> )
- References: <5084483B.4030205@suse.com> <Pine.LNX.4.64.1210212250110.1291@digraph.polyomino.org.uk> <Pine.LNX.4.64.1210212257280.1291@digraph.polyomino.org.uk>
On Sunday, October 21, 2012 22:58:16 Joseph S. Myers wrote:
> On Sun, 21 Oct 2012, Joseph S. Myers wrote:
> > On Sun, 21 Oct 2012, Andreas Jaeger wrote:
> > > #ifdef __USE_LARGEFILE64
> > > # define O_LARGEFILE 0400000
> > > #endif
> >
> > You leave this unchanged, but shouldn't you change it to an
> > unconditional definition of __O_LARGEFILE to work correctly with
> > fcntl-linux.h? OK with that change.
>
> (It looks like the checked-in SPARC and S/390 versions also have this
> issue.)
Yes, indeed. Here's a patch to fix this, committed as obvious,
Andreas
commit 481b90b9d6923adcbe801b7a44f784920f15da14
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Oct 22 09:19:30 2012 +0200
Use __O_LARGEFILE instead of O_LARGEFILE
diff --git a/ChangeLog b/ChangeLog
index 6fbc12d..35aa29c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-10-22 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/unix/sysv/linux/s390/bits/fcntl.h (O_LARGEFILE): Rename
+ to __O_LARGEFILE.
+ * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (O_LARGEFILE): Rename
+ to __O_LARGEFILE.
+
2012-10-21 Jim Blandy <jimb@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
index 47941c4..6f53fbc 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
@@ -25,9 +25,9 @@
#ifdef __USE_LARGEFILE64
# if __WORDSIZE == 64
/* Not necessary, files are always with 64bit off_t. */
-# define O_LARGEFILE 0
+# define __O_LARGEFILE 0
# else
-# define O_LARGEFILE 0100000
+# define __O_LARGEFILE 0100000
# endif
#endif
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
index 9c7d43c..b8496a9 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
@@ -43,9 +43,9 @@
#ifdef __USE_LARGEFILE64
# if __WORDSIZE == 64
-# define O_LARGEFILE 0
+# define __O_LARGEFILE 0
# else
-# define O_LARGEFILE 0x40000
+# define __O_LARGEFILE 0x40000
# endif
#endif
--
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