From 7d89f311b86cd86d5176712e02bba632c2f40a37 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 3 Nov 2015 22:05:59 +0100 Subject: [PATCH] Take out some unnecessary defines --- Makefile | 2 +- Makefile.prboomdata | 2 +- libmad/config.h | 9 --------- libmad/fixed.h | 7 ------- libmad/mad.h | 9 --------- libmad/msvc++/config.h | 9 --------- libmad/msvc++/mad.h | 11 ----------- libretro/jni/Android.mk | 2 +- libretro/msvc/msvc-2003-xbox1/msvc-2003-xbox1.vcproj | 8 ++++---- libretro/msvc/msvc-2010-360/msvc-2010-360.vcxproj | 12 ++++++------ libretro/msvc/msvc-2010/msvc-2010.vcxproj | 2 +- src/config.h | 3 --- 12 files changed, 14 insertions(+), 62 deletions(-) diff --git a/Makefile b/Makefile index b1c3e0d..d6e94a3 100644 --- a/Makefile +++ b/Makefile @@ -207,7 +207,7 @@ include Makefile.common OBJECTS = $(SOURCES_C:.c=.o) -DEFINES = -DHAVE_INTTYPES_H -D__LIBRETRO__ -DHAVE_MEMORY_H -DINLINE=inline -DFPM_DEFAULT -DSIZEOF_INT=4 -DFRONTEND_SUPPORTS_RGB565 +DEFINES = -D__LIBRETRO__ -DINLINE=inline -DFPM_DEFAULT -DFRONTEND_SUPPORTS_RGB565 ifeq ($(platform), sncps3) WARNINGS_DEFINES = diff --git a/Makefile.prboomdata b/Makefile.prboomdata index 6e53f43..28d042f 100644 --- a/Makefile.prboomdata +++ b/Makefile.prboomdata @@ -35,7 +35,7 @@ endif OBJECTS = data/rd_graphic.o data/rd_output.o data/rd_palette.o data/rd_sound.o data/rd_util.o data/rd_main.o INCLUDES = -I. -I.. -Idata -DEFINES = -DHAVE_INTTYPES_H -D__LIBRETRO__ -DINLINE=inline +DEFINES = -D__LIBRETRO__ -DINLINE=inline WARNINGS_DEFINES = -Wall -W -Wno-unused-parameter CODE_DEFINES = -fomit-frame-pointer -std=gnu99 diff --git a/libmad/config.h b/libmad/config.h index 70290c2..2ec3562 100644 --- a/libmad/config.h +++ b/libmad/config.h @@ -1,9 +1,6 @@ /* config.h. Generated by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 @@ -13,9 +10,6 @@ /* Define if your MIPS CPU supports a 2-operand MADD instruction. */ /* #undef HAVE_MADD_ASM */ -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -55,9 +49,6 @@ /* Define to the version of this package. */ #define PACKAGE_VERSION "0.15.1b" -/* The size of a `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 diff --git a/libmad/fixed.h b/libmad/fixed.h index fa6f05c..4176779 100644 --- a/libmad/fixed.h +++ b/libmad/fixed.h @@ -22,17 +22,10 @@ # ifndef LIBMAD_FIXED_H # define LIBMAD_FIXED_H -# if SIZEOF_INT >= 4 typedef signed int mad_fixed_t; typedef signed int mad_fixed64hi_t; typedef unsigned int mad_fixed64lo_t; -# else -typedef signed long mad_fixed_t; - -typedef signed long mad_fixed64hi_t; -typedef unsigned long mad_fixed64lo_t; -# endif # if defined(_MSC_VER) # define mad_fixed64_t signed __int64 diff --git a/libmad/mad.h b/libmad/mad.h index cc82aa6..4847eee 100644 --- a/libmad/mad.h +++ b/libmad/mad.h @@ -22,8 +22,6 @@ # define FPM_INTEL -# define SIZEOF_INT 4 - /* Id: version.h,v 1.26 2004/01/23 09:41:33 rob Exp */ # ifndef LIBMAD_VERSION_H @@ -58,17 +56,10 @@ extern char const mad_build[]; # ifndef LIBMAD_FIXED_H # define LIBMAD_FIXED_H -# if SIZEOF_INT >= 4 typedef signed int mad_fixed_t; typedef signed int mad_fixed64hi_t; typedef unsigned int mad_fixed64lo_t; -# else -typedef signed long mad_fixed_t; - -typedef signed long mad_fixed64hi_t; -typedef unsigned long mad_fixed64lo_t; -# endif # if defined(_MSC_VER) # define mad_fixed64_t signed __int64 diff --git a/libmad/msvc++/config.h b/libmad/msvc++/config.h index d0dba25..9f01b37 100644 --- a/libmad/msvc++/config.h +++ b/libmad/msvc++/config.h @@ -1,9 +1,6 @@ /* config.h. Generated by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 @@ -13,9 +10,6 @@ /* Define if your MIPS CPU supports a 2-operand MADD instruction. */ /* #undef HAVE_MADD_ASM */ -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -55,9 +49,6 @@ /* Define to the version of this package. */ #define PACKAGE_VERSION "0.15.1b" -/* The size of a `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 diff --git a/libmad/msvc++/mad.h b/libmad/msvc++/mad.h index e555c35..157338f 100644 --- a/libmad/msvc++/mad.h +++ b/libmad/msvc++/mad.h @@ -22,10 +22,6 @@ # define FPM_INTEL - - -# define SIZEOF_INT 4 - /* Id: version.h,v 1.24 2003/05/27 22:40:37 rob Exp */ # ifndef LIBMAD_VERSION_H @@ -60,17 +56,10 @@ extern char const mad_build[]; # ifndef LIBMAD_FIXED_H # define LIBMAD_FIXED_H -# if SIZEOF_INT >= 4 typedef signed int mad_fixed_t; typedef signed int mad_fixed64hi_t; typedef unsigned int mad_fixed64lo_t; -# else -typedef signed long mad_fixed_t; - -typedef signed long mad_fixed64hi_t; -typedef unsigned long mad_fixed64lo_t; -# endif # if defined(_MSC_VER) # define mad_fixed64_t signed __int64 diff --git a/libretro/jni/Android.mk b/libretro/jni/Android.mk index 32733f9..6b066fe 100644 --- a/libretro/jni/Android.mk +++ b/libretro/jni/Android.mk @@ -24,6 +24,6 @@ include $(ROOT_DIR)/Makefile.common LOCAL_SRC_FILES = $(SOURCES_C) -LOCAL_CFLAGS += -O3 -DHAVE_LIBMAD -DMUSIC_SUPPORT -DINLINE=inline -DHAVE_INTTYPES_H -DHAVE_MEMORY_H -D__LIBRETRO__ -DFPM_DEFAULT -DSIZEOF_INT=4 -DFRONTEND_SUPPORTS_RGB565 +LOCAL_CFLAGS += -O3 -DHAVE_LIBMAD -DMUSIC_SUPPORT -DINLINE=inline -D__LIBRETRO__ -DFPM_DEFAULT -DFRONTEND_SUPPORTS_RGB565 include $(BUILD_SHARED_LIBRARY) diff --git a/libretro/msvc/msvc-2003-xbox1/msvc-2003-xbox1.vcproj b/libretro/msvc/msvc-2003-xbox1/msvc-2003-xbox1.vcproj index 1aa77a3..2729e02 100644 --- a/libretro/msvc/msvc-2003-xbox1/msvc-2003-xbox1.vcproj +++ b/libretro/msvc/msvc-2003-xbox1/msvc-2003-xbox1.vcproj @@ -22,7 +22,7 @@ Optimization="0" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-2003-xbox1"" - PreprocessorDefinitions="_DEBUG;_XBOX;_LIB;HAVE_LIBMAD;MUSIC_SUPPORT;HAVE_INTTYPES_H;INLINE=_inline;__LIBRETRO__;FRONTEND_SUPPORTS_RGB565;HAVE_MEMORY_H;FPM_DEFAULT;SIZEOF_INT=4;_XBOX1" + PreprocessorDefinitions="_DEBUG;_XBOX;_LIB;HAVE_LIBMAD;MUSIC_SUPPORT;INLINE=_inline;__LIBRETRO__;FRONTEND_SUPPORTS_RGB565;FPM_DEFAULT;_XBOX1" MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -91,7 +91,7 @@ OmitFramePointers="TRUE" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-2003-xbox1"" - PreprocessorDefinitions="NDEBUG;_XBOX;PROFILE;FASTCAP;_LIB;HAVE_LIBMAD;MUSIC_SUPPORT;HAVE_INTTYPES_H;INLINE=_inline;__LIBRETRO__;FRONTEND_SUPPORTS_RGB565;HAVE_MEMORY_H;FPM_DEFAULT;SIZEOF_INT=4;_XBOX1" + PreprocessorDefinitions="NDEBUG;_XBOX;PROFILE;FASTCAP;_LIB;HAVE_LIBMAD;MUSIC_SUPPORT;INLINE=_inline;__LIBRETRO__;FRONTEND_SUPPORTS_RGB565;FPM_DEFAULT;_XBOX1" StringPooling="TRUE" RuntimeLibrary="0" BufferSecurityCheck="TRUE" @@ -127,7 +127,7 @@ OmitFramePointers="TRUE" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-2003-xbox1"" - PreprocessorDefinitions="NDEBUG;_XBOX;_LIB;HAVE_LIBMAD;MUSIC_SUPPORT;HAVE_INTTYPES_H;INLINE=_inline;__LIBRETRO__;FRONTEND_SUPPORTS_RGB565;HAVE_MEMORY_H;FPM_DEFAULT;SIZEOF_INT=4;_XBOX1" + PreprocessorDefinitions="NDEBUG;_XBOX;_LIB;HAVE_LIBMAD;MUSIC_SUPPORT;INLINE=_inline;__LIBRETRO__;FRONTEND_SUPPORTS_RGB565;FPM_DEFAULT;_XBOX1" StringPooling="TRUE" RuntimeLibrary="0" BufferSecurityCheck="TRUE" @@ -163,7 +163,7 @@ OmitFramePointers="TRUE" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-2003-xbox1"" - PreprocessorDefinitions="NDEBUG;_XBOX;LTCG;_LIB;HAVE_LIBMAD;MUSIC_SUPPORT;HAVE_INTTYPES_H;INLINE=_inline;__LIBRETRO__;FRONTEND_SUPPORTS_RGB565;HAVE_MEMORY_H;FPM_DEFAULT;SIZEOF_INT=4;_XBOX1" + PreprocessorDefinitions="NDEBUG;_XBOX;LTCG;_LIB;HAVE_LIBMAD;MUSIC_SUPPORT;INLINE=_inline;__LIBRETRO__;FRONTEND_SUPPORTS_RGB565;FPM_DEFAULT;_XBOX1" StringPooling="TRUE" RuntimeLibrary="0" BufferSecurityCheck="TRUE" diff --git a/libretro/msvc/msvc-2010-360/msvc-2010-360.vcxproj b/libretro/msvc/msvc-2010-360/msvc-2010-360.vcxproj index 0755bdc..dcc1f20 100644 --- a/libretro/msvc/msvc-2010-360/msvc-2010-360.vcxproj +++ b/libretro/msvc/msvc-2010-360/msvc-2010-360.vcxproj @@ -769,7 +769,7 @@ false $(OutDir)$(ProjectName).pch MultiThreadedDebug - _DEBUG;_XBOX;_XBOX360;_LIB;%(PreprocessorDefinitions);HAVE_LIBMAD;MUSIC_SUPPORT;HAVE_INTTYPES_H;__LIBRETRO__;HAVE_MEMORY_H;INLINE=_inline;FPM_DEFAULT;SIZEOF_INT=4;FRONTEND_SUPPORTS_RGB565 + _DEBUG;_XBOX;_XBOX360;_LIB;%(PreprocessorDefinitions);HAVE_LIBMAD;MUSIC_SUPPORT;__LIBRETRO__;INLINE=_inline;FPM_DEFAULT;FRONTEND_SUPPORTS_RGB565 Callcap src;src/libretro;libmad;%(AdditionalIncludeDirectories) @@ -789,7 +789,7 @@ false $(OutDir)$(ProjectName).pch MultiThreadedDebug - _DEBUG;_XBOX;_XBOX360;_LIB;%(PreprocessorDefinitions);HAVE_LIBMAD;MUSIC_SUPPORT;HAVE_INTTYPES_H;__LIBRETRO__;HAVE_MEMORY_H;INLINE=_inline;FPM_DEFAULT;SIZEOF_INT=4;FRONTEND_SUPPORTS_RGB565 + _DEBUG;_XBOX;_XBOX360;_LIB;%(PreprocessorDefinitions);HAVE_LIBMAD;MUSIC_SUPPORT;__LIBRETRO__;INLINE=_inline;FPM_DEFAULT;FRONTEND_SUPPORTS_RGB565 Callcap src;src/libretro;libmad;%(AdditionalIncludeDirectories) @@ -810,7 +810,7 @@ false $(OutDir)$(ProjectName).pch MultiThreaded - NDEBUG;_XBOX;_XBOX360;PROFILE;_LIB;%(PreprocessorDefinitions);HAVE_LIBMAD;MUSIC_SUPPORT;HAVE_INTTYPES_H;__LIBRETRO__;HAVE_MEMORY_H;INLINE=_inline;FPM_DEFAULT;SIZEOF_INT=4;FRONTEND_SUPPORTS_RGB565 + NDEBUG;_XBOX;_XBOX360;PROFILE;_LIB;%(PreprocessorDefinitions);HAVE_LIBMAD;MUSIC_SUPPORT;__LIBRETRO__;INLINE=_inline;FPM_DEFAULT;FRONTEND_SUPPORTS_RGB565 Callcap src;src/libretro;libmad;%(AdditionalIncludeDirectories) @@ -835,7 +835,7 @@ false $(OutDir)$(ProjectName).pch MultiThreaded - NDEBUG;_XBOX;_XBOX360;PROFILE;FASTCAP;_LIB;%(PreprocessorDefinitions);HAVE_LIBMAD;MUSIC_SUPPORT;HAVE_INTTYPES_H;__LIBRETRO__;HAVE_MEMORY_H;INLINE=_inline;FPM_DEFAULT;SIZEOF_INT=4;FRONTEND_SUPPORTS_RGB565 + NDEBUG;_XBOX;_XBOX360;PROFILE;FASTCAP;_LIB;%(PreprocessorDefinitions);HAVE_LIBMAD;MUSIC_SUPPORT;__LIBRETRO__;INLINE=_inline;FPM_DEFAULT;FRONTEND_SUPPORTS_RGB565 src;src/libretro;libmad;%(AdditionalIncludeDirectories) @@ -857,7 +857,7 @@ false $(OutDir)$(ProjectName).pch MultiThreaded - NDEBUG;_XBOX;_XBOX360;_LIB;%(PreprocessorDefinitions);HAVE_LIBMAD;MUSIC_SUPPORT;HAVE_INTTYPES_H;HAVE_STDINT_H;__LIBRETRO__;HAVE_MEMORY_H;INLINE=_inline;FPM_DEFAULT;SIZEOF_INT=4;FRONTEND_SUPPORTS_RGB565 + NDEBUG;_XBOX;_XBOX360;_LIB;%(PreprocessorDefinitions);HAVE_LIBMAD;MUSIC_SUPPORT;HAVE_STDINT_H;__LIBRETRO__;INLINE=_inline;FPM_DEFAULT;FRONTEND_SUPPORTS_RGB565 src;src/libretro;libmad;%(AdditionalIncludeDirectories) @@ -879,7 +879,7 @@ false $(OutDir)$(ProjectName).pch MultiThreaded - NDEBUG;_XBOX;_XBOX360;LTCG;_LIB;%(PreprocessorDefinitions);HAVE_LIBMAD;MUSIC_SUPPORT;HAVE_INTTYPES_H;__LIBRETRO__;HAVE_MEMORY_H;INLINE=_inline;FPM_DEFAULT;SIZEOF_INT=4;FRONTEND_SUPPORTS_RGB565 + NDEBUG;_XBOX;_XBOX360;LTCG;_LIB;%(PreprocessorDefinitions);HAVE_LIBMAD;MUSIC_SUPPORT;__LIBRETRO__;INLINE=_inline;FPM_DEFAULT;FRONTEND_SUPPORTS_RGB565 src;src/libretro;libmad;%(AdditionalIncludeDirectories) diff --git a/libretro/msvc/msvc-2010/msvc-2010.vcxproj b/libretro/msvc/msvc-2010/msvc-2010.vcxproj index b9c1da1..8f1a2da 100644 --- a/libretro/msvc/msvc-2010/msvc-2010.vcxproj +++ b/libretro/msvc/msvc-2010/msvc-2010.vcxproj @@ -68,7 +68,7 @@ MaxSpeed true true - HAVE_LIBMAD;MUSIC_SUPPORT;_WIN32;HAVE_INTTYPES_H;HAVE_STRLWR;__LIBRETRO__;FRONTEND_SUPPORTS_RGB565;HAVE_MEMORY_H;INLINE=_inline;FPM_DEFAULT;SIZEOF_INT=4;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS + HAVE_LIBMAD;MUSIC_SUPPORT;_WIN32;HAVE_STRLWR;__LIBRETRO__;FRONTEND_SUPPORTS_RGB565;INLINE=_inline;FPM_DEFAULT;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS Windows diff --git a/src/config.h b/src/config.h index 20d251e..d3ac74d 100644 --- a/src/config.h +++ b/src/config.h @@ -23,9 +23,6 @@ extern int SCREENHEIGHT; #define HAVE_STRLWR #endif -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - #ifdef HAVE_NET /* Define to 1 if you have the `inet_aton' function. */