add more windows compatibility definitions

This commit is contained in:
Jameson Nash 2014-03-18 21:22:51 -04:00
parent 66e6f8ea91
commit 2eb1876bb8
3 changed files with 12 additions and 12 deletions

View file

@ -70,21 +70,29 @@
/* XXX should use .p2align 4,0x90 for -m486. */
#define _START_ENTRY .text; .p2align 2,0x90
#define _START_ENTRY .p2align 2,0x90
#if defined(__linux__) || defined(__FreeBSD__) || defined(__ELF__)
#define CNAME(csym) csym
#define HIDENAME(asmsym) .asmsym
#define _ENTRY(x) _START_ENTRY; \
#define _ENTRY(x) .text; _START_ENTRY; \
.globl CNAME(x); .type CNAME(x),@function; CNAME(x):
#define END(x) .size x, . - x
#elif defined(_WIN32)
#ifndef _MSC_VER
#define END(x) .end
#define HEX(Y) 0x#Y
#define _START_ENTRY_WIN .text; _START_ENTRY
#else
#define END(x) end
#define HEX(Y) Y#h
#define _START_ENTRY_WIN .model small; .code; _START_ENTRY
#endif
#define CNAME(csym) _##csym
#define HIDENAME(asmsym) .asmsym
#define _ENTRY(x) _START_ENTRY; \
#define _ENTRY(x) _START_ENTRY_WIN; \
.globl CNAME(x); .section .drectve; .ascii " -export:" #x; \
.section .text; .def CNAME(x); .scl 2; .type 32; .endef; CNAME(x):
#define END(x) .end
#endif
#ifdef PROF

View file

@ -1,10 +1,6 @@
#ifndef _CDEFS_COMPAT_H_
#define _CDEFS_COMPAT_H_
#if defined(_MSC_VER) && !defined(_WIN32)
#define _WIN32
#endif
#ifndef _WIN32
#include "sys/cdefs.h"
#else /* _WIN32 */

View file

@ -1,10 +1,6 @@
#ifndef _TYPES_COMPAT_H_
#define _TYPES_COMPAT_H_
#if defined(_MSC_VER) && !defined(_WIN32)
#define _WIN32
#endif
#include <sys/types.h>
#include <limits.h>
#include <stdint.h>