From 5a1954a5cbd7b0b1458fdc80ada5acd036278309 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 29 Sep 2017 19:10:08 +1000 Subject: Drop platform support for Solaris & AIX These platforms didn't see maintenance in years. This commit just removes ifdef's & cmake check. --- build_files/cmake/platform/platform_unix.cmake | 4 --- intern/ghost/intern/GHOST_EventPrinter.cpp | 10 ------- intern/ghost/intern/GHOST_SystemX11.cpp | 33 ----------------------- intern/ghost/intern/GHOST_WindowX11.cpp | 4 --- intern/guardedalloc/MEM_guardedalloc.h | 2 +- intern/string/intern/STR_String.cpp | 3 --- source/blender/blenlib/BLI_fnmatch.h | 6 ++--- source/blender/blenlib/intern/storage.c | 6 +---- source/blender/bmesh/intern/bmesh_mesh_validate.c | 2 +- source/blender/imbuf/intern/moviecache.c | 2 +- source/blender/makesrna/RNA_access.h | 2 +- source/gameengine/Ketsji/KX_PythonInit.cpp | 5 ---- 12 files changed, 8 insertions(+), 71 deletions(-) diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index 62e0caa7c43..5eefc40e8f4 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -400,10 +400,6 @@ if(CMAKE_COMPILER_IS_GNUCC) # CLang is the same as GCC for now. elseif(CMAKE_C_COMPILER_ID MATCHES "Clang") set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") -# Solaris CC -elseif(CMAKE_C_COMPILER_ID MATCHES "SunPro") - set(PLATFORM_CFLAGS "-pipe -features=extensions -fPIC -D__FUNCTION__=__func__") - # Intel C++ Compiler elseif(CMAKE_C_COMPILER_ID MATCHES "Intel") # think these next two are broken diff --git a/intern/ghost/intern/GHOST_EventPrinter.cpp b/intern/ghost/intern/GHOST_EventPrinter.cpp index f25f6637cb1..a6adba12152 100644 --- a/intern/ghost/intern/GHOST_EventPrinter.cpp +++ b/intern/ghost/intern/GHOST_EventPrinter.cpp @@ -193,16 +193,6 @@ void GHOST_EventPrinter::getKeyString(GHOST_TKey key, char str[32]) const } else if ((key >= GHOST_kKeyNumpad0) && (key <= GHOST_kKeyNumpad9)) { sprintf(str, "Numpad %d", (key - GHOST_kKeyNumpad0)); -#if defined(__sun__) || defined(__sun) - } - else if (key == 268828432) { /* solaris keyboards are messed up */ - /* This should really test XK_F11 but that doesn't work */ - strcpy(str, "F11"); - } - else if (key == 268828433) { /* solaris keyboards are messed up */ - /* This should really test XK_F12 but that doesn't work */ - strcpy(str, "F12"); -#endif } else if ((key >= GHOST_kKeyF1) && (key <= GHOST_kKeyF24)) { sprintf(str, "F%d", key - GHOST_kKeyF1 + 1); diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index 30cfac08153..8fff565338f 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -1601,26 +1601,6 @@ convertXKey(KeySym key) } else if ((key >= XK_F1) && (key <= XK_F24)) { type = GHOST_TKey(key - XK_F1 + int(GHOST_kKeyF1)); -#if defined(__sun) || defined(__sun__) - /* This is a bit of a hack, but it looks like sun - * Used F11 and friends for its special keys Stop,again etc.. - * So this little patch enables F11 and F12 to work as expected - * following link has documentation on it: - * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4734408 - * also from /usr/include/X11/Sunkeysym.h - * #define SunXK_F36 0x1005FF10 // Labeled F11 - * #define SunXK_F37 0x1005FF11 // Labeled F12 - * - * mein@cs.umn.edu - */ - - } - else if (key == 268828432) { - type = GHOST_kKeyF11; - } - else if (key == 268828433) { - type = GHOST_kKeyF12; -#endif } else { switch (key) { @@ -1714,19 +1694,6 @@ convertXKey(KeySym key) GXMAP(type, XF86XK_AudioForward, GHOST_kKeyMediaLast); #endif #endif - - /* some extra sun cruft (NICE KEYBOARD!) */ -#ifdef __sun__ - GXMAP(type, 0xffde, GHOST_kKeyNumpad1); - GXMAP(type, 0xffe0, GHOST_kKeyNumpad3); - GXMAP(type, 0xffdc, GHOST_kKeyNumpad5); - GXMAP(type, 0xffd8, GHOST_kKeyNumpad7); - GXMAP(type, 0xffda, GHOST_kKeyNumpad9); - - GXMAP(type, 0xffd6, GHOST_kKeyNumpadSlash); - GXMAP(type, 0xffd7, GHOST_kKeyNumpadAsterisk); -#endif - default: type = GHOST_kKeyUnknown; break; diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index 2019f58251f..9e019b233f6 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -59,10 +59,6 @@ //For DPI value #include -#if defined(__sun__) || defined(__sun) || defined(__sparc) || defined(__sparc__) || defined(_AIX) -# include -#endif - #include #include diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h index 05a98c1a4e5..f6048a04cf3 100644 --- a/intern/guardedalloc/MEM_guardedalloc.h +++ b/intern/guardedalloc/MEM_guardedalloc.h @@ -225,7 +225,7 @@ public: \ MEM_freeN(mem); \ } \ -#if defined __GNUC__ || defined __sun +#if defined __GNUC__ # define OBJECT_GUARDED_NEW(type, args ...) \ new(MEM_mallocN(sizeof(type), __func__)) type(args) #else diff --git a/intern/string/intern/STR_String.cpp b/intern/string/intern/STR_String.cpp index 4612c91b6a6..3ec65ddc725 100644 --- a/intern/string/intern/STR_String.cpp +++ b/intern/string/intern/STR_String.cpp @@ -37,9 +37,6 @@ #include #include #include -#if defined(__sun__) || defined(__sun) || defined(__sparc) || defined(__sparc__) || defined(_AIX) -# include -#endif #include "STR_String.h" /*------------------------------------------------------------------------------------------------- diff --git a/source/blender/blenlib/BLI_fnmatch.h b/source/blender/blenlib/BLI_fnmatch.h index f69f5b39869..06fa5048622 100644 --- a/source/blender/blenlib/BLI_fnmatch.h +++ b/source/blender/blenlib/BLI_fnmatch.h @@ -28,7 +28,7 @@ extern "C" { #endif -#if defined WIN32 && !defined _LIBC || defined __sun +#if defined WIN32 && !defined _LIBC #if defined(__cplusplus) || (defined(__STDC__) && __STDC__) #undef __P @@ -53,7 +53,7 @@ extern "C" { #define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */ #define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */ -#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined(_GNU_SOURCE) || defined(__SUNPRO_C) +#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined(_GNU_SOURCE) #define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */ #define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */ #define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ @@ -72,7 +72,7 @@ extern int fnmatch __P((const char *__pattern, const char *__string, # define _GNU_SOURCE # endif # include -#endif /* defined WIN32 && !defined _LIBC || defined __sun */ +#endif /* defined WIN32 && !defined _LIBC */ #ifdef __cplusplus } diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index b819c513fbd..a48c8b074dd 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -37,14 +37,10 @@ #include -#if defined(__NetBSD__) || defined(__DragonFly__) || defined(__sun__) || defined(__sun) +#if defined(__NetBSD__) || defined(__DragonFly__) /* Other modern unix os's should probably use this also */ # include # define USE_STATFS_STATVFS -#elif (defined(__sparc) || defined(__sparc__)) && !defined(__FreeBSD__) && !defined(__linux__) -# include - /* 4 argument version (not common) */ -# define USE_STATFS_4ARGS #endif #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) diff --git a/source/blender/bmesh/intern/bmesh_mesh_validate.c b/source/blender/bmesh/intern/bmesh_mesh_validate.c index 7c9ebc800a3..3a6a3543bc8 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_validate.c +++ b/source/blender/bmesh/intern/bmesh_mesh_validate.c @@ -41,7 +41,7 @@ /* macro which inserts the function name */ -#if defined __GNUC__ || defined __sun +#if defined __GNUC__ # define ERRMSG(format, args...) { fprintf(stderr, "%s: " format ", " AT "\n", __func__, ##args); errtot++; } (void)0 #else # define ERRMSG(format, ...) { fprintf(stderr, "%s: " format ", " AT "\n", __func__, __VA_ARGS__); errtot++; } (void)0 diff --git a/source/blender/imbuf/intern/moviecache.c b/source/blender/imbuf/intern/moviecache.c index 4b49076dcd6..89955711384 100644 --- a/source/blender/imbuf/intern/moviecache.c +++ b/source/blender/imbuf/intern/moviecache.c @@ -49,7 +49,7 @@ #include "IMB_imbuf.h" #ifdef DEBUG_MESSAGES -# if defined __GNUC__ || defined __sun +# if defined __GNUC__ # define PRINT(format, args ...) printf(format, ##args) # else # define PRINT(format, ...) printf(__VA_ARGS__) diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index b8d12461ca6..178d2d398e9 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -1199,7 +1199,7 @@ StructRNA *ID_code_to_RNA_type(short idcode); } (void)0 /* macro which inserts the function name */ -#if defined __GNUC__ || defined __sun +#if defined __GNUC__ # define RNA_warning(format, args ...) _RNA_warning("%s: " format "\n", __func__, ##args) #else # define RNA_warning(format, ...) _RNA_warning("%s: " format "\n", __FUNCTION__, __VA_ARGS__) diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index 97a7e161e9f..5540aad7a3f 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -40,11 +40,6 @@ # ifdef _XOPEN_SOURCE # undef _XOPEN_SOURCE # endif -# if defined(__sun) || defined(sun) -# if defined(_XPG4) -# undef _XPG4 -# endif -# endif # include extern "C" { -- cgit v1.2.3