diff options
-rw-r--r-- | backends/platform/symbian/src/portdefs.h | 1 | ||||
-rw-r--r-- | backends/platform/wince/portdefs.h | 60 | ||||
-rw-r--r-- | common/scummsys.h | 12 |
3 files changed, 36 insertions, 37 deletions
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 <math.h> -#undef GetCurrentDirectory -extern "C" void GetCurrentDirectory(int len, char *buf); -#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> @@ -68,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); @@ -77,4 +84,5 @@ void drawError(char *); #define vsnprintf _vsnprintf + #endif diff --git a/common/scummsys.h b/common/scummsys.h index cc8f3b987a..3000091199 100644 --- a/common/scummsys.h +++ b/common/scummsys.h @@ -225,17 +225,7 @@ // Some more system specific settings. // TODO/FIXME: All of these should be moved to backend specific files (such as portdefs.h) // -#if defined(__SYMBIAN32__) - - #define SMALL_SCREEN_DEVICE - -#elif defined(_WIN32_WCE) - - #if _WIN32_WCE < 300 - #define SMALL_SCREEN_DEVICE - #endif - -#elif defined(DINGUX) +#if defined(DINGUX) // Very BAD hack following, used to avoid triggering an assert in uClibc dingux library // "toupper" when pressing keyboard function keys. |