diff options
Diffstat (limited to 'backends/platform/wince/portdefs.h')
-rw-r--r-- | backends/platform/wince/portdefs.h | 64 |
1 files changed, 34 insertions, 30 deletions
diff --git a/backends/platform/wince/portdefs.h b/backends/platform/wince/portdefs.h index 1f8b9bb3ca..93df6cd39e 100644 --- a/backends/platform/wince/portdefs.h +++ b/backends/platform/wince/portdefs.h @@ -20,44 +20,47 @@ * */ -// Missing string/stdlib/assert declarations for WinCE 2.xx +#ifndef WINCE_PORTDEFS_H +#define WINCE_PORTDEFS_H + +#ifndef _WIN32_WCE +#error For use on WinCE only +#endif +// Missing string/stdlib/assert declarations for WinCE 2.xx #if _WIN32_WCE < 300 -void *calloc(size_t n, size_t s); -int isalnum(int c); -int isdigit(int c); -int isprint(int c); -int isspace(int c); -char *strrchr(const char *s, int c); -char *strdup(const char *s); -int _stricmp(const char *string1, const char *string2); -int stricmp(const char *string1, const char *string2); -void assert(void *expression); -void assert(int expression); -long int strtol(const char *nptr, char **endptr, int base); -char *_strdup(const char *s); -char *strpbrk(const char *s, const char *accept); + #define SMALL_SCREEN_DEVICE + + void *calloc(size_t n, size_t s); + int isalnum(int c); + int isdigit(int c); + int isprint(int c); + int isspace(int c); + char *strrchr(const char *s, int c); + char *strdup(const char *s); + void assert(void *expression); + void assert(int expression); + long int strtol(const char *nptr, char **endptr, int base); + char *_strdup(const char *s); + char *strpbrk(const char *s, const char *accept); #endif -#ifdef _WIN32_WCE #ifndef __GNUC__ -void *bsearch(const void *, const void *, size_t, size_t, int (*x)(const void *, const void *)); -char *getcwd(char *buf, int size); -typedef int ptrdiff_t; -void GetCurrentDirectory(int len, char *buf); -#define INVALID_FILE_ATTRIBUTES 0xffffffff + void *bsearch(const void *, const void *, size_t, size_t, int (*x)(const void *, const void *)); + char *getcwd(char *buf, int size); + typedef int ptrdiff_t; + void GetCurrentDirectory(int len, char *buf); + #define INVALID_FILE_ATTRIBUTES 0xffffffff #else -#include <math.h> -#undef GetCurrentDirectory -extern "C" void GetCurrentDirectory(int len, char *buf); -#define stricmp _stricmp -#define strnicmp _strnicmp -#define snprintf _snprintf -#define strdup _strdup -#define fopen wce_fopen + #include <math.h> + #undef GetCurrentDirectory + extern "C" void GetCurrentDirectory(int len, char *buf); + #define snprintf _snprintf + #define strdup _strdup + #define fopen wce_fopen #endif #include <windows.h> @@ -72,7 +75,7 @@ extern "C" void GetCurrentDirectory(int len, char *buf); //#include <direct.h> #ifdef __MINGW32CE__ -void *bsearch(const void *, const void *, size_t, size_t, int (*x)(const void *, const void *)); + void *bsearch(const void *, const void *, size_t, size_t, int (*x)(const void *, const void *)); #endif int remove(const char *path); int _access(const char *path, int mode); @@ -81,4 +84,5 @@ void drawError(char *); #define vsnprintf _vsnprintf + #endif |