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:
Diffstat (limited to 'winsup/cygwin/include/sys/file.h')
-rw-r--r--winsup/cygwin/include/sys/file.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/winsup/cygwin/include/sys/file.h b/winsup/cygwin/include/sys/file.h
index 5730babbc..9b72ee9c2 100644
--- a/winsup/cygwin/include/sys/file.h
+++ b/winsup/cygwin/include/sys/file.h
@@ -31,4 +31,16 @@
#define L_INCR SEEK_CUR
#define L_XTND SEEK_END
+/* Including <sys/file.h> always defines flock & macros. */
+#if __BSD_VISIBLE - 0 == 0
+
+#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 */
+
+extern int flock _PARAMS ((int, int));
+
+#endif
+
#endif