Added the Sun Studio equivalent of -fvisibility=hidden
authorRyan C. Gordon <icculus@icculus.org>
Thu, 16 Apr 2009 22:37:38 -0400
changeset 991 9748fd040468
parent 990 c25717b5c165
child 992 65f29e70a322
Added the Sun Studio equivalent of -fvisibility=hidden
CMakeLists.txt
src/physfs.h
--- a/CMakeLists.txt	Mon Apr 13 17:59:15 2009 -0400
+++ b/CMakeLists.txt	Thu Apr 16 22:37:38 2009 -0400
@@ -75,6 +75,7 @@
 
 IF(CMAKE_C_COMPILER_ID STREQUAL "SunPro")
     ADD_DEFINITIONS(-erroff=E_EMPTY_TRANSLATION_UNIT)
+    ADD_DEFINITIONS(-xldscope=hidden)
 ENDIF(CMAKE_C_COMPILER_ID STREQUAL "SunPro")
 
 IF(MSVC)
--- a/src/physfs.h	Mon Apr 13 17:59:15 2009 -0400
+++ b/src/physfs.h	Thu Apr 16 22:37:38 2009 -0400
@@ -219,6 +219,8 @@
 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
 #if (defined _MSC_VER)
 #define __EXPORT__ __declspec(dllexport)
+#elif (defined __SUNPRO_C)
+#define __EXPORT__ __global
 #elif ((__GNUC__ >= 3) && (!__EMX__))
 #define __EXPORT__ __attribute__((visibility("default")))
 #else