From 7472922ee0f8ba5ff43255072253cbea60060c84 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 21 Oct 2014 07:58:58 +0200 Subject: [PATCH] Move compat/ over to libretro SDK --- Makefile.common | 4 +- audio/dsp_filter.c | 2 +- audio/resamplers/sinc.c | 4 +- audio/xaudio-c/xaudio-c.cpp | 2 +- camera/video4linux2.c | 2 +- cheats.c | 4 +- compat/apple_compat.h | 37 ---------- compat/compat_fnmatch.h | 30 -------- compat/compat_getopt.h | 66 ----------------- compat/msvc_compat.h | 74 ------------------- compat/posix_string.h | 53 ------------- compat/strcasestr.h | 50 ------------- compat/strl.h | 50 ------------- conf/config_file.c | 6 +- core_options.c | 4 +- dir_list.c | 4 +- driver.h | 2 +- dynamic.c | 4 +- file_extract.c | 2 +- file_list.c | 4 +- file_path.c | 4 +- frontend/menu/disp/glui.c | 2 +- frontend/menu/disp/lakka.c | 2 +- frontend/menu/disp/rgui.c | 2 +- frontend/menu/disp/xmb.c | 2 +- gfx/fonts/bitmapfont.c | 1 - gfx/gl.c | 2 +- gfx/py_state/py_state.c | 4 +- gfx/shader/shader_gl_cg.c | 4 +- gfx/shader/shader_glsl.c | 4 +- gfx/shader/shader_null.c | 4 +- gfx/shader/shader_parse.c | 6 +- gfx/state_tracker.c | 2 +- hash.h | 2 +- input/overlay.c | 2 +- {compat => libretro-sdk/compat}/compat.c | 10 +-- .../compat}/compat_fnmatch.c | 2 +- logger/xdk1_logger_override.h | 2 +- miscellaneous.h | 2 +- patch.c | 2 +- playlist.c | 2 +- ps3/gcmgl/src/rgl_ps3_cg.cpp | 2 +- record/ffmpeg.c | 2 +- retroarch.c | 6 +- screenshot.c | 2 +- settings.c | 4 +- string_list.c | 4 +- tools/retroarch-joyconfig.c | 4 +- 48 files changed, 64 insertions(+), 427 deletions(-) delete mode 100644 compat/apple_compat.h delete mode 100644 compat/compat_fnmatch.h delete mode 100644 compat/compat_getopt.h delete mode 100644 compat/msvc_compat.h delete mode 100644 compat/posix_string.h delete mode 100644 compat/strcasestr.h delete mode 100644 compat/strl.h rename {compat => libretro-sdk/compat}/compat.c (98%) rename {compat => libretro-sdk/compat}/compat_fnmatch.c (99%) diff --git a/Makefile.common b/Makefile.common index 492d3d4736..e5132a22c3 100644 --- a/Makefile.common +++ b/Makefile.common @@ -115,7 +115,7 @@ OBJ += frontend/frontend.o \ patch.o \ fifo_buffer.o \ core_options.o \ - compat/compat.o \ + libretro-sdk/compat/compat.o \ cheats.o \ core_info.o \ conf/config_file.o \ @@ -633,5 +633,5 @@ JOYCONFIG_OBJ += tools/retroarch-joyconfig.o \ conf/config_file.o \ file_path.o \ string_list.o \ - compat/compat.o \ + libretro-sdk/compat/compat.o \ tools/input_common_joyconfig.o diff --git a/audio/dsp_filter.c b/audio/dsp_filter.c index 697f509124..22bf59a8f7 100644 --- a/audio/dsp_filter.c +++ b/audio/dsp_filter.c @@ -22,7 +22,7 @@ #include "filters/dspfilter.h" #include "../file_path.h" #include "../file_ext.h" -#include "../compat/posix_string.h" +#include #include diff --git a/audio/resamplers/sinc.c b/audio/resamplers/sinc.c index 24b0351168..edafb8da9a 100644 --- a/audio/resamplers/sinc.c +++ b/audio/resamplers/sinc.c @@ -24,9 +24,7 @@ #include #include #include -#ifdef _WIN32 -#include "../../compat/msvc_compat.h" -#endif +#include #if !defined(RESAMPLER_TEST) && defined(RARCH_INTERNAL) #include "../../general.h" diff --git a/audio/xaudio-c/xaudio-c.cpp b/audio/xaudio-c/xaudio-c.cpp index b899a90783..9d98d36520 100644 --- a/audio/xaudio-c/xaudio-c.cpp +++ b/audio/xaudio-c/xaudio-c.cpp @@ -20,7 +20,7 @@ #include "xaudio-c.h" #include #include -#include "../../compat/msvc_compat.h" +#include #include #define MAX_BUFFERS 16 diff --git a/camera/video4linux2.c b/camera/video4linux2.c index 72d4347492..869e968dfd 100644 --- a/camera/video4linux2.c +++ b/camera/video4linux2.c @@ -34,7 +34,7 @@ #include #include #include -#include "../compat/strl.h" +#include #include #include diff --git a/cheats.c b/cheats.c index d9e70fdecd..9a23d7eb44 100644 --- a/cheats.c +++ b/cheats.c @@ -17,8 +17,8 @@ #include "hash.h" #include "dynamic.h" #include "general.h" -#include "compat/strl.h" -#include "compat/posix_string.h" +#include +#include #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/compat/apple_compat.h b/compat/apple_compat.h deleted file mode 100644 index 90cfda8ac2..0000000000 --- a/compat/apple_compat.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2010-2014 The RetroArch team - * - * --------------------------------------------------------------------------------------- - * The following license statement only applies to this file (apple_compat.h). - * --------------------------------------------------------------------------------------- - * - * Permission is hereby granted, free of charge, - * to any person obtaining a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifdef IOS -#import - -#ifndef __IPHONE_5_0 -#warning "This project uses features only available in iOS SDK 5.0 and later." -#endif - -#ifdef __OBJC__ - #import - #import - #import - - #import -#endif -#endif diff --git a/compat/compat_fnmatch.h b/compat/compat_fnmatch.h deleted file mode 100644 index b3693bd0c0..0000000000 --- a/compat/compat_fnmatch.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 2010-2014 The RetroArch team - * - * --------------------------------------------------------------------------------------- - * The following license statement only applies to this file (compat_fnmatch.h). - * --------------------------------------------------------------------------------------- - * - * Permission is hereby granted, free of charge, - * to any person obtaining a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef __LIBRETRO_SDK_COMPAT_FNMATCH_H__ -#define __LIBRETRO_SDK_COMPAT_FNMATCH_H__ - -#define FNM_NOMATCH 1 - -int rl_fnmatch(const char *pattern, const char *string, int flags); - -#endif diff --git a/compat/compat_getopt.h b/compat/compat_getopt.h deleted file mode 100644 index 8d6cc5529c..0000000000 --- a/compat/compat_getopt.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (C) 2010-2014 The RetroArch team - * - * --------------------------------------------------------------------------------------- - * The following license statement only applies to this file (compat_getopt.h). - * --------------------------------------------------------------------------------------- - * - * Permission is hereby granted, free of charge, - * to any person obtaining a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef __LIBRETRO_SDK_COMPAT_GETOPT_H -#define __LIBRETRO_SDK_COMPAT_GETOPT_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -/* Custom implementation of the GNU getopt_long for portability. - * Not designed to be fully compatible, but compatible with - * the features RetroArch uses. */ - -#ifdef HAVE_GETOPT_LONG -#include -#else -/* Avoid possible naming collisions during link since we - * prefer to use the actual name. */ -#define getopt_long(argc, argv, optstring, longopts, longindex) __getopt_long_rarch(argc, argv, optstring, longopts, longindex) - -#ifdef __cplusplus -extern "C" { -#endif - -struct option -{ - const char *name; - int has_arg; - int *flag; - int val; -}; - -/* argv[] is declared with char * const argv[] in GNU, - * but this makes no sense, as non-POSIX getopt_long - * mutates argv (non-opts are moved to the end). */ -int getopt_long(int argc, char *argv[], - const char *optstring, const struct option *longopts, int *longindex); -extern char *optarg; -extern int optind, opterr, optopt; -#ifdef __cplusplus -} -#endif -#endif - -#endif - diff --git a/compat/msvc_compat.h b/compat/msvc_compat.h deleted file mode 100644 index c3593bb06c..0000000000 --- a/compat/msvc_compat.h +++ /dev/null @@ -1,74 +0,0 @@ -/* Copyright (C) 2010-2014 The RetroArch team - * - * --------------------------------------------------------------------------------------- - * The following license statement only applies to this file (msvc_compat.h). - * --------------------------------------------------------------------------------------- - * - * Permission is hereby granted, free of charge, - * to any person obtaining a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef __LIBRETRO_SDK_COMPAT_MSVC_H -#define __LIBRETRO_SDK_COMPAT_MSVC_H - -#ifdef _MSC_VER - -#undef UNICODE /* Do not bother with UNICODE at this time. */ -#include -#include -#include - -/* Python headers defines ssize_t and sets HAVE_SSIZE_T. - * Cannot duplicate these efforts. - */ -#ifndef HAVE_SSIZE_T -#if defined(_WIN64) -typedef __int64 ssize_t; -#elif defined(_WIN32) -typedef int ssize_t; -#endif -#endif - -#define mkdir(dirname, unused) _mkdir(dirname) -#define snprintf _snprintf -#define strtoull _strtoui64 -#undef strcasecmp -#define strcasecmp _stricmp -#undef strncasecmp -#define strncasecmp _strnicmp - -/* Disable some of the annoying warnings. */ -#pragma warning(disable : 4800) -#pragma warning(disable : 4805) -#pragma warning(disable : 4244) -#pragma warning(disable : 4305) -#pragma warning(disable : 4146) -#pragma warning(disable : 4267) -#pragma warning(disable : 4723) -#pragma warning(disable : 4996) - -#define roundf(in) (in >= 0.0f ? floorf(in + 0.5f) : ceilf(in - 0.5f)) - -#ifndef PATH_MAX -#define PATH_MAX _MAX_PATH -#endif - -#ifndef SIZE_MAX -#define SIZE_MAX _UI32_MAX -#endif - -#endif -#endif - diff --git a/compat/posix_string.h b/compat/posix_string.h deleted file mode 100644 index c49879cdef..0000000000 --- a/compat/posix_string.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 2010-2014 The RetroArch team - * - * --------------------------------------------------------------------------------------- - * The following license statement only applies to this file (posix_string.h). - * --------------------------------------------------------------------------------------- - * - * Permission is hereby granted, free of charge, - * to any person obtaining a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef __LIBRETRO_SDK_COMPAT_POSIX_STRING_H -#define __LIBRETRO_SDK_COMPAT_POSIX_STRING_H - -#ifdef _WIN32 - -#include "msvc_compat.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#undef strcasecmp -#undef strdup -#undef isblank -#undef strtok_r -#define strcasecmp(a, b) rarch_strcasecmp__(a, b) -#define strdup(orig) rarch_strdup__(orig) -#define isblank(c) rarch_isblank__(c) -#define strtok_r(str, delim, saveptr) rarch_strtok_r__(str, delim, saveptr) -int strcasecmp(const char *a, const char *b); -char *strdup(const char *orig); -int isblank(int c); -char *strtok_r(char *str, const char *delim, char **saveptr); - -#ifdef __cplusplus -} -#endif - -#endif -#endif - diff --git a/compat/strcasestr.h b/compat/strcasestr.h deleted file mode 100644 index 543b05822a..0000000000 --- a/compat/strcasestr.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2010-2014 The RetroArch team - * - * --------------------------------------------------------------------------------------- - * The following license statement only applies to this file (strcasestr.h). - * --------------------------------------------------------------------------------------- - * - * Permission is hereby granted, free of charge, - * to any person obtaining a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef __LIBRETRO_SDK_COMPAT_STRCASESTR_H -#define __LIBRETRO_SDK_COMPAT_STRCASESTR_H - -#include - -#ifdef HAVE_CONFIG_H -#include "../config.h" -#endif - -#ifndef HAVE_STRCASESTR - -#ifdef __cplusplus -extern "C" { -#endif - -/* Avoid possible naming collisions during link - * since we prefer to use the actual name. */ -#define strcasestr(haystack, needle) strcasestr_rarch__(haystack, needle) - -char *strcasestr(const char *haystack, const char *needle); - -#ifdef __cplusplus -} -#endif -#endif - -#endif - diff --git a/compat/strl.h b/compat/strl.h deleted file mode 100644 index 2e274e48d6..0000000000 --- a/compat/strl.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2010-2014 The RetroArch team - * - * --------------------------------------------------------------------------------------- - * The following license statement only applies to this file (strl.h). - * --------------------------------------------------------------------------------------- - * - * Permission is hereby granted, free of charge, - * to any person obtaining a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef __LIBRETRO_SDK_COMPAT_STRL_H -#define __LIBRETRO_SDK_COMPAT_STRL_H - -#include -#include - -#ifdef HAVE_CONFIG_H -#include "../config.h" -#endif - -#ifndef HAVE_STRL - -#ifdef __cplusplus -extern "C" { -#endif -/* Avoid possible naming collisions during link since - * we prefer to use the actual name. */ -#define strlcpy(dst, src, size) strlcpy_rarch__(dst, src, size) -#define strlcat(dst, src, size) strlcat_rarch__(dst, src, size) - -size_t strlcpy(char *dest, const char *source, size_t size); -size_t strlcat(char *dest, const char *source, size_t size); -#ifdef __cplusplus -} -#endif -#endif -#endif - diff --git a/conf/config_file.c b/conf/config_file.c index 8f801c4919..53109d63f4 100644 --- a/conf/config_file.c +++ b/conf/config_file.c @@ -19,9 +19,9 @@ #include #include #include -#include "../compat/strl.h" -#include "../compat/posix_string.h" -#include "../compat/msvc_compat.h" +#include +#include +#include #include "../file.h" #include "../file_path.h" #include "../general.h" diff --git a/core_options.c b/core_options.c index d8f71e4808..8153b63b9e 100644 --- a/core_options.c +++ b/core_options.c @@ -18,8 +18,8 @@ #include "conf/config_file.h" #include "file.h" #include "dir_list.h" -#include "compat/posix_string.h" -#include "compat/strl.h" +#include +#include struct core_option { diff --git a/dir_list.c b/dir_list.c index 955c59f9b6..16d8f5eb3d 100644 --- a/dir_list.c +++ b/dir_list.c @@ -16,13 +16,13 @@ #include "dir_list.h" #include "file_path.h" -#include "compat/strl.h" +#include +#include #if defined(_WIN32) #ifdef _MSC_VER #define setmode _setmode #endif -#include "compat/msvc_compat.h" #ifdef _XBOX #include #define INVALID_FILE_ATTRIBUTES -1 diff --git a/driver.h b/driver.h index a93d1b1b1c..a75dea49d5 100644 --- a/driver.h +++ b/driver.h @@ -23,7 +23,7 @@ #include "libretro_private.h" #include #include -#include "compat/msvc_compat.h" +#include #include "gfx/scaler/scaler.h" #include "gfx/image/image.h" #include "gfx/filters/softfilter.h" diff --git a/dynamic.c b/dynamic.c index 09369a510d..78f0131b7e 100644 --- a/dynamic.c +++ b/dynamic.c @@ -15,8 +15,8 @@ #include "dynamic.h" #include "general.h" -#include "compat/strl.h" -#include "compat/posix_string.h" +#include +#include #include "retroarch_logger.h" #include "performance.h" #include "file.h" diff --git a/file_extract.c b/file_extract.c index eee8e7c2fc..87ff73bde7 100644 --- a/file_extract.c +++ b/file_extract.c @@ -17,7 +17,7 @@ #include "file.h" #include "file_path.h" #include "string_list.h" -#include "compat/strl.h" +#include #include "general.h" #include #include diff --git a/file_list.c b/file_list.c index 90cefe3b40..eb5c4691eb 100644 --- a/file_list.c +++ b/file_list.c @@ -17,8 +17,8 @@ #include #include #include "file_list.h" -#include "compat/strcasestr.h" -#include "compat/msvc_compat.h" +#include +#include void file_list_push(file_list_t *list, const char *path, const char *label, diff --git a/file_path.c b/file_path.c index 45ffb49b7a..65d65e8714 100644 --- a/file_path.c +++ b/file_path.c @@ -20,8 +20,8 @@ #include #include #include -#include "compat/strl.h" -#include "compat/posix_string.h" +#include +#include #include "miscellaneous.h" #ifdef __HAIKU__ diff --git a/frontend/menu/disp/glui.c b/frontend/menu/disp/glui.c index 1cf7ca1e1e..d0baab3081 100644 --- a/frontend/menu/disp/glui.c +++ b/frontend/menu/disp/glui.c @@ -29,7 +29,7 @@ #include "../../../file_path.h" #include "../../../gfx/gl_common.h" #include "../../../gfx/video_thread_wrapper.h" -#include "../../../compat/posix_string.h" +#include #include "../../../settings_data.h" diff --git a/frontend/menu/disp/lakka.c b/frontend/menu/disp/lakka.c index 886d61da2e..9ee3c73a93 100644 --- a/frontend/menu/disp/lakka.c +++ b/frontend/menu/disp/lakka.c @@ -29,7 +29,7 @@ #include "../../../file_path.h" #include "../../../gfx/gl_common.h" #include "../../../gfx/video_thread_wrapper.h" -#include "../../../compat/posix_string.h" +#include #include "../../../settings_data.h" diff --git a/frontend/menu/disp/rgui.c b/frontend/menu/disp/rgui.c index 3f27f45e55..62f5c25a68 100644 --- a/frontend/menu/disp/rgui.c +++ b/frontend/menu/disp/rgui.c @@ -27,7 +27,7 @@ #include "../../../general.h" #include "../../../config.def.h" #include "../../../dynamic.h" -#include "../../../compat/posix_string.h" +#include #include "../../../file_path.h" #include "../../../settings_data.h" diff --git a/frontend/menu/disp/xmb.c b/frontend/menu/disp/xmb.c index 0c93fd1fa8..2212fbbe76 100644 --- a/frontend/menu/disp/xmb.c +++ b/frontend/menu/disp/xmb.c @@ -28,7 +28,7 @@ #include "../../../file_path.h" #include "../../../gfx/gl_common.h" #include "../../../gfx/video_thread_wrapper.h" -#include "../../../compat/posix_string.h" +#include #include "shared.h" #include "../menu_animation.h" diff --git a/gfx/fonts/bitmapfont.c b/gfx/fonts/bitmapfont.c index eaa6f77da7..2e2bd6fb64 100644 --- a/gfx/fonts/bitmapfont.c +++ b/gfx/fonts/bitmapfont.c @@ -18,7 +18,6 @@ #include #include #include -#include "../../compat/msvc_compat.h" #include #define ATLAS_COLS 16 diff --git a/gfx/gl.c b/gfx/gl.c index 237f8f2b5b..1538a909a2 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -39,7 +39,7 @@ #include "gl_common.h" #include "gfx_common.h" #include "gfx_context.h" -#include "../compat/strl.h" +#include #ifdef HAVE_GLSL #include "shader/shader_glsl.h" diff --git a/gfx/py_state/py_state.c b/gfx/py_state/py_state.c index 316e536624..03e24d0677 100644 --- a/gfx/py_state/py_state.c +++ b/gfx/py_state/py_state.c @@ -22,8 +22,8 @@ #include "../../dynamic.h" #include "../../libretro.h" #include "../../general.h" -#include "../../compat/strl.h" -#include "../../compat/posix_string.h" +#include +#include #include "../../input/input_common.h" #include "../../file.h" #include "../../file_path.h" diff --git a/gfx/shader/shader_gl_cg.c b/gfx/shader/shader_gl_cg.c index 3fe1d68043..cffa0818c2 100644 --- a/gfx/shader/shader_gl_cg.c +++ b/gfx/shader/shader_gl_cg.c @@ -31,10 +31,10 @@ #include "../../general.h" #include -#include "../../compat/strl.h" +#include +#include #include "../../conf/config_file.h" #include "../../dynamic.h" -#include "../../compat/posix_string.h" #include "../../file.h" #include "../../file_path.h" diff --git a/gfx/shader/shader_glsl.c b/gfx/shader/shader_glsl.c index a006e4366b..f26f566e42 100644 --- a/gfx/shader/shader_glsl.c +++ b/gfx/shader/shader_glsl.c @@ -16,8 +16,8 @@ #include #include "../../general.h" #include "shader_glsl.h" -#include "../../compat/strl.h" -#include "../../compat/posix_string.h" +#include +#include #include "../state_tracker.h" #include "../../dynamic.h" #include "../../file.h" diff --git a/gfx/shader/shader_null.c b/gfx/shader/shader_null.c index 72ae59ede6..04af1b521a 100644 --- a/gfx/shader/shader_null.c +++ b/gfx/shader/shader_null.c @@ -17,8 +17,8 @@ #include #include #include "../../general.h" -#include "../../compat/strl.h" -#include "../../compat/posix_string.h" +#include +#include #include "../state_tracker.h" #include "../../dynamic.h" #include "../../file.h" diff --git a/gfx/shader/shader_parse.c b/gfx/shader/shader_parse.c index 97a4896d9c..b8f578b815 100644 --- a/gfx/shader/shader_parse.c +++ b/gfx/shader/shader_parse.c @@ -16,11 +16,11 @@ #include #include #include "shader_parse.h" -#include "../../compat/posix_string.h" -#include "../../compat/msvc_compat.h" +#include +#include +#include #include "../../file.h" #include "../../file_path.h" -#include "../../compat/strl.h" #include "../../general.h" #define print_buf(buf, ...) snprintf(buf, sizeof(buf), __VA_ARGS__) diff --git a/gfx/state_tracker.c b/gfx/state_tracker.c index 3cc6d5778c..92b6918f62 100644 --- a/gfx/state_tracker.c +++ b/gfx/state_tracker.c @@ -15,7 +15,7 @@ #include "state_tracker.h" #include -#include "../compat/strl.h" +#include #include "../general.h" #include "../libretro.h" #include "../input/input_common.h" diff --git a/hash.h b/hash.h index dba2f7a5cc..8924b89bb5 100644 --- a/hash.h +++ b/hash.h @@ -43,7 +43,7 @@ #include #include -#include "compat/msvc_compat.h" +#include #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/input/overlay.c b/input/overlay.c index 67f8c399cf..a3027c0810 100644 --- a/input/overlay.c +++ b/input/overlay.c @@ -19,7 +19,7 @@ #include "../libretro.h" #include "../gfx/image/image.h" #include "../conf/config_file.h" -#include "../compat/posix_string.h" +#include #include "input_common.h" #include "../file.h" #include "../file_path.h" diff --git a/compat/compat.c b/libretro-sdk/compat/compat.c similarity index 98% rename from compat/compat.c rename to libretro-sdk/compat/compat.c index 679eb9f7a4..fd643721a4 100644 --- a/compat/compat.c +++ b/libretro-sdk/compat/compat.c @@ -20,10 +20,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "compat_getopt.h" -#include "strl.h" -#include "strcasestr.h" -#include "posix_string.h" +#include +#include +#include +#include #ifndef HAVE_GETOPT_LONG @@ -33,7 +33,7 @@ #include #include #ifdef _MSC_VER -#include "msvc_compat.h" +#include #endif char *optarg; diff --git a/compat/compat_fnmatch.c b/libretro-sdk/compat/compat_fnmatch.c similarity index 99% rename from compat/compat_fnmatch.c rename to libretro-sdk/compat/compat_fnmatch.c index a84303a63f..bbd08d012f 100644 --- a/compat/compat_fnmatch.c +++ b/libretro-sdk/compat/compat_fnmatch.c @@ -24,7 +24,7 @@ #include #endif -#include "compat_fnmatch.h" +#include /* Implemnentation of fnmatch(3) so it can be * distributed to non *nix platforms. diff --git a/logger/xdk1_logger_override.h b/logger/xdk1_logger_override.h index ff551c56d4..6dcbb2cf7c 100644 --- a/logger/xdk1_logger_override.h +++ b/logger/xdk1_logger_override.h @@ -22,7 +22,7 @@ #endif #include -#include "../compat/msvc_compat.h" +#include // FIXME: Using arbitrary string as fmt argument is unsafe. static inline void RARCH_LOG_V(const char *tag, const char *fmt, va_list ap) diff --git a/miscellaneous.h b/miscellaneous.h index cb8e164ac3..d3c770a139 100644 --- a/miscellaneous.h +++ b/miscellaneous.h @@ -35,7 +35,7 @@ #elif defined(_WIN32) && defined(_XBOX) #include #endif -#include "compat/msvc_compat.h" +#include #include "retroarch_logger.h" #include "endianness.h" diff --git a/patch.c b/patch.c index 6f276841cf..dc876d5d42 100644 --- a/patch.c +++ b/patch.c @@ -19,7 +19,7 @@ #include "patch.h" #include "hash.h" #include -#include "compat/msvc_compat.h" +#include #include #include diff --git a/playlist.c b/playlist.c index a93c949d93..4228d9f281 100644 --- a/playlist.c +++ b/playlist.c @@ -16,7 +16,7 @@ */ #include "playlist.h" -#include "compat/posix_string.h" +#include #include "boolean.h" #include "file.h" diff --git a/ps3/gcmgl/src/rgl_ps3_cg.cpp b/ps3/gcmgl/src/rgl_ps3_cg.cpp index d97ac9dc05..5cae60de11 100644 --- a/ps3/gcmgl/src/rgl_ps3_cg.cpp +++ b/ps3/gcmgl/src/rgl_ps3_cg.cpp @@ -1,5 +1,5 @@ #include "rgl_cg.h" -#include "../../../compat/strl.h" +#include static CGbool rglpSupportsVertexProgram( CGprofile p ) { diff --git a/record/ffmpeg.c b/record/ffmpeg.c index 45c31aeb50..64942a267a 100644 --- a/record/ffmpeg.c +++ b/record/ffmpeg.c @@ -13,7 +13,7 @@ * If not, see . */ -#include "../compat/msvc_compat.h" +#include #ifdef HAVE_CONFIG_H #include "../config.h" diff --git a/retroarch.c b/retroarch.c index 9ce19aa653..53d0dc2592 100644 --- a/retroarch.c +++ b/retroarch.c @@ -28,12 +28,12 @@ #include "file_path.h" #include "general.h" #include "dynamic.h" -#include "compat/strl.h" +#include #include "screenshot.h" #include "performance.h" #include "cheats.h" -#include "compat/compat_getopt.h" -#include "compat/posix_string.h" +#include +#include #include "input/keyboard_line.h" #include "input/input_common.h" #include "git_version.h" diff --git a/screenshot.c b/screenshot.c index 7f359bae9a..b81cb4054f 100644 --- a/screenshot.c +++ b/screenshot.c @@ -13,7 +13,7 @@ * If not, see . */ -#include "compat/strl.h" +#include #include #include #include diff --git a/settings.c b/settings.c index 48f8aa84da..09bcaf55e2 100644 --- a/settings.c +++ b/settings.c @@ -16,11 +16,11 @@ #include "general.h" #include "conf/config_file.h" #include "conf/config_file_macros.h" -#include "compat/strl.h" +#include +#include #include "config.def.h" #include "file.h" #include "file_path.h" -#include "compat/posix_string.h" #include "input/input_common.h" #include "frontend/frontend.h" diff --git a/string_list.c b/string_list.c index 68777b3d47..e536c286a7 100644 --- a/string_list.c +++ b/string_list.c @@ -18,8 +18,8 @@ #include "string_list.h" #include #include "miscellaneous.h" -#include "compat/strl.h" -#include "compat/posix_string.h" +#include +#include void string_list_free(struct string_list *list) { diff --git a/tools/retroarch-joyconfig.c b/tools/retroarch-joyconfig.c index e571841665..f6f1c74872 100644 --- a/tools/retroarch-joyconfig.c +++ b/tools/retroarch-joyconfig.c @@ -20,12 +20,12 @@ #include "conf/config_file.h" #include #include -#include "../compat/compat_getopt.h" +#include +#include #include #include "../input/input_common.h" #include "../general.h" #include -#include "../compat/posix_string.h" /* Need to be present for build to work, but it's not *really* used. * Better than having to build special versions of lots of objects