[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[certi-cvs] certi libHLA/libhla.hh libHLA/sha1.h include/RT...
From: |
CERTI CVS commits |
Subject: |
[certi-cvs] certi libHLA/libhla.hh libHLA/sha1.h include/RT... |
Date: |
Tue, 26 Apr 2011 11:07:38 +0000 |
CVSROOT: /sources/certi
Module name: certi
Changes by: Eric NOULARD <erk> 11/04/26 11:07:38
Modified files:
libHLA : libhla.hh sha1.h
include : RTI.hh certi.hh
libRTI : CMakeLists.txt
libCERTI : SocketSHMSysV.hh
test/libgraphc : CMakeLists.txt
. : CMakeLists.txt
Log message:
Use GCC visibility when possible.
This should help us to track the circular reference problem
and this is a good practice anyway:
http://gcc.gnu.org/wiki/Visibility
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libHLA/libhla.hh?cvsroot=certi&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/certi/libHLA/sha1.h?cvsroot=certi&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/certi/include/RTI.hh?cvsroot=certi&r1=3.18&r2=3.19
http://cvs.savannah.gnu.org/viewcvs/certi/include/certi.hh?cvsroot=certi&r1=3.50&r2=3.51
http://cvs.savannah.gnu.org/viewcvs/certi/libRTI/CMakeLists.txt?cvsroot=certi&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketSHMSysV.hh?cvsroot=certi&r1=3.1&r2=3.2
http://cvs.savannah.gnu.org/viewcvs/certi/test/libgraphc/CMakeLists.txt?cvsroot=certi&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/certi/CMakeLists.txt?cvsroot=certi&r1=1.98&r2=1.99
Patches:
Index: libHLA/libhla.hh
===================================================================
RCS file: /sources/certi/certi/libHLA/libhla.hh,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- libHLA/libhla.hh 28 Mar 2010 16:08:33 -0000 1.5
+++ libHLA/libhla.hh 26 Apr 2011 11:07:38 -0000 1.6
@@ -16,7 +16,7 @@
// License along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: libhla.hh,v 1.5 2010/03/28 16:08:33 erk Exp $
+// $Id: libhla.hh,v 1.6 2011/04/26 11:07:38 erk Exp $
// ----------------------------------------------------------------------------
#ifndef LIBHLA_HH_INCLUDED
@@ -39,15 +39,27 @@
#include <inttypes.h>
#endif
-#if defined(_WIN32)
+#if defined(_WIN32) || defined(__CYGWIN__)
#pragma warning(disable: 4251)
- #if defined(HLA_EXPORTS)
- #define HLA_EXPORT __declspec(dllexport)
+ #define ANY_DLL_EXPORT __declspec(dllexport)
+ #define ANY_DLL_IMPORT __declspec(dllimport)
+ #define ANY_DLL_LOCAL
+#else
+ #if (__GNUC__ >= 4)
+ #define ANY_DLL_EXPORT __attribute__ ((visibility("default")))
+ #define ANY_DLL_IMPORT __attribute__ ((visibility("default")))
+ #define ANY_DLL_LOCAL __attribute__ ((visibility("hidden")))
#else
- #define HLA_EXPORT __declspec(dllimport)
+ #define ANY_DLL_EXPORT
+ #define ANY_DLL_IMPORT
+ #define ANY_DLL_LOCAL
#endif
+#endif
+
+#if defined(HLA_EXPORTS)
+ #define HLA_EXPORT ANY_DLL_EXPORT
#else
- #define HLA_EXPORT
+ #define HLA_EXPORT ANY_DLL_IMPORT
#endif
#include <string>
Index: libHLA/sha1.h
===================================================================
RCS file: /sources/certi/certi/libHLA/sha1.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- libHLA/sha1.h 21 Mar 2010 17:10:10 -0000 1.4
+++ libHLA/sha1.h 26 Apr 2011 11:07:38 -0000 1.5
@@ -34,15 +34,27 @@
#include <inttypes.h>
#endif
-#if defined(_WIN32)
+#if defined(_WIN32) || defined(__CYGWIN__)
#pragma warning(disable: 4251)
- #if defined(HLA_EXPORTS)
- #define HLA_EXPORT __declspec(dllexport)
+ #define ANY_DLL_EXPORT __declspec(dllexport)
+ #define ANY_DLL_IMPORT __declspec(dllimport)
+ #define ANY_DLL_LOCAL
+#else
+ #if (__GNUC__ >= 4)
+ #define ANY_DLL_EXPORT __attribute__ ((visibility("default")))
+ #define ANY_DLL_IMPORT __attribute__ ((visibility("default")))
+ #define ANY_DLL_LOCAL __attribute__ ((visibility("hidden")))
#else
- #define HLA_EXPORT __declspec(dllimport)
+ #define ANY_DLL_EXPORT
+ #define ANY_DLL_IMPORT
+ #define ANY_DLL_LOCAL
#endif
+#endif
+
+#if defined(HLA_EXPORTS)
+ #define HLA_EXPORT ANY_DLL_EXPORT
#else
- #define HLA_EXPORT
+ #define HLA_EXPORT ANY_DLL_IMPORT
#endif
/* BEGIN_C_DECLS should be used at the beginning of your declarations,
Index: include/RTI.hh
===================================================================
RCS file: /sources/certi/certi/include/RTI.hh,v
retrieving revision 3.18
retrieving revision 3.19
diff -u -b -r3.18 -r3.19
--- include/RTI.hh 20 Nov 2010 18:10:12 -0000 3.18
+++ include/RTI.hh 26 Apr 2011 11:07:38 -0000 3.19
@@ -1,28 +1,39 @@
// HLA 1.3 Header "RTI.hh"
-// $Id: RTI.hh,v 3.18 2010/11/20 18:10:12 erk Exp $
+// $Id: RTI.hh,v 3.19 2011/04/26 11:07:38 erk Exp $
#ifndef RTI_hh
#define RTI_hh
-#if defined(_WIN32)
+#if defined(_WIN32) || defined(__CYGWIN__)
#pragma warning(disable: 4290)
#pragma warning(disable: 4275)
#pragma warning(disable: 4251)
#pragma warning(disable: 4273)
#pragma warning(disable: 4996)
- #if defined(RTI_EXPORTS)
- #define RTI_EXPORT __declspec(dllexport)
- #else
- #define RTI_EXPORT __declspec(dllimport)
- #endif
- #if defined(FedTime_EXPORTS)
- #define FEDTIME_EXPORT __declspec(dllexport)
+ #define ANY_DLL_EXPORT __declspec(dllexport)
+ #define ANY_DLL_IMPORT __declspec(dllimport)
+ #define ANY_DLL_LOCAL
+#else
+ #if (__GNUC__ >= 4)
+ #define ANY_DLL_EXPORT __attribute__ ((visibility("default")))
+ #define ANY_DLL_IMPORT __attribute__ ((visibility("default")))
+ #define ANY_DLL_LOCAL __attribute__ ((visibility("hidden")))
#else
- #define FEDTIME_EXPORT __declspec(dllimport)
+ #define ANY_DLL_EXPORT
+ #define ANY_DLL_IMPORT
+ #define ANY_DLL_LOCAL
#endif
+#endif
+
+#if defined(RTI_EXPORTS)
+ #define RTI_EXPORT ANY_DLL_EXPORT
+#else
+ #define RTI_EXPORT ANY_DLL_IMPORT
+#endif
+#if defined(FedTime_EXPORTS)
+ #define FEDTIME_EXPORT ANY_DLL_EXPORT
#else
- #define RTI_EXPORT
- #define FEDTIME_EXPORT
+ #define FEDTIME_EXPORT ANY_DLL_IMPORT
#endif
#ifdef RTI_USES_STD_FSTREAM
Index: include/certi.hh
===================================================================
RCS file: /sources/certi/certi/include/certi.hh,v
retrieving revision 3.50
retrieving revision 3.51
diff -u -b -r3.50 -r3.51
--- include/certi.hh 10 Aug 2010 16:34:10 -0000 3.50
+++ include/certi.hh 26 Apr 2011 11:07:38 -0000 3.51
@@ -16,7 +16,7 @@
// License along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: certi.hh,v 3.50 2010/08/10 16:34:10 erk Exp $
+// $Id: certi.hh,v 3.51 2011/04/26 11:07:38 erk Exp $
// ----------------------------------------------------------------------------
#ifndef CERTI_HH_INCLUDED
@@ -66,11 +66,9 @@
#define CERTI_INT64_FORMAT "ll"
#endif
#endif
- #if defined(CERTI_EXPORTS)
- #define CERTI_EXPORT __declspec(dllexport)
- #else
- #define CERTI_EXPORT __declspec(dllimport)
- #endif
+ #define ANY_DLL_EXPORT __declspec(dllexport)
+ #define ANY_DLL_IMPORT __declspec(dllimport)
+ #define ANY_DLL_LOCAL
#else
#include <inttypes.h>
#define STAT_FUNCTION stat
@@ -82,7 +80,21 @@
#define CERTI_INT64_CONSTANT(val) (val##LL)
#define CERTI_INT64_FORMAT "ll"
#endif
- #define CERTI_EXPORT
+ #if (__GNUC__ >= 4)
+ #define ANY_DLL_EXPORT __attribute__ ((visibility("default")))
+ #define ANY_DLL_IMPORT __attribute__ ((visibility("default")))
+ #define ANY_DLL_LOCAL __attribute__ ((visibility("hidden")))
+ #else
+ #define ANY_DLL_EXPORT
+ #define ANY_DLL_IMPORT
+ #define ANY_DLL_LOCAL
+ #endif
+#endif
+
+#if defined(CERTI_EXPORTS)
+ #define CERTI_EXPORT ANY_DLL_EXPORT
+#else
+ #define CERTI_EXPORT ANY_DLL_IMPORT
#endif
#define CERTI_UINT64_SWAP_LE_BE_CONSTANT(val) ((uint64_t) ( \
@@ -311,4 +323,4 @@
(uint64_t) CERTI_INT64_CONSTANT(0xff00000000000000U)) >> 56)))
#endif // CERTI_HH_INCLUDED
-// $Id: certi.hh,v 3.50 2010/08/10 16:34:10 erk Exp $
+// $Id: certi.hh,v 3.51 2011/04/26 11:07:38 erk Exp $
Index: libRTI/CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/libRTI/CMakeLists.txt,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- libRTI/CMakeLists.txt 2 Nov 2010 18:23:36 -0000 1.19
+++ libRTI/CMakeLists.txt 26 Apr 2011 11:07:38 -0000 1.20
@@ -59,7 +59,7 @@
#SOURCE_GROUP("RTI\\Header" FILES ${RTI_LIB_INCLUDE})
ADD_LIBRARY(RTI ${RTI_LIB_SRCS} ${RTI_LIB_INCLUDE})
-TARGET_LINK_LIBRARIES(RTI CERTI FedTime)
+TARGET_LINK_LIBRARIES(RTI CERTI)
IF (BUILD_LEGACY_LIBRTI)
MESSAGE(STATUS "libRTI variant: CERTI legacy")
@@ -119,7 +119,7 @@
${FEDTIME_SRCS}
)
-TARGET_LINK_LIBRARIES(FedTime)
+TARGET_LINK_LIBRARIES(FedTime RTI)
SET_TARGET_PROPERTIES(FedTime PROPERTIES PROJECT_LABEL LibFedTime)
IF (MINGW)
Index: libCERTI/SocketSHMSysV.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/SocketSHMSysV.hh,v
retrieving revision 3.1
retrieving revision 3.2
diff -u -b -r3.1 -r3.2
--- libCERTI/SocketSHMSysV.hh 16 Jan 2010 20:17:14 -0000 3.1
+++ libCERTI/SocketSHMSysV.hh 26 Apr 2011 11:07:38 -0000 3.2
@@ -6,7 +6,7 @@
#include "SHMSysV.hh"
#include "SocketSHM.hh"
-class SocketSHMSysV : public SocketSHM {
+class CERTI_EXPORT SocketSHMSysV : public SocketSHM {
private:
public :
Index: test/libgraphc/CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/test/libgraphc/CMakeLists.txt,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- test/libgraphc/CMakeLists.txt 9 Jan 2011 18:01:45 -0000 1.7
+++ test/libgraphc/CMakeLists.txt 26 Apr 2011 11:07:38 -0000 1.8
@@ -1,6 +1,6 @@
# FIXME I do not remember why this should be static?
# on non WINDOWS platform
-set(BESTATIC "")
+set(BESTATIC "STATIC")
if (WIN32 AND MINGW)
set(BESTATIC "STATIC")
endif(WIN32 AND MINGW)
Index: CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/CMakeLists.txt,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -b -r1.98 -r1.99
--- CMakeLists.txt 25 Mar 2011 19:23:53 -0000 1.98
+++ CMakeLists.txt 26 Apr 2011 11:07:38 -0000 1.99
@@ -121,10 +121,12 @@
# see http://www.cmake.org/Wiki/CMake:Eclipse
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
# Enforce strict ANSI C/C++ compliance checking
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [certi-cvs] certi libHLA/libhla.hh libHLA/sha1.h include/RT...,
CERTI CVS commits <=