From 92a8ea56e590421dab6ad28cdcbc73720af4e905 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 17 Jan 2014 11:01:46 +0000 Subject: [PATCH] * include/sys/file.h (LOCK_SH): Drop definition in favor of new definitions in newlib. (LOCK_EX): Ditto. (LOCK_NB): Ditto. (LOCK_UN): Ditto. (flock): Ditto. (F_OK): Drop. Already correctly defined in unistd.h. (X_OK): Ditto. (W_OK): Ditto. (R_OK): Ditto. --- winsup/cygwin/ChangeLog | 13 +++++++++++++ winsup/cygwin/include/sys/file.h | 20 -------------------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index fa1e42851..ac2512585 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,16 @@ +2014-01-17 Corinna Vinschen + + * include/sys/file.h (LOCK_SH): Drop definition in favor of new + definitions in newlib. + (LOCK_EX): Ditto. + (LOCK_NB): Ditto. + (LOCK_UN): Ditto. + (flock): Ditto. + (F_OK): Drop. Already correctly defined in unistd.h. + (X_OK): Ditto. + (W_OK): Ditto. + (R_OK): Ditto. + 2014-01-17 Corinna Vinschen * include/cygwin/config.h (_STDIO_BSD_SEMANTICS): Define as 1. diff --git a/winsup/cygwin/include/sys/file.h b/winsup/cygwin/include/sys/file.h index af07df4cf..5730babbc 100644 --- a/winsup/cygwin/include/sys/file.h +++ b/winsup/cygwin/include/sys/file.h @@ -23,7 +23,6 @@ #ifndef _FILE_H_ #define _FILE_H_ -#include #include /* Whence values for lseek(); renamed by POSIX 1003.1 */ @@ -32,23 +31,4 @@ #define L_INCR SEEK_CUR #define L_XTND SEEK_END -/* Operations for flock() function */ -#define LOCK_SH 1 /* Shared lock. */ -#define LOCK_EX 2 /* Exclusive lock. */ -#define LOCK_NB 4 /* Don't block when locking. */ -#define LOCK_UN 8 /* Unlock. */ - -/* Operations for access function */ -#define F_OK 0 /* does file exist */ -#define X_OK 1 /* is it executable or searchable by caller */ -#define W_OK 2 /* is it writable by caller */ -#define R_OK 4 /* is it readable by caller */ - -/* Apply or remove an advisory lock on the file fd refers to. */ -__BEGIN_DECLS - -int _EXFUN(flock, (int, int)); - -__END_DECLS - #endif