Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--source/blender/blenlib/BLI_fnmatch.h2
-rw-r--r--source/blender/blenlib/intern/path_util.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c2
-rw-r--r--source/blender/makesrna/RNA_access.h4
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp6
6 files changed, 16 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0fa6ed26bc7..61a1bd3a080 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -620,6 +620,10 @@ if(UNIX AND NOT APPLE)
# CLang is the same as GCC for now.
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
+ # Solaris CC
+ elseif(CMAKE_CXX_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/source/blender/blenlib/BLI_fnmatch.h b/source/blender/blenlib/BLI_fnmatch.h
index c09a7c7c0d2..ac8960ff9c9 100644
--- a/source/blender/blenlib/BLI_fnmatch.h
+++ b/source/blender/blenlib/BLI_fnmatch.h
@@ -51,7 +51,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)
+#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE) || defined( __SUNPRO_C)
#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. */
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 6d631051496..bbdb9bc5823 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -52,7 +52,7 @@
#include "GHOST_Path-api.h"
-#if defined WIN32 && !defined _LIBC
+#if defined WIN32 && !defined _LIBC || defined __sun
# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */
#else
# ifndef _GNU_SOURCE
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index a45b493ffb3..33e0136b6bb 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -57,7 +57,7 @@
#include "BLI_utildefines.h"
#include "BLI_math_base.h"
-#if defined WIN32 && !defined _LIBC
+#if defined WIN32 && !defined _LIBC || defined __sun
# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */
#else
# ifndef _GNU_SOURCE
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 9c8cd831d72..6b12fe4b789 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -996,7 +996,9 @@ StructRNA *ID_code_to_RNA_type(short idcode);
/* macro which inserts the function name */
-#ifdef __GNUC__
+/*
+*/
+#if defined __GNUC__ || defined __sun
# 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 9a2c0cb89b1..114ca735265 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -47,6 +47,12 @@
#undef _XOPEN_SOURCE
#endif
+#if defined(__sun) || defined(sun)
+#if defined(_XPG4)
+#undef _XPG4
+#endif
+#endif
+
#include <Python.h>
extern "C" {