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: [PATCH] Convert Linux PowerPC <bits/fcntl.h> to use <bits/fcntl-linux.h>


On 10/22/2012 05:05 PM, Ryan S. Arnold wrote:
On Sat, Oct 20, 2012 at 6:29 AM, Andreas Jaeger <aj@suse.com> wrote:
Here's an untested patch for PowerPC to follow the other architectures.

I made some changes to bring the header in line with the
other architectures:
* F_GETLK64/F_SETLK64 is defined based on __WORDSIZE
* O_LARGEFILE is defined based on __WORDSIZE

Ok to commit?

Andreas

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

         * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Remove all
         definitions and declarations that are provided by
         <bits/fcntl-linux.h> and include <bits/fcntl-linux.h>.

Andreas, if I can figure out the necessary accompanying patches I'll test this out today.

Double checking the headers, I notice this in sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h:


#if __WORDSIZE == 64
# define F_GETLK64	7	/* Get record locking info.  */
# define F_SETLK64	8	/* Set record locking info (non-blocking).  */
# define F_SETLKW64	9	/* Set record locking info (blocking).  */
#else

These values look totally wrong to me, it doesn't make sense since we define F_SETLKW earlier already to 7.

I would expect that it's 5, 6 and 7 for PowerPC64 (so the same as the non-64 bit variants) like on all other 64-bit platforms. Ryan, could you double check these values, please?

Thanks,
Andreas
--
 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]