Browse Source

normalize __WIN32__ to _WIN32, which is defined by all Windows compilers

Jameson Nash 11 years ago
parent
commit
66e6f8ea91
8 changed files with 15 additions and 15 deletions
  1. 1 1
      amd64/bsd_asm.h
  2. 1 1
      amd64/bsd_ieeefp.h
  3. 2 2
      i387/bsd_asm.h
  4. 1 1
      i387/fenv.c
  5. 5 5
      include/cdefs-compat.h
  6. 1 1
      include/fpmath.h
  7. 3 3
      include/types-compat.h
  8. 1 1
      src/s_cbrtl.c

+ 1 - 1
amd64/bsd_asm.h

@@ -67,7 +67,7 @@
 			.globl CNAME(x); .type CNAME(x),@function; CNAME(x):
 #define	END(x)		.size x, . - x
 
-#elif defined(__WIN32__)
+#elif defined(_WIN32)
 #define _ENTRY(x)	_START_ENTRY; \
             .globl CNAME(x); .section .drectve; .ascii " -export:" #x; \
             .section .text; .def CNAME(x); .scl 2; .type 32; .endef; CNAME(x):

+ 1 - 1
amd64/bsd_ieeefp.h

@@ -117,7 +117,7 @@ typedef enum {
 #define	SSE_RND_OFF	13	/* rounding control offset */
 #define	SSE_FZ_OFF	15	/* flush to zero offset */
 
-#if (defined(__GNUCLIKE_ASM) && defined(__CC_SUPPORTS___INLINE__)) || defined(__WIN32__) \
+#if (defined(__GNUCLIKE_ASM) && defined(__CC_SUPPORTS___INLINE__)) || defined(_WIN32) \
     && !defined(__cplusplus)
 
 #define	__fldenv(addr)	__asm __volatile("fldenv %0" : : "m" (*(addr)))

+ 2 - 2
i387/bsd_asm.h

@@ -39,7 +39,7 @@
 #if defined(__APPLE__)
 #include "osx_asm.h"
 #define CNAME(x) EXT(x)
-#elif defined(__FreeBSD__) || defined(__linux__) || defined(__WIN32__)
+#elif defined(__FreeBSD__) || defined(__linux__) || defined(_WIN32)
 #include "bsd_cdefs.h"
 
 #ifdef PIC
@@ -78,7 +78,7 @@
 #define _ENTRY(x)	_START_ENTRY; \
 			.globl CNAME(x); .type CNAME(x),@function; CNAME(x):
 #define	END(x)		.size x, . - x
-#elif defined(__WIN32__)
+#elif defined(_WIN32)
 #define CNAME(csym)		_##csym
 #define HIDENAME(asmsym)	.asmsym
 #define _ENTRY(x)   _START_ENTRY; \

+ 1 - 1
i387/fenv.c

@@ -29,7 +29,7 @@
 #include <cdefs-compat.h>
 #include <types-compat.h>
 #include <math_private.h>
-#if defined(__WIN32__) || defined(__linux__)
+#if defined(_WIN32) || defined(__linux__)
 #include <i387/bsd_npx.h>
 #else
 #include <machine/npx.h>

+ 5 - 5
include/cdefs-compat.h

@@ -1,13 +1,13 @@
 #ifndef _CDEFS_COMPAT_H_
 #define	_CDEFS_COMPAT_H_
 
-#if (defined(_WIN32) || defined (_MSC_VER)) && !defined(__WIN32__)
-    #define __WIN32__
+#if defined(_MSC_VER) && !defined(_WIN32)
+    #define _WIN32
 #endif
 
-#ifndef __WIN32__
+#ifndef _WIN32
 #include "sys/cdefs.h"
-#else /* __WIN32__ */
+#else /* _WIN32 */
 
 #if defined(__cplusplus)
 #define	__BEGIN_DECLS	extern "C" {
@@ -19,7 +19,7 @@
 
 #define _SYS_CDEFS_H_
 
-#endif /* __WIN32__ */
+#endif /* _WIN32 */
 
 
 

+ 1 - 1
include/fpmath.h

@@ -59,7 +59,7 @@
 #include <machine/endian.h>
 #endif
 
-#ifdef __WIN32__
+#ifdef _WIN32
 #define _LITTLE_ENDIAN 1234
 #define _BIG_ENDIAN    4321
 #define _PDP_ENDIAN    3412

+ 3 - 3
include/types-compat.h

@@ -1,8 +1,8 @@
 #ifndef _TYPES_COMPAT_H_
 #define	_TYPES_COMPAT_H_
 
-#if (defined(_WIN32) || defined (_MSC_VER)) && !defined(__WIN32__)
-    #define __WIN32__
+#if defined(_MSC_VER) && !defined(_WIN32)
+    #define _WIN32
 #endif
 
 #include <sys/types.h>
@@ -14,7 +14,7 @@
 #define __pure2 
 #endif
 
-#ifdef __WIN32__
+#ifdef _WIN32
 /* Not sure what to do about __pure2 on windows */
 #define __pure2 
 typedef uint8_t               u_int8_t;

+ 1 - 1
src/s_cbrtl.c

@@ -24,7 +24,7 @@
 #include "fpmath.h"    
 #include "openlibm.h"
 #include "math_private.h"
-#if defined(__WIN32__) && defined(__i386__)
+#if defined(_WIN32) && defined(__i386__)
 #include "i387/bsd_ieeefp.h"
 #endif