Skip to content

Commit 2eb1876

Browse files
committed
add more windows compatibility definitions
1 parent 66e6f8e commit 2eb1876

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

i387/bsd_asm.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,29 @@
7070

7171

7272
/* XXX should use .p2align 4,0x90 for -m486. */
73-
#define _START_ENTRY .text; .p2align 2,0x90
73+
#define _START_ENTRY .p2align 2,0x90
7474

7575
#if defined(__linux__) || defined(__FreeBSD__) || defined(__ELF__)
7676
#define CNAME(csym) csym
7777
#define HIDENAME(asmsym) .asmsym
78-
#define _ENTRY(x) _START_ENTRY; \
78+
#define _ENTRY(x) .text; _START_ENTRY; \
7979
.globl CNAME(x); .type CNAME(x),@function; CNAME(x):
8080
#define END(x) .size x, . - x
8181
#elif defined(_WIN32)
82+
#ifndef _MSC_VER
83+
#define END(x) .end
84+
#define HEX(Y) 0x#Y
85+
#define _START_ENTRY_WIN .text; _START_ENTRY
86+
#else
87+
#define END(x) end
88+
#define HEX(Y) Y#h
89+
#define _START_ENTRY_WIN .model small; .code; _START_ENTRY
90+
#endif
8291
#define CNAME(csym) _##csym
8392
#define HIDENAME(asmsym) .asmsym
84-
#define _ENTRY(x) _START_ENTRY; \
93+
#define _ENTRY(x) _START_ENTRY_WIN; \
8594
.globl CNAME(x); .section .drectve; .ascii " -export:" #x; \
8695
.section .text; .def CNAME(x); .scl 2; .type 32; .endef; CNAME(x):
87-
#define END(x) .end
8896
#endif
8997

9098
#ifdef PROF

include/cdefs-compat.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#ifndef _CDEFS_COMPAT_H_
22
#define _CDEFS_COMPAT_H_
33

4-
#if defined(_MSC_VER) && !defined(_WIN32)
5-
#define _WIN32
6-
#endif
7-
84
#ifndef _WIN32
95
#include "sys/cdefs.h"
106
#else /* _WIN32 */

include/types-compat.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#ifndef _TYPES_COMPAT_H_
22
#define _TYPES_COMPAT_H_
33

4-
#if defined(_MSC_VER) && !defined(_WIN32)
5-
#define _WIN32
6-
#endif
7-
84
#include <sys/types.h>
95
#include <limits.h>
106
#include <stdint.h>

0 commit comments

Comments
 (0)