Use defined(__sun) instead of defined(sun)
authorKurt Roeckx <kurt@roeckx.be>
Sun, 22 Nov 2015 09:31:35 +0000 (10:31 +0100)
committerKurt Roeckx <kurt@roeckx.be>
Sun, 22 Nov 2015 11:25:00 +0000 (12:25 +0100)
Strict ISO confirming C compilers only define __sun

Reviewed-by: Viktor Dukhovni <openssl-users@dukhovni.org>
RT #4144, MR #1353

(cherry picked from commit 3d32218812e87221344f2985512e42e4aaa88745)

crypto/opensslconf.h.in
e_os.h

index 814309becb6c6c29906ab692b213d0d8f80a4973..d8e6abcf16be5e81ee6a6f87aca050d5fb2f617a 100644 (file)
    optimization options.  Older Sparc's work better with only UNROLL, but
    there's no way to tell at compile time what it is you're running on */
  
-#if defined( sun )             /* Newer Sparc's */
+#if defined( __sun )           /* Newer Sparc's */
 #  define DES_PTR
 #  define DES_RISC1
 #  define DES_UNROLL
diff --git a/e_os.h b/e_os.h
index 758448596a162553a4d60fdab71f08cf231e31ce..d84ffb446b1fa2ee01f1a59a148e941ef56c3c92 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -612,7 +612,7 @@ struct servent *PASCAL getservbyname(const char *, const char *);
 #    include <sys/select.h>
 #   endif
 
-#   if defined(sun)
+#   if defined(__sun)
 #    include <sys/filio.h>
 #   else
 #    ifndef VMS
@@ -654,7 +654,7 @@ struct servent *PASCAL getservbyname(const char *, const char *);
 
 # endif
 
-# if defined(sun) && !defined(__svr4__) && !defined(__SVR4)
+# if defined(__sun) && !defined(__svr4__) && !defined(__SVR4)
   /* include headers first, so our defines don't break it */
 #  include <stdlib.h>
 #  include <string.h>