Revision: 75929
          http://sourceforge.net/p/brlcad/code/75929
Author:   starseeker
Date:     2020-05-25 23:41:08 +0000 (Mon, 25 May 2020)
Log Message:
-----------
Ah, cute - the lib*-obj targets weren't getting the visibility flag, so the 
objects were built vanilla and the lib linking didn't catch this.  Go ahead and 
add the new definitions for the libs where we've added the necessary logic for 
MSVC ourselves, since that's one of the things we want to check when building.  
Will get tricker when we get to upstream libs where we might actually build 
against a system lib that does have the __declspec(dllexport) style definitions 
defined on its own, since our redefinition approach won't be in place there.

Modified Paths:
--------------
    brlcad/trunk/src/other/libspsr/Src/SPSR.h
    brlcad/trunk/src/other/poly2tri/poly2tri/common/shapes.h
    brlcad/trunk/src/other/poly2tri/poly2tri/sweep/cdt.h
    brlcad/trunk/src/other/stepcode/include/sc_export.h

Modified: brlcad/trunk/src/other/libspsr/Src/SPSR.h
===================================================================
--- brlcad/trunk/src/other/libspsr/Src/SPSR.h   2020-05-25 18:29:31 UTC (rev 
75928)
+++ brlcad/trunk/src/other/libspsr/Src/SPSR.h   2020-05-25 23:41:08 UTC (rev 
75929)
@@ -31,13 +31,21 @@
 
 #include "cvertex.h"
 
+#if defined(_WIN32)
+# define COMPILER_DLLEXPORT __declspec(dllexport)
+# define COMPILER_DLLIMPORT __declspec(dllimport)
+#else
+# define COMPILER_DLLEXPORT __attribute__ ((visibility ("default")))
+# define COMPILER_DLLIMPORT __attribute__ ((visibility ("default")))
+#endif
+
 #ifndef SPSR_EXPORT
 #  if defined(SPSR_DLL_EXPORTS) && defined(SPSR_DLL_IMPORTS)
 #    error "Only SPSR_DLL_EXPORTS or SPSR_DLL_IMPORTS can be defined, not 
both."
 #  elif defined(SPSR_DLL_EXPORTS)
-#    define SPSR_EXPORT __declspec(dllexport)
+#    define SPSR_EXPORT COMPILER_DLLEXPORT
 #  elif defined(SPSR_DLL_IMPORTS)
-#    define SPSR_EXPORT __declspec(dllimport)
+#    define SPSR_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define SPSR_EXPORT
 #  endif

Modified: brlcad/trunk/src/other/poly2tri/poly2tri/common/shapes.h
===================================================================
--- brlcad/trunk/src/other/poly2tri/poly2tri/common/shapes.h    2020-05-25 
18:29:31 UTC (rev 75928)
+++ brlcad/trunk/src/other/poly2tri/poly2tri/common/shapes.h    2020-05-25 
23:41:08 UTC (rev 75929)
@@ -33,13 +33,21 @@
 #ifndef SHAPES_H
 #define SHAPES_H
 
+#if defined(_WIN32)
+# define COMPILER_DLLEXPORT __declspec(dllexport)
+# define COMPILER_DLLIMPORT __declspec(dllimport)
+#else
+# define COMPILER_DLLEXPORT __attribute__ ((visibility ("default")))
+# define COMPILER_DLLIMPORT __attribute__ ((visibility ("default")))
+#endif
+
 #ifndef P2T_EXPORT
 #  if defined(P2T_DLL_EXPORTS) && defined(P2T_DLL_IMPORTS)
 #    error "Only P2T_DLL_EXPORTS or P2T_DLL_IMPORTS can be defined, not both."
 #  elif defined(P2T_DLL_EXPORTS)
-#    define P2T_EXPORT __declspec(dllexport)
+#    define P2T_EXPORT COMPILER_DLLEXPORT
 #  elif defined(P2T_DLL_IMPORTS)
-#    define P2T_EXPORT __declspec(dllimport)
+#    define P2T_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define P2T_EXPORT
 #  endif

Modified: brlcad/trunk/src/other/poly2tri/poly2tri/sweep/cdt.h
===================================================================
--- brlcad/trunk/src/other/poly2tri/poly2tri/sweep/cdt.h        2020-05-25 
18:29:31 UTC (rev 75928)
+++ brlcad/trunk/src/other/poly2tri/poly2tri/sweep/cdt.h        2020-05-25 
23:41:08 UTC (rev 75929)
@@ -32,13 +32,21 @@
 #ifndef CDT_H
 #define CDT_H
 
+#if defined(_WIN32)
+# define COMPILER_DLLEXPORT __declspec(dllexport)
+# define COMPILER_DLLIMPORT __declspec(dllimport)
+#else
+# define COMPILER_DLLEXPORT __attribute__ ((visibility ("default")))
+# define COMPILER_DLLIMPORT __attribute__ ((visibility ("default")))
+#endif
+
 #ifndef P2T_EXPORT
 #  if defined(P2T_DLL_EXPORTS) && defined(P2T_DLL_IMPORTS)
 #    error "Only P2T_DLL_EXPORTS or P2T_DLL_IMPORTS can be defined, not both."
 #  elif defined(P2T_DLL_EXPORTS)
-#    define P2T_EXPORT __declspec(dllexport)
+#    define P2T_EXPORT COMPILER_DLLEXPORT
 #  elif defined(P2T_DLL_IMPORTS)
-#    define P2T_EXPORT __declspec(dllimport)
+#    define P2T_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define P2T_EXPORT
 #  endif

Modified: brlcad/trunk/src/other/stepcode/include/sc_export.h
===================================================================
--- brlcad/trunk/src/other/stepcode/include/sc_export.h 2020-05-25 18:29:31 UTC 
(rev 75928)
+++ brlcad/trunk/src/other/stepcode/include/sc_export.h 2020-05-25 23:41:08 UTC 
(rev 75929)
@@ -16,7 +16,7 @@
 # elif defined(SC_BASE_DLL_EXPORTS)
 #  define SC_BASE_EXPORT COMPILER_DLLEXPORT
 # elif defined(SC_BASE_DLL_IMPORTS)
-#  define SC_BASE_EXPORT __declspec(dllimport)
+#  define SC_BASE_EXPORT COMPILER_DLLIMPORT
 # else
 #  define SC_BASE_EXPORT
 # endif
@@ -29,7 +29,7 @@
 #  elif defined(SC_EXPRESS_DLL_EXPORTS)
 #    define SC_EXPRESS_EXPORT COMPILER_DLLEXPORT
 #  elif defined(SC_EXPRESS_DLL_IMPORTS)
-#    define SC_EXPRESS_EXPORT __declspec(dllimport)
+#    define SC_EXPRESS_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define SC_EXPRESS_EXPORT
 #  endif
@@ -42,7 +42,7 @@
 #  elif defined(SC_EXPPP_DLL_EXPORTS)
 #    define SC_EXPPP_EXPORT COMPILER_DLLEXPORT
 #  elif defined(SC_EXPPP_DLL_IMPORTS)
-#    define SC_EXPPP_EXPORT __declspec(dllimport)
+#    define SC_EXPPP_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define SC_EXPPP_EXPORT
 #  endif

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to