aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2011-05-14 10:41:17 +0200
committerMax Horn2011-05-14 10:41:17 +0200
commit0bbb41224939568e4ee0ac5db2837ff4297b2ae8 (patch)
treefd5149b8488794878a83f6ebb2ab7d7b7fa73767
parent1568f1956908b3d4375f735129d5c2bf3f3f5b5c (diff)
downloadscummvm-rg350-0bbb41224939568e4ee0ac5db2837ff4297b2ae8.tar.gz
scummvm-rg350-0bbb41224939568e4ee0ac5db2837ff4297b2ae8.tar.bz2
scummvm-rg350-0bbb41224939568e4ee0ac5db2837ff4297b2ae8.zip
COMMON: RemoveAvoid redundant typedefs if config.h is present
-rw-r--r--common/scummsys.h91
1 files changed, 48 insertions, 43 deletions
diff --git a/common/scummsys.h b/common/scummsys.h
index c32d1c352e..e0cfd37708 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -331,66 +331,71 @@
//
// Typedef our system types
//
-#if !defined(HAVE_CONFIG_H) && defined(__SYMBIAN32__)
+#if !defined(HAVE_CONFIG_H)
- // Enable Symbians own datatypes
- // This is done for two reasons
- // a) uint is already defined by Symbians libc component
- // b) Symbian is using its "own" datatyping, and the Scummvm port
- // should follow this to ensure the best compability possible.
- typedef unsigned char byte;
+ #if defined(__SYMBIAN32__)
- typedef unsigned char uint8;
- typedef signed char int8;
+ // Enable Symbians own datatypes
+ // This is done for two reasons
+ // a) uint is already defined by Symbians libc component
+ // b) Symbian is using its "own" datatyping, and the Scummvm port
+ // should follow this to ensure the best compability possible.
+ typedef unsigned char byte;
- typedef unsigned short int uint16;
- typedef signed short int int16;
+ typedef unsigned char uint8;
+ typedef signed char int8;
- typedef unsigned long int uint32;
- typedef signed long int int32;
+ typedef unsigned short int uint16;
+ typedef signed short int int16;
-#elif !defined(HAVE_CONFIG_H) && defined(__GP32__)
+ typedef unsigned long int uint32;
+ typedef signed long int int32;
- // Override typenames. uint is already defined by system header files.
- typedef unsigned char byte;
+ #elif defined(__GP32__)
- typedef unsigned char uint8;
- typedef signed char int8;
+ // Override typenames. uint is already defined by system header files.
+ typedef unsigned char byte;
- typedef unsigned short int uint16;
- typedef signed short int int16;
+ typedef unsigned char uint8;
+ typedef signed char int8;
- typedef unsigned long int uint32;
- typedef signed long int int32;
+ typedef unsigned short int uint16;
+ typedef signed short int int16;
-#elif !defined(HAVE_CONFIG_H) && defined(__N64__)
+ typedef unsigned long int uint32;
+ typedef signed long int int32;
- typedef unsigned char byte;
+ #elif defined(__N64__)
- typedef unsigned char uint8;
- typedef signed char int8;
+ typedef unsigned char byte;
- typedef unsigned short int uint16;
- typedef signed short int int16;
+ typedef unsigned char uint8;
+ typedef signed char int8;
- typedef unsigned int uint32;
- typedef signed int int32;
+ typedef unsigned short int uint16;
+ typedef signed short int int16;
-#elif !defined(HAVE_CONFIG_H) && defined(__DS__)
+ typedef unsigned int uint32;
+ typedef signed int int32;
- // Do nothing, the SDK defines all types we need in nds/ndstypes.h,
- // which we include in our portsdef.h
+ #elif defined(__DS__)
-#else
+ // Do nothing, the SDK defines all types we need in nds/ndstypes.h,
+ // which we include in our portsdef.h
+
+ #else
+
+ typedef unsigned char byte;
+ typedef unsigned char uint8;
+ typedef signed char int8;
+ typedef unsigned short uint16;
+ typedef signed short int16;
+ typedef unsigned int uint32;
+ typedef signed int int32;
+ typedef unsigned int uint;
+
+ #endif
- typedef unsigned char byte;
- typedef unsigned char uint8;
- typedef signed char int8;
- typedef unsigned short uint16;
- typedef signed short int16;
- typedef unsigned int uint32;
- typedef signed int int32;
- typedef unsigned int uint;
#endif
@@ -406,6 +411,6 @@
typedef uint16 OverlayColor;
#endif
-#include "common/forbidden.h"
+#include "common/forbidden.h"
#endif