Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-01-17 14:57:54 +0400
committerCorinna Vinschen <corinna@vinschen.de>2014-01-17 14:57:54 +0400
commitad1a102dd6746ffff6a4a4c1014a7b454e7a86dd (patch)
tree0c25f7c6692d0283e3473a6f4821dbd5ea199031
parent5780e35aa3f6ace111a14553cbe203c474f25792 (diff)
* libc/include/sys/_default_fcntl.h (LOCK_SH): Define.
(LOCK_EX): Likewise. (LOCK_NB): Likewise. (LOCK_UN): Likewise. (flock): Declare.
-rw-r--r--newlib/ChangeLog8
-rw-r--r--newlib/libc/include/sys/_default_fcntl.h12
2 files changed, 19 insertions, 1 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 526717f85..6ac584ae5 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,11 @@
+2014-01-17 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/_default_fcntl.h (LOCK_SH): Define.
+ (LOCK_EX): Likewise.
+ (LOCK_NB): Likewise.
+ (LOCK_UN): Likewise.
+ (flock): Declare.
+
2014-01-17 Corinna Vinschen <vinschen@redhat.com>
Introduce _STDIO_BSD_SEMANTICS flag to switch fclose/exit file flushing
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 *));