[newlib-cygwin/main] Cygwin: fcntl: move lock types definition to fcntl.h header
Corinna Vinschen
corinna@sourceware.org
Mon Aug 4 18:54:08 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=bc4a69935864cd01479e1ea0a2be7880306f2555
commit bc4a69935864cd01479e1ea0a2be7880306f2555
Author: Corinna Vinschen <corinna@vinschen.de>
AuthorDate: Mon Aug 4 20:15:24 2025 +0200
Commit: Corinna Vinschen <corinna@vinschen.de>
CommitDate: Mon Aug 4 20:51:03 2025 +0200
Cygwin: fcntl: move lock types definition to fcntl.h header
This is in preparation for implementing OFD locks per POSIX.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/flock.cc | 4 ----
winsup/cygwin/include/fcntl.h | 6 ++++++
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc
index 0eb908fd32a6..246fb02e149a 100644
--- a/winsup/cygwin/flock.cc
+++ b/winsup/cygwin/flock.cc
@@ -109,10 +109,6 @@
#include <sys/queue.h>
#include <wchar.h>
-#define F_WAIT 0x10 /* Wait until lock is granted */
-#define F_FLOCK 0x20 /* Use flock(2) semantics for lock */
-#define F_POSIX 0x40 /* Use POSIX semantics for lock */
-
#ifndef OFF_MAX
#define OFF_MAX LLONG_MAX
#endif
diff --git a/winsup/cygwin/include/fcntl.h b/winsup/cygwin/include/fcntl.h
index 340aed4402a7..0c1c66d674a9 100644
--- a/winsup/cygwin/include/fcntl.h
+++ b/winsup/cygwin/include/fcntl.h
@@ -14,6 +14,12 @@ details. */
#define O_NDELAY _FNDELAY
+#ifdef __INSIDE_CYGWIN__
+#define F_WAIT 0x10 /* Wait until lock is granted */
+#define F_FLOCK 0x20 /* Use flock(2) semantics for lock */
+#define F_POSIX 0x40 /* Use POSIX semantics for lock */
+#endif
+
/* F_LCK_MANDATORY: Request mandatory locks for this file descriptor.
Cygwin extension to fcntl file locking mechanism. By default, fcntl file
More information about the Cygwin-cvs
mailing list