Skip to content

Commit 66e6f8e

Browse files
committed
normalize __WIN32__ to _WIN32, which is defined by all Windows compilers
1 parent 2aed050 commit 66e6f8e

8 files changed

Lines changed: 15 additions & 15 deletions

File tree

amd64/bsd_asm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
.globl CNAME(x); .type CNAME(x),@function; CNAME(x):
6868
#define END(x) .size x, . - x
6969

70-
#elif defined(__WIN32__)
70+
#elif defined(_WIN32)
7171
#define _ENTRY(x) _START_ENTRY; \
7272
.globl CNAME(x); .section .drectve; .ascii " -export:" #x; \
7373
.section .text; .def CNAME(x); .scl 2; .type 32; .endef; CNAME(x):

amd64/bsd_ieeefp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ typedef enum {
117117
#define SSE_RND_OFF 13 /* rounding control offset */
118118
#define SSE_FZ_OFF 15 /* flush to zero offset */
119119

120-
#if (defined(__GNUCLIKE_ASM) && defined(__CC_SUPPORTS___INLINE__)) || defined(__WIN32__) \
120+
#if (defined(__GNUCLIKE_ASM) && defined(__CC_SUPPORTS___INLINE__)) || defined(_WIN32) \
121121
&& !defined(__cplusplus)
122122

123123
#define __fldenv(addr) __asm __volatile("fldenv %0" : : "m" (*(addr)))

i387/bsd_asm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#if defined(__APPLE__)
4040
#include "osx_asm.h"
4141
#define CNAME(x) EXT(x)
42-
#elif defined(__FreeBSD__) || defined(__linux__) || defined(__WIN32__)
42+
#elif defined(__FreeBSD__) || defined(__linux__) || defined(_WIN32)
4343
#include "bsd_cdefs.h"
4444

4545
#ifdef PIC
@@ -78,7 +78,7 @@
7878
#define _ENTRY(x) _START_ENTRY; \
7979
.globl CNAME(x); .type CNAME(x),@function; CNAME(x):
8080
#define END(x) .size x, . - x
81-
#elif defined(__WIN32__)
81+
#elif defined(_WIN32)
8282
#define CNAME(csym) _##csym
8383
#define HIDENAME(asmsym) .asmsym
8484
#define _ENTRY(x) _START_ENTRY; \

i387/fenv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include <cdefs-compat.h>
3030
#include <types-compat.h>
3131
#include <math_private.h>
32-
#if defined(__WIN32__) || defined(__linux__)
32+
#if defined(_WIN32) || defined(__linux__)
3333
#include <i387/bsd_npx.h>
3434
#else
3535
#include <machine/npx.h>

include/cdefs-compat.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#ifndef _CDEFS_COMPAT_H_
22
#define _CDEFS_COMPAT_H_
33

4-
#if (defined(_WIN32) || defined (_MSC_VER)) && !defined(__WIN32__)
5-
#define __WIN32__
4+
#if defined(_MSC_VER) && !defined(_WIN32)
5+
#define _WIN32
66
#endif
77

8-
#ifndef __WIN32__
8+
#ifndef _WIN32
99
#include "sys/cdefs.h"
10-
#else /* __WIN32__ */
10+
#else /* _WIN32 */
1111

1212
#if defined(__cplusplus)
1313
#define __BEGIN_DECLS extern "C" {
@@ -19,7 +19,7 @@
1919

2020
#define _SYS_CDEFS_H_
2121

22-
#endif /* __WIN32__ */
22+
#endif /* _WIN32 */
2323

2424

2525

include/fpmath.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
#include <machine/endian.h>
6060
#endif
6161

62-
#ifdef __WIN32__
62+
#ifdef _WIN32
6363
#define _LITTLE_ENDIAN 1234
6464
#define _BIG_ENDIAN 4321
6565
#define _PDP_ENDIAN 3412

include/types-compat.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#ifndef _TYPES_COMPAT_H_
22
#define _TYPES_COMPAT_H_
33

4-
#if (defined(_WIN32) || defined (_MSC_VER)) && !defined(__WIN32__)
5-
#define __WIN32__
4+
#if defined(_MSC_VER) && !defined(_WIN32)
5+
#define _WIN32
66
#endif
77

88
#include <sys/types.h>
@@ -14,7 +14,7 @@
1414
#define __pure2
1515
#endif
1616

17-
#ifdef __WIN32__
17+
#ifdef _WIN32
1818
/* Not sure what to do about __pure2 on windows */
1919
#define __pure2
2020
typedef uint8_t u_int8_t;

src/s_cbrtl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "fpmath.h"
2525
#include "openlibm.h"
2626
#include "math_private.h"
27-
#if defined(__WIN32__) && defined(__i386__)
27+
#if defined(_WIN32) && defined(__i386__)
2828
#include "i387/bsd_ieeefp.h"
2929
#endif
3030

0 commit comments

Comments
 (0)