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 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.

> +# 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.

-- 
Joseph S. Myers
joseph@codesourcery.com


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