From 0bbb41224939568e4ee0ac5db2837ff4297b2ae8 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 14 May 2011 10:41:17 +0200 Subject: [PATCH] COMMON: RemoveAvoid redundant typedefs if config.h is present --- common/scummsys.h | 91 +++++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 43 deletions(-) diff --git a/common/scummsys.h b/common/scummsys.h index c32d1c352e59..e0cfd377081f 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