[Freeswitch-svn] [commit] r12109 - in freeswitch/trunk: . src/include
FreeSWITCH SVN
mikej at freeswitch.org
Tue Feb 17 11:25:42 PST 2009
Author: mikej
Date: Tue Feb 17 13:25:42 2009
New Revision: 12109
Log:
fix suncc visibility support
Modified:
freeswitch/trunk/configure.in
freeswitch/trunk/src/include/switch_platform.h
Modified: freeswitch/trunk/configure.in
==============================================================================
--- freeswitch/trunk/configure.in (original)
+++ freeswitch/trunk/configure.in Tue Feb 17 13:25:42 2009
@@ -184,33 +184,31 @@
CFLAGS="${save_CFLAGS}"
;;
-# sun)
-# save_CFLAGS="${CFLAGS}"
-# CFLAGS="${CFLAGS} -xldscope=hidden"
-# AC_MSG_CHECKING([whether the compiler supports -xldscope=hidden])
-# AC_COMPILE_IFELSE(
-# [AC_LANG_PROGRAM(
-# [int foo __attribute__ ((visibility("default")));],
-# [;]
-# )],
-#
-# [AC_MSG_RESULT([yes])
-# APR_ADDTO([SWITCH_AM_CFLAGS], [-xldscope=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1])
-# APR_ADDTO([SWITCH_AM_CXXFLAGS], [-xldscope=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1])
-# HAVE_VISIBILITY="yes"],
-#
-# [AC_MSG_RESULT([no])]
-# )
-# CFLAGS="${save_CFLAGS}"
-# ;;
-#
+ sun)
+ save_CFLAGS="${CFLAGS}"
+ CFLAGS="${CFLAGS} -xldscope=hidden"
+ AC_MSG_CHECKING([whether the compiler supports -xldscope=hidden])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [int foo __attribute__ ((visibility("default")));],
+ [;]
+ )],
+
+ [AC_MSG_RESULT([yes])
+ APR_ADDTO([SWITCH_AM_CFLAGS], [-xldscope=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1])
+ APR_ADDTO([SWITCH_AM_CXXFLAGS], [-xldscope=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1])
+ HAVE_VISIBILITY="yes"],
+
+ [AC_MSG_RESULT([no])]
+ )
+ CFLAGS="${save_CFLAGS}"
+ ;;
+
*)
if test "x${enable_visibility}" = "xyes" ; then
- AC_MSG_ERROR([Non-GNU compilers are currently unsupported])
-# AC_MSG_ERROR([Non-GNU / SUN compilers are currently unsupported])
+ AC_MSG_ERROR([Non-GNU / SUN compilers are currently unsupported])
else
- AC_MSG_WARN([Non-GNU compilers are currently unsupported])
-# AC_MSG_WARN([Non-GNU / SUN compilers are currently unsupported])
+ AC_MSG_WARN([Non-GNU / SUN compilers are currently unsupported])
fi
;;
esac
Modified: freeswitch/trunk/src/include/switch_platform.h
==============================================================================
--- freeswitch/trunk/src/include/switch_platform.h (original)
+++ freeswitch/trunk/src/include/switch_platform.h Tue Feb 17 13:25:42 2009
@@ -165,7 +165,7 @@
#define SWITCH_DECLARE_CLASS
#else //not win32
#define O_BINARY 0
-#if (defined(__GNUC__) || defined(__SUNCC__)) && defined(SWITCH_API_VISIBILITY)
+#if (defined(__GNUC__) || defined(__SUNPRO_CC) || defined (__SUNPRO_C)) && defined(SWITCH_API_VISIBILITY)
#define SWITCH_DECLARE(type) __attribute__((visibility("default"))) type
#define SWITCH_DECLARE_NONSTD(type) __attribute__((visibility("default"))) type
#define SWITCH_DECLARE_DATA __attribute__((visibility("default")))
More information about the Freeswitch-svn
mailing list