summaryrefslogtreecommitdiff
path: root/src/system.h
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-06-16 10:46:59 +0000
committerJim Meyering <jim@meyering.net>2003-06-16 10:46:59 +0000
commit0d6c9af25020623c9c76d2706aff042699a7dfae (patch)
treeb77d193664457984e25d5adaa0fd107745fc7827 /src/system.h
parent9253fdd9a23a9fcc4586ab98339d7e2024078590 (diff)
downloadcoreutils-0d6c9af25020623c9c76d2706aff042699a7dfae.tar.xz
(O_NDELAY, O_NONBLOCK, O_NOCTTY, EISDIR): New definitions.
Moved here from touch.c, with one change: define EISDIR to -1, not 0.
Diffstat (limited to 'src/system.h')
-rw-r--r--src/system.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/system.h b/src/system.h
index 52e3159e7..245c83a5a 100644
--- a/src/system.h
+++ b/src/system.h
@@ -117,13 +117,16 @@ void *memrchr (const void *, int, size_t);
extern int errno;
#endif
-/* Some systems don't define ENOSYS. */
+/* Some systems don't define the following symbols. */
#ifndef ENOSYS
# define ENOSYS (-1)
#endif
#ifndef ENOTSUP
# define ENOTSUP (-1)
#endif
+#ifndef EISDIR
+# define EISDIR (-1)
+#endif
#include <stdbool.h>
@@ -171,6 +174,18 @@ extern int errno;
# define O_TEXT _O_TEXT
#endif
+#if !defined O_NDELAY
+# define O_NDELAY 0
+#endif
+
+#if !defined O_NONBLOCK
+# define O_NONBLOCK O_NDELAY
+#endif
+
+#if !defined O_NOCTTY
+# define O_NOCTTY 0
+#endif
+
#ifdef __BEOS__
/* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
# undef O_BINARY