Commit 93e5e01f authored by rswindell's avatar rswindell
Browse files

Moved DLLCALL and DLLEXPORT definitions to wrapdll.h.

parent 81ad011a
...@@ -39,29 +39,7 @@ ...@@ -39,29 +39,7 @@
#define _DIRWRAP_H #define _DIRWRAP_H
#include "gen_defs.h" /* ulong */ #include "gen_defs.h" /* ulong */
#include "wrapdll.h" /* DLLEXPORT and DLLCALL */
#if defined(DLLEXPORT)
#undef DLLEXPORT
#endif
#if defined(DLLCALL)
#undef DLLCALL
#endif
#if defined(_WIN32)
#if defined(WRAPPER_DLL)
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT __declspec(dllimport)
#endif
#if defined(__BORLANDC__)
#define DLLCALL __stdcall
#else
#define DLLCALL
#endif
#else /* !_WIN32 */
#define DLLEXPORT
#define DLLCALL
#endif
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
...@@ -127,6 +105,8 @@ extern "C" { ...@@ -127,6 +105,8 @@ extern "C" {
/* POSIX Directory Functions */ /* POSIX Directory Functions */
/*****************************/ /*****************************/
#if defined(_MSC_VER) #if defined(_MSC_VER)
#include <io.h> /* _finddata_t */
/* dirent structure returned by readdir(). /* dirent structure returned by readdir().
*/ */
struct dirent struct dirent
......
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
#ifndef _FILEWRAP_H #ifndef _FILEWRAP_H
#define _FILEWRAP_H #define _FILEWRAP_H
#include "wrapdll.h" /* DLLEXPORT and DLLCALL */
/**********/ /**********/
/* Macros */ /* Macros */
/**********/ /**********/
...@@ -82,29 +84,6 @@ ...@@ -82,29 +84,6 @@
/* Prototypes */ /* Prototypes */
/**************/ /**************/
#if defined(DLLEXPORT)
#undef DLLEXPORT
#endif
#if defined(DLLCALL)
#undef DLLCALL
#endif
#if defined(_WIN32)
#if defined(WRAPPER_DLL)
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT __declspec(dllimport)
#endif
#if defined(__BORLANDC__)
#define DLLCALL __stdcall
#else
#define DLLCALL
#endif
#else /* !_WIN32 */
#define DLLEXPORT
#define DLLCALL
#endif
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#endif #endif
......
...@@ -40,29 +40,7 @@ ...@@ -40,29 +40,7 @@
#include <stdio.h> /* sprintf */ #include <stdio.h> /* sprintf */
#include "gen_defs.h" /* ulong */ #include "gen_defs.h" /* ulong */
#include "wrapdll.h" /* DLLEXPORT and DLLCALL */
#if defined(DLLEXPORT)
#undef DLLEXPORT
#endif
#if defined(DLLCALL)
#undef DLLCALL
#endif
#if defined(_WIN32)
#if defined(WRAPPER_DLL)
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT __declspec(dllimport)
#endif
#if defined(__BORLANDC__)
#define DLLCALL __stdcall
#else
#define DLLCALL
#endif
#else /* !_WIN32 */
#define DLLEXPORT
#define DLLCALL
#endif
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
...@@ -134,7 +112,7 @@ extern "C" { ...@@ -134,7 +112,7 @@ extern "C" {
#if defined(__unix__) #if defined(__unix__)
DLLEXPORT char* DLLCALL strupr(char* str); DLLEXPORT char* DLLCALL strupr(char* str);
DLLEXPORT char* DLLCALL strlwr(char* str); DLLEXPORT char* DLLCALL strlwr(char* str);
DLLEXPORT char* DLLCALL strrev(char* str); DLLEXPORT char* DLLCALL strrev(char* str);
#if !defined(stricmp) #if !defined(stricmp)
#define stricmp(x,y) strcasecmp(x,y) #define stricmp(x,y) strcasecmp(x,y)
#define strnicmp(x,y,z) strncasecmp(x,y,z) #define strnicmp(x,y,z) strncasecmp(x,y,z)
...@@ -147,19 +125,19 @@ extern "C" { ...@@ -147,19 +125,19 @@ extern "C" {
#if defined(_WIN32) #if defined(_WIN32)
#define SLEEP(x) Sleep(x) #define SLEEP(x) Sleep(x)
#define BEEP(freq,dur) Beep(freq,dur) #define BEEP(freq,dur) Beep(freq,dur)
#elif defined(__OS2__) #elif defined(__OS2__)
#define SLEEP(x) DosSleep(x) #define SLEEP(x) DosSleep(x)
#define BEEP(freq,dur) DosBeep(freq,dur) #define BEEP(freq,dur) DosBeep(freq,dur)
#elif defined(__unix__) #elif defined(__unix__)
#define SLEEP(x) usleep(x*1000) #define SLEEP(x) usleep(x*1000)
#define BEEP(freq,dur) unix_beep(freq,dur) #define BEEP(freq,dur) unix_beep(freq,dur)
DLLEXPORT void DLLCALL unix_beep(int freq, int dur); DLLEXPORT void DLLCALL unix_beep(int freq, int dur);
#else /* Unsupported OS */ #else /* Unsupported OS */
...@@ -167,9 +145,7 @@ extern "C" { ...@@ -167,9 +145,7 @@ extern "C" {
#endif #endif
#if defined(__BORLANDC__) DLLEXPORT int DLLCALL xp_random(int);
#define xp_random random
#endif
#if defined(__cplusplus) #if defined(__cplusplus)
} }
......
...@@ -39,29 +39,7 @@ ...@@ -39,29 +39,7 @@
#define _THREADWRAP_H #define _THREADWRAP_H
#include "gen_defs.h" /* HANDLE */ #include "gen_defs.h" /* HANDLE */
#include "wrapdll.h" /* DLLEXPORT and DLLCALL */
#if defined(DLLEXPORT)
#undef DLLEXPORT
#endif
#if defined(DLLCALL)
#undef DLLCALL
#endif
#if defined(_WIN32)
#if defined(WRAPPER_DLL)
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT __declspec(dllimport)
#endif
#if defined(__BORLANDC__)
#define DLLCALL __stdcall
#else
#define DLLCALL
#endif
#else /* !_WIN32 */
#define DLLEXPORT
#define DLLCALL
#endif
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment