This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: 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: libc-alpha at sourceware dot org
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>,"libc-ports at sourceware dot org" <libc-ports at sourceware dot org>
- Date: Mon, 22 Oct 2012 16:16:02 +0200
- Subject: Re: Fix O_LARGEFILE for Linux/SPARC and s390 (was: Re: [PATCH] ARM: Use <bits/fcntl-linux.h> )
- References: <5084483B.4030205@suse.com> <2036625.SeAZvNclbu@byrd> <Pine.LNX.4.64.1210221405150.21857@digraph.polyomino.org.uk>
On Monday, October 22, 2012 14:06:23 Joseph S. Myers wrote:
> On Mon, 22 Oct 2012, Andreas Jaeger wrote:
> > #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
>
> I think it's more consistent not to have the __USE_LARGEFILE64
> conditionals here: to define the __O_* macro unconditionally (like
> other __O_* macros) and have the conditional only in fcntl-linux.h on
> the O_LARGEFILE definition.
You're right - and that's what I did for x86, I've fixed this with the
appended patch now, will commit later as obvious,
Thanks,
Andreas
2012-10-22 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (__O_LARGEFILE):
Define always.
* sysdeps/unix/sysv/linux/s390/bits/fcntl.h (__O_LARGEFILE): Likewise.
For ChangeLog.arm:
2012-10-22 Andreas Jaeger <aj@suse.de>
* ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h (__O_LARGEFILE):
Define always.
diff --git a/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index e37285d..6ae19ae 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -23,10 +23,8 @@
#define __O_DIRECTORY 040000 /* Must be a directory. */
#define __O_NOFOLLOW 0100000 /* Do not follow links. */
#define __O_DIRECT 0200000 /* Direct disk access. */
+#define __O_LARGEFILE 0400000
-#ifdef __USE_LARGEFILE64
-# define __O_LARGEFILE 0400000
-#endif
struct flock
{
diff --git a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
index 6f53fbc..43eee7a 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
@@ -22,42 +22,18 @@
#include <bits/wordsize.h>
-#ifdef __USE_LARGEFILE64
-# if __WORDSIZE == 64
+#if __WORDSIZE == 64
/* Not necessary, files are always with 64bit off_t. */
-# define __O_LARGEFILE 0
-# else
-# define __O_LARGEFILE 0100000
-# endif
+# define __O_LARGEFILE 0
+#else
+# define __O_LARGEFILE 0100000
#endif
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
index b8496a9..22e71fc 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
@@ -39,14 +39,11 @@
#define __O_DIRECT 0x100000 /* direct disk access hint */
#define __O_NOATIME 0x200000 /* Do not set atime. */
#define __O_PATH 0x1000000 /* Resolve pathname but do not open file. */
-#endif
-#ifdef __USE_LARGEFILE64
-# if __WORDSIZE == 64
-# define __O_LARGEFILE 0
-# else
-# define __O_LARGEFILE 0x40000
-# endif
+#if __WORDSIZE == 64
+# define __O_LARGEFILE 0
+#else
+# define __O_LARGEFILE 0x40000
#endif
#define __O_DSYNC 0x2000 /* Synchronize data. */
--
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