~ chicken-core (chicken-5) 5b931ea39a266e6650ba2dfa2954b285c783c6db


commit 5b931ea39a266e6650ba2dfa2954b285c783c6db
Author:     Michele La Monaca <mikele.chicken@lamonaca.net>
AuthorDate: Sat May 11 00:32:09 2013 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Sun May 12 22:28:01 2013 +0200

    more general macros for solaris platform recognition
    
    Signed-off-by: Peter Bex <peter.bex@xs4all.nl>
    Signed-off-by: felix <felix@call-with-current-continuation.org>

diff --git a/chicken.h b/chicken.h
index 53553c59..ce54b3c1 100644
--- a/chicken.h
+++ b/chicken.h
@@ -89,7 +89,7 @@
 # define C_NONUNIX
 #endif
 
-#if defined(__sun__) && defined(__svr4__)
+#if defined(__sun) && defined(__SVR4)
 # define C_SOLARIS
 #endif
 
@@ -135,9 +135,9 @@
 # include <arpa/nameser.h>
 #elif defined(_AIX)
 # include <sys/machine.h>
-#elif defined(__sun__)
+#elif defined(__sun)
 # include <sys/isa_defs.h>
-#elif defined(__svr4__)
+#elif defined(__SVR4)
 # include <sys/byteorder.h>
 #endif
 
@@ -530,7 +530,7 @@ static inline int isinf_ld (long double x)
 #define C_uword                   unsigned C_word
 #define C_header                  C_uword
 
-#if defined(__sun__) && !defined(__svr4__) 
+#if defined(__sun) && !defined(__SVR4) 
 /* SunOS is supposed not to have stdint.h */
 # include <inttypes.h>
 #else
@@ -709,8 +709,8 @@ static inline int isinf_ld (long double x)
 # define C_SOFTWARE_VERSION "dragonfly"
 #elif defined(__HAIKU__)
 # define C_SOFTWARE_VERSION "haiku"
-#elif defined(__sun__)
-# if defined(__svr4__)
+#elif defined(__sun)
+# if defined(__SVR4)
 #   define C_SOFTWARE_VERSION "solaris"
 # else
 #   define C_SOFTWARE_VERSION "sunos"
@@ -2865,7 +2865,7 @@ C_path_to_executable(C_char *fname)
     return buffer;
   }
   else return NULL;  
-# elif defined(__unix__) || defined(C_XXXBSD)
+# elif defined(__unix__) || defined(__unix) || defined(C_XXXBSD)
   int i, j, k, l;
   C_char *path, *dname;
 
diff --git a/posixunix.scm b/posixunix.scm
index d7c64f5f..a2776da3 100644
--- a/posixunix.scm
+++ b/posixunix.scm
@@ -58,7 +58,7 @@ static C_TLS int C_wait_status;
 #include <pwd.h>
 #include <utime.h>
 
-#if defined(__sun__) && defined(__svr4__)
+#if defined(__sun) && defined(__SVR4)
 # include <sys/tty.h>
 # include <termios.h>
 #endif
Trap