summaryrefslogtreecommitdiff
path: root/defines.h
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-10 17:42:03 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-10 17:42:03 +0000
commite9b4e94b33c7a94bcdd95eb657c12eed6712d06e (patch)
treeef334fe673347a8b6111790bb47ce8ad67f272b2 /defines.h
parent63a4868d7fc30cd79c16707076cdab76629516f0 (diff)
* eval.c (eval): need to add message delimiter. [ruby-dev:22561]
* defines.h (__NeXT__): Ensure that all standard S_IRUSR, S_IWGRP, S_IRWXO, etc. macros are defined since future code might require them (even though present code only requires a subset). * defines.h (__NeXT__): Bug fix: WORDS_BIGENDIAN was not being set correctly on Rhapsody when -arch compiler flag was used (via configure's --enable-fat-binary option). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'defines.h')
-rw-r--r--defines.h79
1 files changed, 69 insertions, 10 deletions
diff --git a/defines.h b/defines.h
index af5f3bb..1cab4ae 100644
--- a/defines.h
+++ b/defines.h
@@ -99,22 +99,81 @@ void xfree _((void*));
#endif
#ifdef __NeXT__
-#define S_IXGRP 0000010 /* execute/search permission, group */
-#define S_IXOTH 0000001 /* execute/search permission, other */
-#ifndef __APPLE__
-#define S_IXUSR _S_IXUSR /* execute/search permission, owner */
-#define GETPGRP_VOID 1
-#define WNOHANG 01
-#define WUNTRACED 02
-#define X_OK 1
-typedef int pid_t;
+/* NextStep, OpenStep, Rhapsody */
+#ifndef S_IRUSR
+#define S_IRUSR 0000400 /* read permission, owner */
+#endif
+#ifndef S_IRGRP
+#define S_IRGRP 0000040 /* read permission, group */
+#endif
+#ifndef S_IROTH
+#define S_IROTH 0000004 /* read permission, other */
+#endif
+#ifndef S_IWUSR
+#define S_IWUSR 0000200 /* write permission, owner */
+#endif
+#ifndef S_IWGRP
+#define S_IWGRP 0000020 /* write permission, group */
+#endif
+#ifndef S_IWOTH
+#define S_IWOTH 0000002 /* write permission, other */
+#endif
+#ifndef S_IXUSR
+#define S_IXUSR 0000100 /* execute/search permission, owner */
+#endif
+#ifndef S_IXGRP
+#define S_IXGRP 0000010 /* execute/search permission, group */
+#endif
+#ifndef S_IXOTH
+#define S_IXOTH 0000001 /* execute/search permission, other */
+#endif
+#ifndef S_IRWXU
+#define S_IRWXU 0000700 /* read, write, execute permissions, owner */
+#endif
+#ifndef S_IRWXG
+#define S_IRWXG 0000070 /* read, write, execute permissions, group */
+#endif
+#ifndef S_IRWXO
+#define S_IRWXO 0000007 /* read, write, execute permissions, other */
+#endif
+#ifndef S_ISBLK
+#define S_ISBLK(mode) (((mode) & (0170000)) == (0060000))
+#endif
+#ifndef S_ISCHR
+#define S_ISCHR(mode) (((mode) & (0170000)) == (0020000))
+#endif
+#ifndef S_ISDIR
+#define S_ISDIR(mode) (((mode) & (0170000)) == (0040000))
+#endif
+#ifndef S_ISFIFO
+#define S_ISFIFO(mode) (((mode) & (0170000)) == (0010000))
+#endif
+#ifndef S_ISREG
+#define S_ISREG(mode) (((mode) & (0170000)) == (0100000))
+#endif
/* Do not trust WORDS_BIGENDIAN from configure since -arch compiler flag may
- result in a different endian. */
+ result in a different endian. Instead trust __BIG_ENDIAN__ and
+ __LITTLE_ENDIAN__ which are set correctly by -arch. */
#undef WORDS_BIGENDIAN
#ifdef __BIG_ENDIAN__
#define WORDS_BIGENDIAN
#endif
+#ifndef __APPLE__
+/* NextStep, OpenStep (but not Rhapsody) */
+#ifndef GETPGRP_VOID
+#define GETPGRP_VOID 1
+#endif
+#ifndef WNOHANG
+#define WNOHANG 01
+#endif
+#ifndef WUNTRACED
+#define WUNTRACED 02
+#endif
+#ifndef X_OK
+#define X_OK 1
#endif
+typedef int pid_t;
+#endif /* __APPLE__ */
#endif /* NeXT */
#ifdef __CYGWIN__