From e1a011e7312f01441782877076631d8f07bac9c6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 25 Oct 1998 09:09:29 +0000 Subject: [PATCH] (LOCK_SH, LOCK_EX, LOCK_NB, LOCK_UN): Protect with __USE_BSD. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 12 +++++++----- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) 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 { -- 2.7.4