summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1994-02-25 02:48:41 +0000
committerRoland McGrath <roland@gnu.org>1994-02-25 02:48:41 +0000
commit64c6833c1853a6af271af873d17c08dcf26e9b44 (patch)
treeb9cda07caf5feb9c53cd8a1901958424869eff61 /io
parenteebef3a0d346389121446872b349b2d0e25ae2ed (diff)
entered into RCS
Diffstat (limited to 'io')
-rw-r--r--io/fcntl.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/io/fcntl.h b/io/fcntl.h
index 855685c099..952b2b51da 100644
--- a/io/fcntl.h
+++ b/io/fcntl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -64,6 +64,23 @@ extern int creat __P ((__const char *__file, __mode_t __mode));
#define creat(file, m) __open((file), O_WRONLY|O_CREAT|O_TRUNC, (m))
#endif /* Optimizing. */
+#if defined (__USE_MISC) && !defined (F_LOCK)
+/* NOTE: These declarations also appear in <unistd.h>; be sure to keep both
+ files consistent. Some systems have them there and some here, and some
+ software depends on the macros being defined without including both. */
+
+/* `lockf' is a simpler interface to the locking facilities of `fcntl'.
+ LEN is always relative to the current file position.
+ The CMD argument is one of the following. */
+
+#define F_ULOCK 0 /* Unlock a previously locked region. */
+#define F_LOCK 1 /* Lock a region for exclusive use. */
+#define F_TLOCK 2 /* Test and lock a region for exclusive use. */
+#define F_TEST 3 /* Test a region for other processes locks. */
+
+extern int lockf __P ((int __fd, int __cmd, __off_t __len));
+#endif
+
__END_DECLS
#endif /* fcntl.h */