This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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: Questions on <bits/fcntl.h> for MIPS


On Wednesday, October 24, 2012 00:04:17 Joseph S. Myers wrote:
> On Tue, 23 Oct 2012, Andreas Jaeger wrote:
> > Btw. is this #include <sgidefs.h> still needed?
> 
> It's for the ABI conditionals in struct flock.
> 
> > +// XXX: Linux kernel headers use different value
> > +#define __O_NOFOLLOW	0x20000	/* Do not follow links.	 */
> 
> MIPS gets this value from asm-generic, and 00400000 == 0x20000.
> 
> > +// XXX: Linux kernel headers use different value
> > +#define __O_DIRECTORY	0x10000	/* Must be a directory.	 */
> 
> 00200000 == 0x10000.

You're right, thanks. Should we use - like all other architectures octal 
values here, or should we continue to use hexadecimal ones?


> > +# define __O_DIRECT	0x8000	/* Direct disk access hint.  */
> 
> Odd indentation.
> 
> > +// XXX: Linux kernel headers use different value
> > +#define __O_NOATIME	0x40000	/* Do not set atime.  */
> 
> 01000000 == 0x40000.
> 
> > +// XXX: Linux kernel headers use different value
> > +#define __O_DSYNC	0x0010	/* Synchronize data.  */
> 
> The value is given in arch/mips/include/asm/fcntl.h exactly as 0x0010.
> > +// XXX: Double check, Linux kernel has ifndef __mips64
> > +// XXX: These should not be defined for __WORDSIZE == 64 - correct?
> > 
> >  #define F_GETLK64	33	/* Get record locking info.  */
> >  #define F_SETLK64	34	/* Set record locking info (non-blocking).  */
> >  #define F_SETLKW64	35	/* Set record locking info (blocking).	*/
> 
> __mips64 certainly isn't the right conditional.  Both o32 and n32 have
> the two versions of the syscall.  I think _MIPS_SIM != _ABI64 is the
> appropriate conditional on these values.

OK, I'll make that change. Current version is in git on branch 
aj/shared-linux-fcntl, I'll send another patch for review once the 
octal/hexadecimal question is answered,

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]