summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/include/sys
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-02-06 20:38:35 +0000
committerCorinna Vinschen <corinna@vinschen.de>2014-02-06 20:38:35 +0000
commitabbe1f5320881ec7da114a4e0b6d17045d6b5500 (patch)
tree19a806f7d195cc35873a287f58ed285f2492ed20 /winsup/cygwin/include/sys
parent46913a8290408f9321791c0ee00b786c4f767b75 (diff)
downloadcygnal-abbe1f5320881ec7da114a4e0b6d17045d6b5500.tar.gz
cygnal-abbe1f5320881ec7da114a4e0b6d17045d6b5500.tar.bz2
cygnal-abbe1f5320881ec7da114a4e0b6d17045d6b5500.zip
* fhandler_disk_file.cc (fhandler_disk_file::fchown): Fix typo in
comment. * mount.cc (mount_info::from_fstab): Use tmp_pathbuf rather than stack for big local buffer. * net.cc (cygwin_gethostname): Call GetComputerNameExA rather than GetComputerNameA if gethostname failed. * shared.cc (user_info::initialize): Fix formatting. * include/sys/file.h: Define flock and accompanying macros if not already defined in sys/_default_fcntl.h.
Diffstat (limited to 'winsup/cygwin/include/sys')
-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