make possible DLL CRT (declare CRT funcs as _CRTIMP)
This was SVN commit r481.
This commit is contained in:
parent
1887a82873
commit
f9625ecd00
@ -238,11 +238,22 @@ typedef struct _SYSTEM_POWER_INFORMATION
|
|||||||
|
|
||||||
#include "types.h" // intptr_t
|
#include "types.h" // intptr_t
|
||||||
|
|
||||||
|
|
||||||
|
/* Define _CRTIMP */
|
||||||
|
|
||||||
|
#ifndef _CRTIMP
|
||||||
|
#ifdef _DLL
|
||||||
|
#define _CRTIMP __declspec(dllimport)
|
||||||
|
#else /* ndef _DLL */
|
||||||
|
#define _CRTIMP
|
||||||
|
#endif /* _DLL */
|
||||||
|
#endif /* _CRTIMP */
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
extern intptr_t _get_osfhandle(int);
|
_CRTIMP intptr_t _get_osfhandle(int);
|
||||||
extern int _open_osfhandle(intptr_t, int);
|
_CRTIMP int _open_osfhandle(intptr_t, int);
|
||||||
extern int _open(const char* fn, int mode, ...);
|
_CRTIMP int _open(const char* fn, int mode, ...);
|
||||||
extern int _close(int);
|
_CRTIMP int _close(int);
|
||||||
|
|
||||||
#ifndef NO_WINSOCK
|
#ifndef NO_WINSOCK
|
||||||
extern __declspec(dllimport) int __stdcall WSAStartup(unsigned short, void*);
|
extern __declspec(dllimport) int __stdcall WSAStartup(unsigned short, void*);
|
||||||
|
@ -33,6 +33,17 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Define _CRTIMP */
|
||||||
|
|
||||||
|
#ifndef _CRTIMP
|
||||||
|
#ifdef _DLL
|
||||||
|
#define _CRTIMP __declspec(dllimport)
|
||||||
|
#else /* ndef _DLL */
|
||||||
|
#define _CRTIMP
|
||||||
|
#endif /* _DLL */
|
||||||
|
#endif /* _CRTIMP */
|
||||||
|
|
||||||
//
|
//
|
||||||
// <inttypes.h>
|
// <inttypes.h>
|
||||||
//
|
//
|
||||||
@ -211,7 +222,7 @@ extern int munmap(void* start, size_t len);
|
|||||||
|
|
||||||
#define O_NONBLOCK 0x1000000
|
#define O_NONBLOCK 0x1000000
|
||||||
|
|
||||||
extern int open(const char* fn, int mode, ...);
|
_CRTIMP int open(const char* fn, int mode, ...);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -229,12 +240,12 @@ extern int open(const char* fn, int mode, ...);
|
|||||||
#define read _read
|
#define read _read
|
||||||
#define write _write
|
#define write _write
|
||||||
|
|
||||||
extern int close(int);
|
_CRTIMP int close(int);
|
||||||
extern int access(const char*, int);
|
_CRTIMP int access(const char*, int);
|
||||||
|
|
||||||
extern int chdir(const char*);
|
extern int chdir(const char*);
|
||||||
#define getcwd _getcwd
|
#define getcwd _getcwd
|
||||||
extern char* getcwd(char*, int);
|
_CRTIMP char* getcwd(char*, int);
|
||||||
|
|
||||||
// user tests if available via #ifdef; can't use enum.
|
// user tests if available via #ifdef; can't use enum.
|
||||||
#define _SC_PAGESIZE 1
|
#define _SC_PAGESIZE 1
|
||||||
|
Loading…
Reference in New Issue
Block a user