summaryrefslogtreecommitdiff
path: root/klibc/include/fcntl.h
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2004-10-05 18:51:53 -0700
committerGreg KH <gregkh@suse.de>2005-04-26 21:37:02 -0700
commit60d1e263f0da2976938fa54efec88ab777a6b3c3 (patch)
tree94bfcc4279827a68f90f8b63c0d458ddc753c69b /klibc/include/fcntl.h
parenta0622777688ad84ef3d789e0171cfb0ca3dc21d2 (diff)
[PATCH] oops forgot to add the new klibc/include directory
Diffstat (limited to 'klibc/include/fcntl.h')
-rw-r--r--klibc/include/fcntl.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/klibc/include/fcntl.h b/klibc/include/fcntl.h
new file mode 100644
index 0000000000..c9650f76b5
--- /dev/null
+++ b/klibc/include/fcntl.h
@@ -0,0 +1,46 @@
+/*
+ * fcntl.h
+ */
+
+#ifndef _FCNTL_H
+#define _FCNTL_H
+
+#include <klibc/extern.h>
+#include <klibc/compiler.h>
+#include <sys/types.h>
+#if defined(__mips__) && !defined(__mips64__)
+# include <klibc/archfcntl.h>
+#endif
+#include <linux/fcntl.h>
+
+/* This is ugly, but "struct flock" has actually been defined with
+ a long off_t, so it's really "struct flock64". It just happens
+ to work. Gag. Barf.
+
+ This happens to work on all 32-bit architectures except MIPS. */
+
+#ifdef F_GETLK64
+# undef F_GETLK
+# define F_GETLK F_GETLK64
+#endif
+
+#ifdef F_SETLK64
+# undef F_SETLK
+# define F_SETLK F_SETLK64
+#endif
+
+#ifdef F_SETLKW64
+# undef F_SETLKW
+# define F_SETLKW F_SETLKW64
+#endif
+
+/* This is defined here as well as in <unistd.h> since old-style code
+ would still include <fcntl.h> when using open(), and open() being
+ a varadic function changes its calling convention on some architectures. */
+#ifndef _KLIBC_IN_OPEN_C
+__extern int open(const char *, int, ...);
+#endif
+
+__extern int fcntl(int, int, ...);
+
+#endif /* _FCNTL_H */