[Scummvm-cvs-logs] SF.net SVN: scummvm:[45820] scummvm/trunk

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Nov 10 23:18:41 CET 2009


Revision: 45820
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45820&view=rev
Author:   fingolfin
Date:     2009-11-10 22:18:41 +0000 (Tue, 10 Nov 2009)

Log Message:
-----------
Move definition of stdint types to the only file that needs them (mpeg_player.h)

Modified Paths:
--------------
    scummvm/trunk/common/scummsys.h
    scummvm/trunk/graphics/video/mpeg_player.h

Modified: scummvm/trunk/common/scummsys.h
===================================================================
--- scummvm/trunk/common/scummsys.h	2009-11-10 22:18:12 UTC (rev 45819)
+++ scummvm/trunk/common/scummsys.h	2009-11-10 22:18:41 UTC (rev 45820)
@@ -198,14 +198,6 @@
 	#define SMALL_SCREEN_DEVICE
 	#endif
 
-	// FIXME: It is not the nicest idea to define these types
-	// on our own, since they should be defined in "stdint.h"
-	// for compilers with a C99 library.
-	typedef signed char int8_t;
-	typedef signed short int16_t;
-	typedef unsigned char uint8_t;
-	typedef unsigned short uint16_t;
-
 #elif defined(_MSC_VER)
 
 	#define scumm_stricmp stricmp
@@ -218,29 +210,7 @@
 	#define NORETURN __declspec(noreturn)
 	#define PLUGIN_EXPORT __declspec(dllexport)
 
-	// FIXME: It is not the nicest idea to define these types
-	// on our own, since they should be defined in "stdint.h"
-	// for compilers with a C99 library. Since MSVC does not
-	// supply any C99 headers, we must define these types
-	// on owr own, sadly SDL seems to do the same, but they
-	// define "uint32_t" as "unsigned __int32" and "int32_t"
-	// as "signed __int32", which leads to compilation errors
-	// when this file is included before SDL.h.
-	// We might either switch to the same definitions SDL.h
-	// uses or clean this up in a different way, it seems
-	// the only code relying on these types is the MPEG2
-	// code, so maybe we can move this a bit more locally
-	// to the MPEG2 code.
-	typedef signed char int8_t;
-	typedef signed short int16_t;
-	typedef unsigned char uint8_t;
-	typedef unsigned short uint16_t;
 
-	#if !defined(SDL_COMPILEDVERSION) || (SDL_COMPILEDVERSION < 1210)
-	typedef signed long int32_t;
-	typedef unsigned long uint32_t;
-	#endif
-
 #elif defined(__MINGW32__)
 
 	#define scumm_stricmp stricmp

Modified: scummvm/trunk/graphics/video/mpeg_player.h
===================================================================
--- scummvm/trunk/graphics/video/mpeg_player.h	2009-11-10 22:18:12 UTC (rev 45819)
+++ scummvm/trunk/graphics/video/mpeg_player.h	2009-11-10 22:18:41 UTC (rev 45820)
@@ -34,19 +34,29 @@
 
 #ifdef USE_MPEG2
 
-#ifdef __PLAYSTATION2__
-typedef uint8 uint8_t;
-typedef uint16 uint16_t;
-typedef uint32 uint32_t;
-#endif
-
-#if !defined(_MSC_VER)
-#ifndef PALMOS_MODE
+#if defined(__PLAYSTATION2__
+	typedef uint8 uint8_t;
+	typedef uint16 uint16_t;
+	typedef uint32 uint32_t;
+#elif defined(_WIN32_WCE)
+	typedef signed char int8_t;
+	typedef signed short int16_t;
+	typedef unsigned char uint8_t;
+	typedef unsigned short uint16_t;
+#elif defined(_MSC_VER)
+	typedef signed char int8_t;
+	typedef signed short int16_t;
+	typedef unsigned char uint8_t;
+	typedef unsigned short uint16_t;
+	#if !defined(SDL_COMPILEDVERSION) || (SDL_COMPILEDVERSION < 1210)
+	typedef signed long int32_t;
+	typedef unsigned long uint32_t;
+	#endif
+#elif !defined(PALMOS_MODE)
 #	include <inttypes.h>
 #else
 #	include <stdint.h>
 #endif
-#endif
 
 extern "C" {
 	#include <mpeg2dec/mpeg2.h>


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list