From 2d6be5d0771ef3c3ac5d7dac1bdb5b0aab4793c6 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 31 May 2011 13:56:28 +0200 Subject: COMMON: Move more stuff from scummsys.h to portdefs.h --- backends/platform/symbian/src/portdefs.h | 1 + backends/platform/wince/portdefs.h | 60 ++++++++++++++++++-------------- 2 files changed, 35 insertions(+), 26 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/symbian/src/portdefs.h b/backends/platform/symbian/src/portdefs.h index 8ad2fa98f5..86460e65c5 100644 --- a/backends/platform/symbian/src/portdefs.h +++ b/backends/platform/symbian/src/portdefs.h @@ -57,6 +57,7 @@ typedef signed long int int32; // re-define those data types. #define SCUMMVM_DONT_DEFINE_TYPES +#define SMALL_SCREEN_DEVICE #define DISABLE_COMMAND_LINE diff --git a/backends/platform/wince/portdefs.h b/backends/platform/wince/portdefs.h index 64aa80abf2..93df6cd39e 100644 --- a/backends/platform/wince/portdefs.h +++ b/backends/platform/wince/portdefs.h @@ -20,40 +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); -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 -#undef GetCurrentDirectory -extern "C" void GetCurrentDirectory(int len, char *buf); -#define snprintf _snprintf -#define strdup _strdup -#define fopen wce_fopen + #include + #undef GetCurrentDirectory + extern "C" void GetCurrentDirectory(int len, char *buf); + #define snprintf _snprintf + #define strdup _strdup + #define fopen wce_fopen #endif #include @@ -68,7 +75,7 @@ extern "C" void GetCurrentDirectory(int len, char *buf); //#include #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); @@ -77,4 +84,5 @@ void drawError(char *); #define vsnprintf _vsnprintf + #endif -- cgit v1.2.3