summaryrefslogtreecommitdiff
path: root/lib/openat.h
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-11-28 20:51:05 +0000
committerJim Meyering <jim@meyering.net>2004-11-28 20:51:05 +0000
commitfa871415f9bc9ff8edd998a0800d7a51d0899952 (patch)
tree42c64a5625b615e4881ef8784433a9f81dd1c35d /lib/openat.h
parent79e2f2c1f96756de494c3660cffab916517fe1d9 (diff)
downloadcoreutils-fa871415f9bc9ff8edd998a0800d7a51d0899952.tar.xz
*** empty log message ***
Diffstat (limited to 'lib/openat.h')
-rw-r--r--lib/openat.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/openat.h b/lib/openat.h
new file mode 100644
index 000000000..8354b3ada
--- /dev/null
+++ b/lib/openat.h
@@ -0,0 +1,21 @@
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#ifndef AT_FDCWD
+/* FIXME: use the same value Solaris uses */
+# define AT_FDCWD -999
+
+# ifdef __OPENAT_PREFIX
+# undef openat
+# define __OPENAT_CONCAT(x, y) x ## y
+# define __OPENAT_XCONCAT(x, y) __OPENAT_CONCAT (x, y)
+# define __OPENAT_ID(y) __OPENAT_XCONCAT (__OPENAT_PREFIX, y)
+# define openat __OPENAT_ID (openat)
+/* FIXME: use proper prototype */
+#if 0
+ int openat (int fd, char const *filename, int flags, /* mode_t mode */ ...);
+#endif
+int openat (int fd, char const *filename, int flags);
+# endif
+#endif