aboutsummaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>1999-02-09 13:48:34 +0000
committerZack Weinberg <zack@gcc.gnu.org>1999-02-09 13:48:34 +0000
commit6458033dde6a2db8e5dd2a140805b58a3ed3747f (patch)
tree15001c4ddc6e98d67f3c219961f582253c3b7649 /gcc/system.h
parent8ec65f13b03f68893379947b8611a280cabe5b74 (diff)
downloadgcc-6458033dde6a2db8e5dd2a140805b58a3ed3747f.zip
gcc-6458033dde6a2db8e5dd2a140805b58a3ed3747f.tar.gz
gcc-6458033dde6a2db8e5dd2a140805b58a3ed3747f.tar.bz2
[multiple changes]
1999-02-09 16:42 -0500 Zack Weinberg <zack@rabi.columbia.edu> * cppfiles.c (finclude): Handle pipes properly under old BSD derivatives. 1999-02-09 16:42 -0500 Melissa O'Neill <oneill@cs.sfu.ca> * system.h: Provide fallback definitions for S_ISCHR, S_ISSOCK, S_ISFIFO, O_NONBLOCK, and O_NOCTTY. From-SVN: r25111
Diffstat (limited to 'gcc/system.h')
-rw-r--r--gcc/system.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h
index 40efc9a..f0c4208 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -422,6 +422,39 @@ extern void abort ();
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
+/* Test if something is a character special file. */
+#ifndef S_ISCHR
+#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+#endif
+
+/* Test if something is a socket. */
+#ifndef S_ISSOCK
+# ifdef S_IFSOCK
+# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
+# else
+# define S_ISSOCK(m) 0
+# endif
+#endif
+
+/* Test if something is a FIFO. */
+#ifndef S_ISFIFO
+# ifdef S_IFIFO
+# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+# else
+# define S_ISFIFO(m) 0
+# endif
+#endif
+
+/* Approximate O_NONBLOCK. */
+#ifndef O_NONBLOCK
+#define O_NONBLOCK O_NDELAY
+#endif
+
+/* Approximate O_NOCTTY. */
+#ifndef O_NOCTTY
+#define O_NOCTTY 0
+#endif
+
/* Get libiberty declarations. */
#include "libiberty.h"