From: Ulrich Drepper Date: Sun, 25 Oct 1998 09:09:29 +0000 (+0000) Subject: (LOCK_SH, LOCK_EX, LOCK_NB, LOCK_UN): Protect with __USE_BSD. X-Git-Tag: upstream/2.30~10627^2~3043 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1a011e7312f01441782877076631d8f07bac9c6;p=external%2Fglibc.git (LOCK_SH, LOCK_EX, LOCK_NB, LOCK_UN): Protect with __USE_BSD. --- diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 70ebbeb..9f90ddf 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -89,12 +89,14 @@ #define F_EXLCK 16 /* or 3 */ #define F_SHLCK 32 /* or 4 */ -/* operations for bsd flock(), also used by the kernel implementation */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* or'd with one of the above to prevent +/* Operations for bsd flock(), also used by the kernel implementation */ +#ifdef __USE_BSD +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent blocking */ -#define LOCK_UN 8 /* remove lock */ +# define LOCK_UN 8 /* remove lock */ +#endif /* We don't need to support __USE_FILE_OFFSET64. */ struct flock diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 0273470..0a21a59 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -86,12 +86,14 @@ #define F_EXLCK 4 /* or 3 */ #define F_SHLCK 8 /* or 4 */ -/* operations for bsd flock(), also used by the kernel implementation */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* or'd with one of the above to prevent XXXXXXXXXXXXXXXXXX +#ifdef __USE_BSD +/* Operations for bsd flock(), also used by the kernel implementation */ +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent XXXXXXXXXXXXXXXXXX blocking */ -#define LOCK_UN 8 /* remove lock */ +# define LOCK_UN 8 /* remove lock */ +#endif typedef struct flock {