summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-01-17 10:57:54 +0000
committerCorinna Vinschen <corinna@vinschen.de>2014-01-17 10:57:54 +0000
commitad1a102dd6746ffff6a4a4c1014a7b454e7a86dd (patch)
tree0c25f7c6692d0283e3473a6f4821dbd5ea199031 /newlib/libc/include
parent5780e35aa3f6ace111a14553cbe203c474f25792 (diff)
downloadcygnal-ad1a102dd6746ffff6a4a4c1014a7b454e7a86dd.tar.gz
cygnal-ad1a102dd6746ffff6a4a4c1014a7b454e7a86dd.tar.bz2
cygnal-ad1a102dd6746ffff6a4a4c1014a7b454e7a86dd.zip
* libc/include/sys/_default_fcntl.h (LOCK_SH): Define.
(LOCK_EX): Likewise. (LOCK_NB): Likewise. (LOCK_UN): Likewise. (flock): Declare.
Diffstat (limited to 'newlib/libc/include')
-rw-r--r--newlib/libc/include/sys/_default_fcntl.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/newlib/libc/include/sys/_default_fcntl.h b/newlib/libc/include/sys/_default_fcntl.h
index 40d8fae17..b70e71e1e 100644
--- a/newlib/libc/include/sys/_default_fcntl.h
+++ b/newlib/libc/include/sys/_default_fcntl.h
@@ -148,6 +148,14 @@ extern "C" {
#define AT_REMOVEDIR 8
#endif
+#if __BSD_VISIBLE
+/* lock operations for flock(2) */
+#define LOCK_SH 0x01 /* shared file lock */
+#define LOCK_EX 0x02 /* exclusive file lock */
+#define LOCK_NB 0x04 /* don't block when locking */
+#define LOCK_UN 0x08 /* unlock file */
+#endif
+
/*#include <sys/stdtypes.h>*/
#ifndef __CYGWIN__
@@ -176,7 +184,6 @@ struct eflock {
};
#endif /* !_POSIX_SOURCE */
-
#include <sys/types.h>
#include <sys/stat.h> /* sigh. for the mode bits for open/creat */
@@ -186,6 +193,9 @@ extern int openat _PARAMS ((int, const char *, int, ...));
#endif
extern int creat _PARAMS ((const char *, mode_t));
extern int fcntl _PARAMS ((int, int, ...));
+#if __BSD_VISIBLE
+extern int flock _PARAMS ((int, int));
+#endif
#ifdef __CYGWIN__
#include <sys/time.h>
extern int futimesat _PARAMS ((int, const char *, const struct timeval *));