mirror of
git://sourceware.org/git/glibc.git
synced 2025-01-24 12:25:35 +08:00
(LOCK_SH, LOCK_EX, LOCK_NB, LOCK_UN): Protect with __USE_BSD.
This commit is contained in:
parent
91c2d73543
commit
e1a011e731
@ -89,12 +89,14 @@
|
|||||||
#define F_EXLCK 16 /* or 3 */
|
#define F_EXLCK 16 /* or 3 */
|
||||||
#define F_SHLCK 32 /* or 4 */
|
#define F_SHLCK 32 /* or 4 */
|
||||||
|
|
||||||
/* operations for bsd flock(), also used by the kernel implementation */
|
/* Operations for bsd flock(), also used by the kernel implementation */
|
||||||
#define LOCK_SH 1 /* shared lock */
|
#ifdef __USE_BSD
|
||||||
#define LOCK_EX 2 /* exclusive lock */
|
# define LOCK_SH 1 /* shared lock */
|
||||||
#define LOCK_NB 4 /* or'd with one of the above to prevent
|
# define LOCK_EX 2 /* exclusive lock */
|
||||||
|
# define LOCK_NB 4 /* or'd with one of the above to prevent
|
||||||
blocking */
|
blocking */
|
||||||
#define LOCK_UN 8 /* remove lock */
|
# define LOCK_UN 8 /* remove lock */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* We don't need to support __USE_FILE_OFFSET64. */
|
/* We don't need to support __USE_FILE_OFFSET64. */
|
||||||
struct flock
|
struct flock
|
||||||
|
@ -86,12 +86,14 @@
|
|||||||
#define F_EXLCK 4 /* or 3 */
|
#define F_EXLCK 4 /* or 3 */
|
||||||
#define F_SHLCK 8 /* or 4 */
|
#define F_SHLCK 8 /* or 4 */
|
||||||
|
|
||||||
/* operations for bsd flock(), also used by the kernel implementation */
|
#ifdef __USE_BSD
|
||||||
#define LOCK_SH 1 /* shared lock */
|
/* Operations for bsd flock(), also used by the kernel implementation */
|
||||||
#define LOCK_EX 2 /* exclusive lock */
|
# define LOCK_SH 1 /* shared lock */
|
||||||
#define LOCK_NB 4 /* or'd with one of the above to prevent XXXXXXXXXXXXXXXXXX
|
# define LOCK_EX 2 /* exclusive lock */
|
||||||
|
# define LOCK_NB 4 /* or'd with one of the above to prevent XXXXXXXXXXXXXXXXXX
|
||||||
blocking */
|
blocking */
|
||||||
#define LOCK_UN 8 /* remove lock */
|
# define LOCK_UN 8 /* remove lock */
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct flock
|
typedef struct flock
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user