Revision: 75860
          http://sourceforge.net/p/brlcad/code/75860
Author:   starseeker
Date:     2020-05-21 02:34:47 +0000 (Thu, 21 May 2020)
Log Message:
-----------
Get a default build working with the fvisibility=hidden flag

Modified Paths:
--------------
    brlcad/branches/bioh/CMakeLists.txt
    brlcad/branches/bioh/include/analyze/defines.h
    brlcad/branches/bioh/include/bg/defines.h
    brlcad/branches/bioh/include/bn/defines.h
    brlcad/branches/bioh/include/brep/defines.h
    brlcad/branches/bioh/include/bu/defines.h
    brlcad/branches/bioh/include/common.h
    brlcad/branches/bioh/include/dm/defines.h
    brlcad/branches/bioh/include/fb.h
    brlcad/branches/bioh/include/fft.h
    brlcad/branches/bioh/include/gcv/defines.h
    brlcad/branches/bioh/include/ged/defines.h
    brlcad/branches/bioh/include/icv/defines.h
    brlcad/branches/bioh/include/libtermio.h
    brlcad/branches/bioh/include/nmg.h
    brlcad/branches/bioh/include/optical/defines.h
    brlcad/branches/bioh/include/pc.h
    brlcad/branches/bioh/include/pkg.h
    brlcad/branches/bioh/include/rt/db5.h
    brlcad/branches/bioh/include/rt/defines.h
    brlcad/branches/bioh/include/rt/tie.h
    brlcad/branches/bioh/include/tclcad.h
    brlcad/branches/bioh/include/wdb.h
    brlcad/branches/bioh/misc/CMake/BRLCAD_Targets.cmake
    brlcad/branches/bioh/misc/win32-msvc/CMakeLists.txt
    brlcad/branches/bioh/src/adrt/CMakeLists.txt
    brlcad/branches/bioh/src/adrt/librender/render_internal.h
    brlcad/branches/bioh/src/archer/CMakeLists.txt
    brlcad/branches/bioh/src/brlman/CMakeLists.txt
    brlcad/branches/bioh/src/bwish/CMakeLists.txt
    brlcad/branches/bioh/src/conv/ply/CMakeLists.txt
    brlcad/branches/bioh/src/conv/ply/rply.h
    brlcad/branches/bioh/src/conv/step/step-g/CMakeLists.txt
    brlcad/branches/bioh/src/external/Creo/CMakeLists.txt
    brlcad/branches/bioh/src/external/Cubit/CMakeLists.txt
    brlcad/branches/bioh/src/external/Unigraphics/CMakeLists.txt
    brlcad/branches/bioh/src/libbg/CMakeLists.txt
    brlcad/branches/bioh/src/libbrep/CMakeLists.txt
    brlcad/branches/bioh/src/libbu/tests/dylib/CMakeLists.txt
    brlcad/branches/bioh/src/libbu/tests/dylib/dylib.h
    brlcad/branches/bioh/src/libdm/CMakeLists.txt
    brlcad/branches/bioh/src/libgcv/CMakeLists.txt
    brlcad/branches/bioh/src/libgcv/plugins/CMakeLists.txt
    brlcad/branches/bioh/src/libgcv/plugins/obj/wfobj/CMakeLists.txt
    brlcad/branches/bioh/src/libgcv/plugins/obj/wfobj/obj_util.h
    brlcad/branches/bioh/src/libicv/CMakeLists.txt
    brlcad/branches/bioh/src/librt/CMakeLists.txt
    brlcad/branches/bioh/src/libtclcad/tkImgFmtPIX.c
    brlcad/branches/bioh/src/mged/CMakeLists.txt
    brlcad/branches/bioh/src/other/openNURBS/CMakeLists.txt
    brlcad/branches/bioh/src/other/openNURBS/opennurbs_defines.h
    brlcad/branches/bioh/src/other/stepcode/include/sc_export.h
    brlcad/branches/bioh/src/other/stepcode/src/base/judy/src/judy.h
    brlcad/branches/bioh/src/other/stepcode/src/exp2cxx/classes_wrapper.cc

Modified: brlcad/branches/bioh/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/CMakeLists.txt 2020-05-21 00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/CMakeLists.txt 2020-05-21 02:34:47 UTC (rev 75860)
@@ -116,12 +116,17 @@
 #---------------------------------------------------------------------
 # Check whether we need to add import/export lines to libraries
 if(MSVC)
+  # TODO - this was a cheat, and now that we're looking at hiding
+  # symbols on other platforms it's not really going to work.  We
+  # will be transitioning to using HIDE_INTERNAL_SYMBOLS instead
+  # of this, which means we eventually will need to stop using it
+  # to hide platform specific bits behind.
   set(CPP_DLL_DEFINES 1)
 endif(MSVC)
 
 # Define an option to use OBJECT libraries - when we build this
 # way, we also need position independent code.
-cmake_dependent_option(USE_OBJECT_LIBS "Use OBJECT libraries" ON "NOT 
CPP_DLL_DEFINES" OFF)
+cmake_dependent_option(USE_OBJECT_LIBS "Use OBJECT libraries" ON "NOT MSVC" 
OFF)
 mark_as_advanced(USE_OBJECT_LIBS)
 if(USE_OBJECT_LIBS)
   set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
@@ -1735,6 +1740,16 @@
 CHECK_C_FLAG(pipe)
 CHECK_CXX_FLAG(pipe)
 
+# Enable visibility restrictions.  We have to deal with this on
+# Windows, so enable it wherever we can to keep the code working
+# across all platforms.
+CHECK_C_FLAG(fvisibility=hidden)
+CHECK_CXX_FLAG(fvisibility=hidden)
+# If we can, hide internal library symbols
+if(MSVC OR FVISIBILITY_HIDDEN_CXX_FLAG_FOUND)
+  set(HIDE_INTERNAL_SYMBOLS 1)
+endif(MSVC OR FVISIBILITY_HIDDEN_CXX_FLAG_FOUND)
+
 # check for -fno-strict-aliasing
 # XXX - THIS FLAG IS REQUIRED if any level of optimization is
 # enabled with GCC as we do use aliasing and type-punning.
@@ -3056,11 +3071,11 @@
 }
 ")
 # Grumble... find_library doesn't find ws2_32, so set it by hand.
-if(CPP_DLL_DEFINES)
+if(MSVC)
   set(WS2_32_LIBRARY ws2_32)
-else(CPP_DLL_DEFINES)
+else(MSVC)
   set(WS2_32_LIBRARY "")
-endif(CPP_DLL_DEFINES)
+endif(MSVC)
 file(WRITE "${CMAKE_BINARY_DIR}/CMakeTmp/report_hostname.c" 
"${report_hostname_src}")
 try_run(RH_RESULT RH_COMPILED "${CMAKE_BINARY_DIR}/CMakeTmp"
   "${CMAKE_BINARY_DIR}/CMakeTmp/report_hostname.c"

Modified: brlcad/branches/bioh/include/analyze/defines.h
===================================================================
--- brlcad/branches/bioh/include/analyze/defines.h      2020-05-21 00:45:39 UTC 
(rev 75859)
+++ brlcad/branches/bioh/include/analyze/defines.h      2020-05-21 02:34:47 UTC 
(rev 75860)
@@ -35,9 +35,9 @@
 #  if defined(ANALYZE_DLL_EXPORTS) && defined(ANALYZE_DLL_IMPORTS)
 #    error "Only ANALYZE_DLL_EXPORTS or ANALYZE_DLL_IMPORTS can be defined, 
not both."
 #  elif defined(ANALYZE_DLL_EXPORTS)
-#    define ANALYZE_EXPORT __declspec(dllexport)
+#    define ANALYZE_EXPORT COMPILER_DLLEXPORT
 #  elif defined(ANALYZE_DLL_IMPORTS)
-#    define ANALYZE_EXPORT __declspec(dllimport)
+#    define ANALYZE_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define ANALYZE_EXPORT
 #  endif

Modified: brlcad/branches/bioh/include/bg/defines.h
===================================================================
--- brlcad/branches/bioh/include/bg/defines.h   2020-05-21 00:45:39 UTC (rev 
75859)
+++ brlcad/branches/bioh/include/bg/defines.h   2020-05-21 02:34:47 UTC (rev 
75860)
@@ -35,9 +35,9 @@
 #  if defined(BG_DLL_EXPORTS) && defined(BG_DLL_IMPORTS)
 #    error "Only BG_DLL_EXPORTS or BG_DLL_IMPORTS can be defined, not both."
 #  elif defined(BG_DLL_EXPORTS)
-#    define BG_EXPORT __declspec(dllexport)
+#    define BG_EXPORT COMPILER_DLLEXPORT
 #  elif defined(BG_DLL_IMPORTS)
-#    define BG_EXPORT __declspec(dllimport)
+#    define BG_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define BG_EXPORT
 #  endif

Modified: brlcad/branches/bioh/include/bn/defines.h
===================================================================
--- brlcad/branches/bioh/include/bn/defines.h   2020-05-21 00:45:39 UTC (rev 
75859)
+++ brlcad/branches/bioh/include/bn/defines.h   2020-05-21 02:34:47 UTC (rev 
75860)
@@ -34,9 +34,9 @@
 #  if defined(BN_DLL_EXPORTS) && defined(BN_DLL_IMPORTS)
 #    error "Only BN_DLL_EXPORTS or BN_DLL_IMPORTS can be defined, not both."
 #  elif defined(BN_DLL_EXPORTS)
-#    define BN_EXPORT __declspec(dllexport)
+#    define BN_EXPORT COMPILER_DLLEXPORT
 #  elif defined(BN_DLL_IMPORTS)
-#    define BN_EXPORT __declspec(dllimport)
+#    define BN_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define BN_EXPORT
 #  endif

Modified: brlcad/branches/bioh/include/brep/defines.h
===================================================================
--- brlcad/branches/bioh/include/brep/defines.h 2020-05-21 00:45:39 UTC (rev 
75859)
+++ brlcad/branches/bioh/include/brep/defines.h 2020-05-21 02:34:47 UTC (rev 
75860)
@@ -67,9 +67,9 @@
 #  if defined(BREP_DLL_EXPORTS) && defined(BREP_DLL_IMPORTS)
 #    error "Only BREP_DLL_EXPORTS or BREP_DLL_IMPORTS can be defined, not 
both."
 #  elif defined(BREP_DLL_EXPORTS)
-#    define BREP_EXPORT __declspec(dllexport)
+#    define BREP_EXPORT COMPILER_DLLEXPORT
 #  elif defined(BREP_DLL_IMPORTS)
-#    define BREP_EXPORT __declspec(dllimport)
+#    define BREP_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define BREP_EXPORT
 #  endif

Modified: brlcad/branches/bioh/include/bu/defines.h
===================================================================
--- brlcad/branches/bioh/include/bu/defines.h   2020-05-21 00:45:39 UTC (rev 
75859)
+++ brlcad/branches/bioh/include/bu/defines.h   2020-05-21 02:34:47 UTC (rev 
75860)
@@ -38,9 +38,9 @@
 #  if defined(BU_DLL_EXPORTS) && defined(BU_DLL_IMPORTS)
 #    error "Only BU_DLL_EXPORTS or BU_DLL_IMPORTS can be defined, not both."
 #  elif defined(BU_DLL_EXPORTS)
-#    define BU_EXPORT __declspec(dllexport)
+#    define BU_EXPORT COMPILER_DLLEXPORT
 #  elif defined(BU_DLL_IMPORTS)
-#    define BU_EXPORT __declspec(dllimport)
+#    define BU_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define BU_EXPORT
 #  endif

Modified: brlcad/branches/bioh/include/common.h
===================================================================
--- brlcad/branches/bioh/include/common.h       2020-05-21 00:45:39 UTC (rev 
75859)
+++ brlcad/branches/bioh/include/common.h       2020-05-21 02:34:47 UTC (rev 
75860)
@@ -524,6 +524,17 @@
 #  define CPP_FILELINE __FILE__ ":" CPP_XSTR(__LINE__)
 #endif
 
+/**
+ * Different platforms use different compiler syntax for
+ * exporting and importing symbols.
+ */
+#if defined(_WIN32)
+# define COMPILER_DLLEXPORT COMPILER_DLLEXPORT
+# define COMPILER_DLLIMPORT DLLIMPORT
+#else
+# define COMPILER_DLLEXPORT __attribute__ ((visibility ("default")))
+# define COMPILER_DLLIMPORT __attribute__ ((visibility ("default")))
+#endif
 
 #endif  /* COMMON_H */
 

Modified: brlcad/branches/bioh/include/dm/defines.h
===================================================================
--- brlcad/branches/bioh/include/dm/defines.h   2020-05-21 00:45:39 UTC (rev 
75859)
+++ brlcad/branches/bioh/include/dm/defines.h   2020-05-21 02:34:47 UTC (rev 
75860)
@@ -26,9 +26,9 @@
 #  if defined(DM_DLL_EXPORTS) && defined(DM_DLL_IMPORTS)
 #    error "Only DM_DLL_EXPORTS or DM_DLL_IMPORTS can be defined, not both."
 #  elif defined(DM_DLL_EXPORTS)
-#    define DM_EXPORT __declspec(dllexport)
+#    define DM_EXPORT COMPILER_DLLEXPORT
 #  elif defined(DM_DLL_IMPORTS)
-#    define DM_EXPORT __declspec(dllimport)
+#    define DM_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define DM_EXPORT
 #  endif

Modified: brlcad/branches/bioh/include/fb.h
===================================================================
--- brlcad/branches/bioh/include/fb.h   2020-05-21 00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/include/fb.h   2020-05-21 02:34:47 UTC (rev 75860)
@@ -32,9 +32,9 @@
 #  if defined(FB_DLL_EXPORTS) && defined(FB_DLL_IMPORTS)
 #    error "Only FB_DLL_EXPORTS or FB_DLL_IMPORTS can be defined, not both."
 #  elif defined(FB_DLL_EXPORTS)
-#    define FB_EXPORT __declspec(dllexport)
+#    define FB_EXPORT COMPILER_DLLEXPORT
 #  elif defined(FB_DLL_IMPORTS)
-#    define FB_EXPORT __declspec(dllimport)
+#    define FB_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define FB_EXPORT
 #  endif

Modified: brlcad/branches/bioh/include/fft.h
===================================================================
--- brlcad/branches/bioh/include/fft.h  2020-05-21 00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/include/fft.h  2020-05-21 02:34:47 UTC (rev 75860)
@@ -44,9 +44,9 @@
 #  if defined(FFT_DLL_EXPORTS) && defined(FFT_DLL_IMPORTS)
 #    error "Only FFT_DLL_EXPORTS or FFT_DLL_IMPORTS can be defined, not both."
 #  elif defined(FFT_DLL_EXPORTS)
-#    define FFT_EXPORT __declspec(dllexport)
+#    define FFT_EXPORT COMPILER_DLLEXPORT
 #  elif defined(FFT_DLL_IMPORTS)
-#    define FFT_EXPORT __declspec(dllimport)
+#    define FFT_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define FFT_EXPORT
 #  endif

Modified: brlcad/branches/bioh/include/gcv/defines.h
===================================================================
--- brlcad/branches/bioh/include/gcv/defines.h  2020-05-21 00:45:39 UTC (rev 
75859)
+++ brlcad/branches/bioh/include/gcv/defines.h  2020-05-21 02:34:47 UTC (rev 
75860)
@@ -34,9 +34,9 @@
 #  if defined(GCV_DLL_EXPORTS) && defined(GCV_DLL_IMPORTS)
 #    error "Only GCV_DLL_EXPORTS or GCV_DLL_IMPORTS can be defined, not both."
 #  elif defined(GCV_DLL_EXPORTS)
-#    define GCV_EXPORT __declspec(dllexport)
+#    define GCV_EXPORT COMPILER_DLLEXPORT
 #  elif defined(GCV_DLL_IMPORTS)
-#    define GCV_EXPORT __declspec(dllimport)
+#    define GCV_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define GCV_EXPORT
 #  endif

Modified: brlcad/branches/bioh/include/ged/defines.h
===================================================================
--- brlcad/branches/bioh/include/ged/defines.h  2020-05-21 00:45:39 UTC (rev 
75859)
+++ brlcad/branches/bioh/include/ged/defines.h  2020-05-21 02:34:47 UTC (rev 
75860)
@@ -42,9 +42,9 @@
 #  if defined(GED_DLL_EXPORTS) && defined(GED_DLL_IMPORTS)
 #    error "Only GED_DLL_EXPORTS or GED_DLL_IMPORTS can be defined, not both."
 #  elif defined(GED_DLL_EXPORTS)
-#    define GED_EXPORT __declspec(dllexport)
+#    define GED_EXPORT COMPILER_DLLEXPORT
 #  elif defined(GED_DLL_IMPORTS)
-#    define GED_EXPORT __declspec(dllimport)
+#    define GED_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define GED_EXPORT
 #  endif

Modified: brlcad/branches/bioh/include/icv/defines.h
===================================================================
--- brlcad/branches/bioh/include/icv/defines.h  2020-05-21 00:45:39 UTC (rev 
75859)
+++ brlcad/branches/bioh/include/icv/defines.h  2020-05-21 02:34:47 UTC (rev 
75860)
@@ -39,9 +39,9 @@
 #  if defined(ICV_DLL_EXPORTS) && defined(ICV_DLL_IMPORTS)
 #    error "Only ICV_DLL_EXPORTS or ICV_DLL_IMPORTS can be defined, not both."
 #  elif defined(ICV_DLL_EXPORTS)
-#    define ICV_EXPORT __declspec(dllexport)
+#    define ICV_EXPORT COMPILER_DLLEXPORT
 #  elif defined(ICV_DLL_IMPORTS)
-#    define ICV_EXPORT __declspec(dllimport)
+#    define ICV_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define ICV_EXPORT
 #  endif

Modified: brlcad/branches/bioh/include/libtermio.h
===================================================================
--- brlcad/branches/bioh/include/libtermio.h    2020-05-21 00:45:39 UTC (rev 
75859)
+++ brlcad/branches/bioh/include/libtermio.h    2020-05-21 02:34:47 UTC (rev 
75860)
@@ -47,22 +47,33 @@
 #  endif /* BSD */
 #endif /* HAVE_TERMIOS_H */
 
+#ifndef TERMIO_EXPORT
+#  if defined(TERMIO_DLL_EXPORTS) && defined(TERMIO_DLL_IMPORTS)
+#    error "Only TERMIO_DLL_EXPORTS or TERMIO_DLL_IMPORTS can be defined, not 
both."
+#  elif defined(TERMIO_DLL_EXPORTS)
+#    define TERMIO_EXPORT COMPILER_DLLEXPORT
+#  elif defined(TERMIO_DLL_IMPORTS)
+#    define TERMIO_EXPORT COMPILER_DLLIMPORT
+#  else
+#    define TERMIO_EXPORT
+#  endif
+#endif
 
 __BEGIN_DECLS
 
 void clr_Cbreak(int fd);
-void set_Cbreak(int fd);
+TERMIO_EXPORT void set_Cbreak(int fd);
 void clr_Raw(int fd);
-void set_Raw(int fd);
+TERMIO_EXPORT void set_Raw(int fd);
 void set_Echo(int fd);
-void clr_Echo(int fd);
+TERMIO_EXPORT void clr_Echo(int fd);
 void set_Tabs(int fd);
 void clr_Tabs(int fd);
 void set_HUPCL(int fd);
 void clr_CRNL(int fd);
 unsigned short get_O_Speed(int fd);
-void save_Tty(int fd);
-void reset_Tty(int fd);
+TERMIO_EXPORT void save_Tty(int fd);
+TERMIO_EXPORT void reset_Tty(int fd);
 int save_Fil_Stat(int fd);
 int reset_Fil_Stat(int fd);
 int set_O_NDELAY(int fd);

Modified: brlcad/branches/bioh/include/nmg.h
===================================================================
--- brlcad/branches/bioh/include/nmg.h  2020-05-21 00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/include/nmg.h  2020-05-21 02:34:47 UTC (rev 75860)
@@ -86,9 +86,9 @@
 #  if defined(NMG_DLL_EXPORTS) && defined(NMG_DLL_IMPORTS)
 #    error "Only NMG_DLL_EXPORTS or NMG_DLL_IMPORTS can be defined, not both."
 #  elif defined(NMG_DLL_EXPORTS)
-#    define NMG_EXPORT __declspec(dllexport)
+#    define NMG_EXPORT COMPILER_DLLEXPORT
 #  elif defined(NMG_DLL_IMPORTS)
-#    define NMG_EXPORT __declspec(dllimport)
+#    define NMG_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define NMG_EXPORT
 #  endif

Modified: brlcad/branches/bioh/include/optical/defines.h
===================================================================
--- brlcad/branches/bioh/include/optical/defines.h      2020-05-21 00:45:39 UTC 
(rev 75859)
+++ brlcad/branches/bioh/include/optical/defines.h      2020-05-21 02:34:47 UTC 
(rev 75860)
@@ -42,9 +42,9 @@
 #  if defined(OPTICAL_DLL_EXPORTS) && defined(OPTICAL_DLL_IMPORTS)
 #    error "Only OPTICAL_DLL_EXPORTS or OPTICAL_DLL_IMPORTS can be defined, 
not both."
 #  elif defined(OPTICAL_DLL_EXPORTS)
-#    define OPTICAL_EXPORT __declspec(dllexport)
+#    define OPTICAL_EXPORT COMPILER_DLLEXPORT
 #  elif defined(OPTICAL_DLL_IMPORTS)
-#    define OPTICAL_EXPORT __declspec(dllimport)
+#    define OPTICAL_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define OPTICAL_EXPORT
 #  endif

Modified: brlcad/branches/bioh/include/pc.h
===================================================================
--- brlcad/branches/bioh/include/pc.h   2020-05-21 00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/include/pc.h   2020-05-21 02:34:47 UTC (rev 75860)
@@ -39,9 +39,9 @@
 #  if defined(PC_DLL_EXPORTS) && defined(PC_DLL_IMPORTS)
 #    error "Only PC_DLL_EXPORTS or PC_DLL_IMPORTS can be defined, not both."
 #  elif defined(PC_DLL_EXPORTS)
-#    define PC_EXPORT __declspec(dllexport)
+#    define PC_EXPORT COMPILER_DLLEXPORT
 #  elif defined(PC_DLL_IMPORTS)
-#    define PC_EXPORT __declspec(dllimport)
+#    define PC_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define PC_EXPORT
 #  endif

Modified: brlcad/branches/bioh/include/pkg.h
===================================================================
--- brlcad/branches/bioh/include/pkg.h  2020-05-21 00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/include/pkg.h  2020-05-21 02:34:47 UTC (rev 75860)
@@ -38,9 +38,9 @@
 #  if defined(PKG_DLL_EXPORTS) && defined(PKG_DLL_IMPORTS)
 #    error "Only PKG_DLL_EXPORTS or PKG_DLL_IMPORTS can be defined, not both."
 #  elif defined(PKG_DLL_EXPORTS)
-#    define PKG_EXPORT __declspec(dllexport)
+#    define PKG_EXPORT COMPILER_DLLEXPORT
 #  elif defined(PKG_DLL_IMPORTS)
-#    define PKG_EXPORT __declspec(dllimport)
+#    define PKG_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define PKG_EXPORT
 #  endif
@@ -51,6 +51,9 @@
 extern "C" {
 #endif
 
+/* ?? used in remrt */
+PKG_EXPORT extern int pkg_permport;
+
 struct pkg_conn;
 
 typedef void (*pkg_callback)(struct pkg_conn*, char*);

Modified: brlcad/branches/bioh/include/rt/db5.h
===================================================================
--- brlcad/branches/bioh/include/rt/db5.h       2020-05-21 00:45:39 UTC (rev 
75859)
+++ brlcad/branches/bioh/include/rt/db5.h       2020-05-21 02:34:47 UTC (rev 
75860)
@@ -41,9 +41,9 @@
 #  if defined(RT_DLL_EXPORTS) && defined(RT_DLL_IMPORTS)
 #    error "Only RT_DLL_EXPORTS or RT_DLL_IMPORTS can be defined, not both."
 #  elif defined(RT_DLL_EXPORTS)
-#    define RT_EXPORT __declspec(dllexport)
+#    define RT_EXPORT COMPILER_DLLEXPORT
 #  elif defined(RT_DLL_IMPORTS)
-#    define RT_EXPORT __declspec(dllimport)
+#    define RT_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define RT_EXPORT
 #  endif

Modified: brlcad/branches/bioh/include/rt/defines.h
===================================================================
--- brlcad/branches/bioh/include/rt/defines.h   2020-05-21 00:45:39 UTC (rev 
75859)
+++ brlcad/branches/bioh/include/rt/defines.h   2020-05-21 02:34:47 UTC (rev 
75860)
@@ -33,9 +33,9 @@
 #  if defined(RT_DLL_EXPORTS) && defined(RT_DLL_IMPORTS)
 #    error "Only RT_DLL_EXPORTS or RT_DLL_IMPORTS can be defined, not both."
 #  elif defined(RT_DLL_EXPORTS)
-#    define RT_EXPORT __declspec(dllexport)
+#    define RT_EXPORT COMPILER_DLLEXPORT
 #  elif defined(RT_DLL_IMPORTS)
-#    define RT_EXPORT __declspec(dllimport)
+#    define RT_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define RT_EXPORT
 #  endif

Modified: brlcad/branches/bioh/include/rt/tie.h
===================================================================
--- brlcad/branches/bioh/include/rt/tie.h       2020-05-21 00:45:39 UTC (rev 
75859)
+++ brlcad/branches/bioh/include/rt/tie.h       2020-05-21 02:34:47 UTC (rev 
75860)
@@ -35,9 +35,9 @@
 #  if defined(RT_DLL_EXPORTS) && defined(RT_DLL_IMPORTS)
 #    error "Only RT_DLL_EXPORTS or RT_DLL_IMPORTS can be defined, not both."
 #  elif defined(RT_DLL_EXPORTS)
-#    define RT_EXPORT __declspec(dllexport)
+#    define RT_EXPORT COMPILER_DLLEXPORT
 #  elif defined(RT_DLL_IMPORTS)
-#    define RT_EXPORT __declspec(dllimport)
+#    define RT_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define RT_EXPORT
 #  endif

Modified: brlcad/branches/bioh/include/tclcad.h
===================================================================
--- brlcad/branches/bioh/include/tclcad.h       2020-05-21 00:45:39 UTC (rev 
75859)
+++ brlcad/branches/bioh/include/tclcad.h       2020-05-21 02:34:47 UTC (rev 
75860)
@@ -46,9 +46,9 @@
 #  if defined(TCLCAD_DLL_EXPORTS) && defined(TCLCAD_DLL_IMPORTS)
 #    error "Only TCLCAD_DLL_EXPORTS or TCLCAD_DLL_IMPORTS can be defined, not 
both."
 #  elif defined(TCLCAD_DLL_EXPORTS)
-#    define TCLCAD_EXPORT __declspec(dllexport)
+#    define TCLCAD_EXPORT COMPILER_DLLEXPORT
 #  elif defined(TCLCAD_DLL_IMPORTS)
-#    define TCLCAD_EXPORT __declspec(dllimport)
+#    define TCLCAD_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define TCLCAD_EXPORT
 #  endif

Modified: brlcad/branches/bioh/include/wdb.h
===================================================================
--- brlcad/branches/bioh/include/wdb.h  2020-05-21 00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/include/wdb.h  2020-05-21 02:34:47 UTC (rev 75860)
@@ -59,9 +59,9 @@
 #  if defined(WDB_DLL_EXPORTS) && defined(WDB_DLL_IMPORTS)
 #    error "Only WDB_DLL_EXPORTS or WDB_DLL_IMPORTS can be defined, not both."
 #  elif defined(WDB_DLL_EXPORTS)
-#    define WDB_EXPORT __declspec(dllexport)
+#    define WDB_EXPORT COMPILER_DLLEXPORT
 #  elif defined(WDB_DLL_IMPORTS)
-#    define WDB_EXPORT __declspec(dllimport)
+#    define WDB_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define WDB_EXPORT
 #  endif

Modified: brlcad/branches/bioh/misc/CMake/BRLCAD_Targets.cmake
===================================================================
--- brlcad/branches/bioh/misc/CMake/BRLCAD_Targets.cmake        2020-05-21 
00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/misc/CMake/BRLCAD_Targets.cmake        2020-05-21 
02:34:47 UTC (rev 75860)
@@ -465,11 +465,11 @@
     set(lsrcslist $<TARGET_OBJECTS:${libname}-obj>)
     set_target_properties(${libname}-obj PROPERTIES FOLDER "BRL-CAD OBJECT 
Libraries${SUBFOLDER}")
 
-    if(CPP_DLL_DEFINES)
+    if(HIDE_INTERNAL_SYMBOLS)
       string(REPLACE "lib" "" LOWERCORE "${libname}")
       string(TOUPPER ${LOWERCORE} UPPER_CORE)
       set_property(TARGET ${libname}-obj APPEND PROPERTY COMPILE_DEFINITIONS 
"${UPPER_CORE}_DLL_EXPORTS")
-    endif(CPP_DLL_DEFINES)
+    endif(HIDE_INTERNAL_SYMBOLS)
 
     if(NOT "${libslist}" STREQUAL "" AND NOT "${libslist}" STREQUAL "NONE")
       foreach(ll ${libslist})
@@ -486,12 +486,12 @@
 
     add_library(${libname} SHARED ${lsrcslist} ${L_SHARED_SRCS})
 
-    if(CPP_DLL_DEFINES)
+    if(HIDE_INTERNAL_SYMBOLS)
       string(REPLACE "lib" "" LOWERCORE "${libname}")
       string(TOUPPER ${LOWERCORE} UPPER_CORE)
       set_property(TARGET ${libname} APPEND PROPERTY COMPILE_DEFINITIONS 
"${UPPER_CORE}_DLL_EXPORTS")
       set_property(GLOBAL APPEND PROPERTY ${libname}_DLL_DEFINES 
"${UPPER_CORE}_DLL_IMPORTS")
-    endif(CPP_DLL_DEFINES)
+    endif(HIDE_INTERNAL_SYMBOLS)
 
   endif(L_SHARED OR (BUILD_SHARED_LIBS AND NOT L_STATIC))
 
@@ -502,9 +502,9 @@
       set(libstatic ${libname}-static)
     endif(L_STATIC)
     add_library(${libstatic} STATIC ${lsrcslist} ${L_STATIC_SRCS})
-    if(NOT CPP_DLL_DEFINES)
+    if(NOT MSVC)
       set_target_properties(${libstatic} PROPERTIES OUTPUT_NAME "${libname}")
-    endif(NOT CPP_DLL_DEFINES)
+    endif(NOT MSVC)
   endif(L_STATIC OR (BUILD_STATIC_LIBS AND NOT L_SHARED))
 
   # Make sure we don't end up with outputs named liblib...

Modified: brlcad/branches/bioh/misc/win32-msvc/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/misc/win32-msvc/CMakeLists.txt 2020-05-21 00:45:39 UTC 
(rev 75859)
+++ brlcad/branches/bioh/misc/win32-msvc/CMakeLists.txt 2020-05-21 02:34:47 UTC 
(rev 75860)
@@ -1,9 +1,9 @@
 # build DLL
 add_subdirectory(Dll)
 
-if(CPP_DLL_DEFINES)
+if(MSVC)
   add_library(bs SHARED bootstrap.cpp)
-endif(CPP_DLL_DEFINES)
+endif(MSVC)
 
 CMAKEFILES(CMakeLists.txt)
 

Modified: brlcad/branches/bioh/src/adrt/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/adrt/CMakeLists.txt        2020-05-21 00:45:39 UTC 
(rev 75859)
+++ brlcad/branches/bioh/src/adrt/CMakeLists.txt        2020-05-21 02:34:47 UTC 
(rev 75860)
@@ -71,9 +71,9 @@
 
   set(isst_libs libtclcad librender libdm ${TCL_LIBRARY} ${OPENGL_LIBRARIES})
 
-  if(CPP_DLL_DEFINES)
+  if(MSVC)
     set(isst_libs ${isst_libs} imm32.lib comctl32.lib opengl32.lib)
-  endif(CPP_DLL_DEFINES)
+  endif(MSVC)
 
   BRLCAD_ADDDATA(isst.tcl tclscripts/isst)
   BRLCAD_ADDEXEC(isst isst.c "${isst_libs}" GUI)

Modified: brlcad/branches/bioh/src/adrt/librender/render_internal.h
===================================================================
--- brlcad/branches/bioh/src/adrt/librender/render_internal.h   2020-05-21 
00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/src/adrt/librender/render_internal.h   2020-05-21 
02:34:47 UTC (rev 75860)
@@ -24,6 +24,7 @@
 #ifndef ADRT_LIBRENDER_RENDER_INTERNAL_H
 #define ADRT_LIBRENDER_RENDER_INTERNAL_H
 
+#include "common.h"
 #include "rt/tie.h"
 
 #ifndef RENDER_EXPORT
@@ -32,9 +33,9 @@
 #  elif defined(STATIC_BUILD)
 #    define RENDER_EXPORT
 #  elif defined(RENDER_DLL_EXPORTS)
-#    define RENDER_EXPORT __declspec(dllexport)
+#    define RENDER_EXPORT COMPILER_DLLEXPORT
 #  elif defined(RENDER_DLL_IMPORTS)
-#    define RENDER_EXPORT __declspec(dllimport)
+#    define RENDER_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define RENDER_EXPORT
 #  endif

Modified: brlcad/branches/bioh/src/archer/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/archer/CMakeLists.txt      2020-05-21 00:45:39 UTC 
(rev 75859)
+++ brlcad/branches/bioh/src/archer/CMakeLists.txt      2020-05-21 02:34:47 UTC 
(rev 75860)
@@ -11,9 +11,9 @@
 
 set(archer_libs libtclcad libbu ${ITCL_LIBRARY} ${ITK_LIBRARY} ${TCL_LIBRARY})
 
-if(CPP_DLL_DEFINES)
+if(MSVC)
   set(archer_libs ${archer_libs} imm32.lib comctl32.lib)
-endif(CPP_DLL_DEFINES)
+endif(MSVC)
 
 # NOTE: Building "GUI" doesn't matter except on Windows, but on Windows archer
 # currently works only in graphical mode - might as well behave "nicely" there.

Modified: brlcad/branches/bioh/src/brlman/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/brlman/CMakeLists.txt      2020-05-21 00:45:39 UTC 
(rev 75859)
+++ brlcad/branches/bioh/src/brlman/CMakeLists.txt      2020-05-21 02:34:47 UTC 
(rev 75860)
@@ -15,9 +15,9 @@
   set(brlman_libs ${brlman_libs} Tkhtml)
 endif(TARGET Tkhtml)
 
-if(CPP_DLL_DEFINES)
+if(MSVC)
   set(brlman_libs ${brlman_libs} imm32.lib comctl32.lib)
-endif(CPP_DLL_DEFINES)
+endif(MSVC)
 
 # Building "GUI" doesn't matter except on Windows, but
 # on Windows brlman works only in graphical mode - might

Modified: brlcad/branches/bioh/src/bwish/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/bwish/CMakeLists.txt       2020-05-21 00:45:39 UTC 
(rev 75859)
+++ brlcad/branches/bioh/src/bwish/CMakeLists.txt       2020-05-21 02:34:47 UTC 
(rev 75860)
@@ -31,9 +31,9 @@
     set(bwish_libs ${bwish_libs} libtermio)
   endif(TARGET libtermio)
 
-  if(CPP_DLL_DEFINES)
+  if(MSVC)
     set(bwish_libs ${bwish_libs} imm32.lib comctl32.lib )
-  endif(CPP_DLL_DEFINES)
+  endif(MSVC)
 
   BRLCAD_ADDEXEC(bwish "main.c;cmd.c;input.c" "${bwish_libs}" GUI)
   set_target_properties(bwish PROPERTIES COMPILE_DEFINITIONS "BWISH=1")

Modified: brlcad/branches/bioh/src/conv/ply/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/conv/ply/CMakeLists.txt    2020-05-21 00:45:39 UTC 
(rev 75859)
+++ brlcad/branches/bioh/src/conv/ply/CMakeLists.txt    2020-05-21 02:34:47 UTC 
(rev 75860)
@@ -8,10 +8,10 @@
 BRLCAD_ADDEXEC(ply-g "ply-g.c;rply.c" "librt;libnmg;libbu;libwdb")
 BRLCAD_ADDEXEC(g-ply "g-ply.c;rply.c" "librt;libnmg;libbu")
 
-if (CPP_DLL_DEFINES)
+if (HIDE_INTERNAL_SYMBOLS)
   set_property(TARGET ply-g APPEND PROPERTY COMPILE_DEFINITIONS 
"RPLY_DLL_IMPORTS")
   set_property(TARGET g-ply APPEND PROPERTY COMPILE_DEFINITIONS 
"RPLY_DLL_IMPORTS")
-endif (CPP_DLL_DEFINES)
+endif (HIDE_INTERNAL_SYMBOLS)
 
 CMAKEFILES(
   CMakeLists.txt

Modified: brlcad/branches/bioh/src/conv/ply/rply.h
===================================================================
--- brlcad/branches/bioh/src/conv/ply/rply.h    2020-05-21 00:45:39 UTC (rev 
75859)
+++ brlcad/branches/bioh/src/conv/ply/rply.h    2020-05-21 02:34:47 UTC (rev 
75860)
@@ -15,9 +15,9 @@
 #  if defined(RPLY_DLL_EXPORTS) && defined(RPLY_DLL_IMPORTS)
 #    error "Only RPLY_DLL_EXPORTS or RPLY_DLL_IMPORTS can be defined, not 
both."
 #  elif defined(RPLY_DLL_EXPORTS)
-#    define RPLY_EXPORT __declspec(dllexport)
+#    define RPLY_EXPORT COMPILER_DLLEXPORT
 #  elif defined(RPLY_DLL_IMPORTS)
-#    define RPLY_EXPORT __declspec(dllimport)
+#    define RPLY_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define RPLY_EXPORT
 #  endif

Modified: brlcad/branches/bioh/src/conv/step/step-g/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/conv/step/step-g/CMakeLists.txt    2020-05-21 
00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/src/conv/step/step-g/CMakeLists.txt    2020-05-21 
02:34:47 UTC (rev 75860)
@@ -469,12 +469,12 @@
 add_dependencies(step-g step-express-${SCHEMA_NAME}-stepg)
 set_property(TARGET step-g APPEND PROPERTY INCLUDE_DIRECTORIES 
"${stepg_SCHEMA_OUT_DIR}")
 
-if(CPP_DLL_DEFINES)
-  set(SCIMPORTS SC_CORE_DLL_IMPORTS SC_DAI_DLL_IMPORTS SC_EDITOR_DLL_IMPORTS 
SC_UTILS_DLL_IMPORTS)
+if(HIDE_INTERNAL_SYMBOLS)
+  set(SCIMPORTS SC_CORE_DLL_IMPORTS SC_DAI_DLL_IMPORTS SC_EDITOR_DLL_IMPORTS 
SC_UTILS_DLL_IMPORTS ON_DLL_IMPORTS)
   foreach(scp ${SCIMPORTS})
     set_property(TARGET step-g APPEND PROPERTY COMPILE_DEFINITIONS "${scp}")
   endforeach(scp ${SCIMPORTS})
-endif(CPP_DLL_DEFINES)
+endif(HIDE_INTERNAL_SYMBOLS)
 
 CMAKEFILES(CMakeLists.txt)
 

Modified: brlcad/branches/bioh/src/external/Creo/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/external/Creo/CMakeLists.txt       2020-05-21 
00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/src/external/Creo/CMakeLists.txt       2020-05-21 
02:34:47 UTC (rev 75860)
@@ -365,7 +365,7 @@
   add_library(creo-brl ${creo_brl_srcs})
   target_link_libraries(creo-brl librt libwdb libbrep libbg libnmg libbn libbu)
   set_target_properties(creo-brl PROPERTIES FOLDER "BRL-CAD Executables/Build 
Only")
-  if(CPP_DLL_DEFINES)
+  if(HIDE_INTERNAL_SYMBOLS)
     set_property(TARGET creo-brl APPEND PROPERTY COMPILE_DEFINITIONS 
"BU_DLL_IMPORTS")
     set_property(TARGET creo-brl APPEND PROPERTY COMPILE_DEFINITIONS 
"BN_DLL_IMPORTS")
     set_property(TARGET creo-brl APPEND PROPERTY COMPILE_DEFINITIONS 
"NMG_DLL_IMPORTS")
@@ -379,7 +379,7 @@
     set_property(TARGET creo-brl APPEND PROPERTY COMPILE_DEFINITIONS 
"VDS_DLL_IMPORTS")
     set_property(TARGET creo-brl APPEND PROPERTY COMPILE_DEFINITIONS 
"ON_DLL_IMPORTS")
     set_property(TARGET creo-brl APPEND PROPERTY COMPILE_DEFINITIONS 
"LZ4_DLL_IMPORT=1")
-  endif(CPP_DLL_DEFINES)
+  endif(HIDE_INTERNAL_SYMBOLS)
 
   # Distcheck file list
   set(creo_dist_files

Modified: brlcad/branches/bioh/src/external/Cubit/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/external/Cubit/CMakeLists.txt      2020-05-21 
00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/src/external/Cubit/CMakeLists.txt      2020-05-21 
02:34:47 UTC (rev 75860)
@@ -24,7 +24,7 @@
   add_library(g-sat ${g_sat_srcs})
   target_link_libraries(g-sat librt libwdb libbrep libbg libnmg libbn libbu)
   set_target_properties(g-sat PROPERTIES FOLDER "BRL-CAD Executables/Build 
Only")
-  if(CPP_DLL_DEFINES)
+  if(HIDE_INTERNAL_SYMBOLS)
     set_property(TARGET g-sat APPEND PROPERTY COMPILE_DEFINITIONS 
"BU_DLL_IMPORTS")
     set_property(TARGET g-sat APPEND PROPERTY COMPILE_DEFINITIONS 
"BN_DLL_IMPORTS")
     set_property(TARGET g-sat APPEND PROPERTY COMPILE_DEFINITIONS 
"NMG_DLL_IMPORTS")
@@ -39,7 +39,7 @@
     set_property(TARGET g-sat APPEND PROPERTY COMPILE_DEFINITIONS 
"ON_DLL_IMPORTS")
     set_property(TARGET g-sat APPEND PROPERTY COMPILE_DEFINITIONS 
"TINYCTHREAD_DLL_IMPORTS")
     set_property(TARGET g-sat APPEND PROPERTY COMPILE_DEFINITIONS 
"LZ4_DLL_IMPORT=1")
-  endif(CPP_DLL_DEFINES)
+  endif(HIDE_INTERNAL_SYMBOLS)
 
   CMAKEFILES(${g_sat_srcs} shim.h)
   CMAKEFILES(CMakeLists.txt)

Modified: brlcad/branches/bioh/src/external/Unigraphics/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/external/Unigraphics/CMakeLists.txt        
2020-05-21 00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/src/external/Unigraphics/CMakeLists.txt        
2020-05-21 02:34:47 UTC (rev 75860)
@@ -26,7 +26,7 @@
   add_library(ug-g ${ug_g_srcs})
   target_link_libraries(ug-g librt libwdb libbrep libbg libnmg libbn libbu 
${TCL_LIBRARY})
   set_target_properties(ug-g PROPERTIES FOLDER "BRL-CAD Executables/Build 
Only")
-  if(CPP_DLL_DEFINES)
+  if(HIDE_INTERNAL_SYMBOLS)
     set_property(TARGET ug-g APPEND PROPERTY COMPILE_DEFINITIONS 
"BU_DLL_IMPORTS")
     set_property(TARGET ug-g APPEND PROPERTY COMPILE_DEFINITIONS 
"BN_DLL_IMPORTS")
     set_property(TARGET ug-g APPEND PROPERTY COMPILE_DEFINITIONS 
"NMG_DLL_IMPORTS")
@@ -41,7 +41,7 @@
     set_property(TARGET ug-g APPEND PROPERTY COMPILE_DEFINITIONS 
"ON_DLL_IMPORTS")
     set_property(TARGET ug-g APPEND PROPERTY COMPILE_DEFINITIONS 
"TINYCTHREAD_DLL_IMPORTS")
     set_property(TARGET ug-g APPEND PROPERTY COMPILE_DEFINITIONS 
"LZ4_DLL_IMPORT=1")
-  endif(CPP_DLL_DEFINES)
+  endif(HIDE_INTERNAL_SYMBOLS)
 
   # Distcheck file list
   CMAKEFILES(${ug_g_srcs} conv.h log.h shim.h ug-g.1 ug_misc.h)

Modified: brlcad/branches/bioh/src/libbg/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/libbg/CMakeLists.txt       2020-05-21 00:45:39 UTC 
(rev 75859)
+++ brlcad/branches/bioh/src/libbg/CMakeLists.txt       2020-05-21 02:34:47 UTC 
(rev 75860)
@@ -32,10 +32,10 @@
 
 BRLCAD_ADDLIB(libbg "${LIBBG_SOURCES}" "libbn;libbu;SPSR;${P2T_LIBRARY}")
 set_target_properties(libbg PROPERTIES VERSION 20.0.1 SOVERSION 20)
-if(CPP_DLL_DEFINES)
+if(HIDE_INTERNAL_SYMBOLS)
   set_property(TARGET libbg APPEND PROPERTY COMPILE_DEFINITIONS 
"SPSR_DLL_IMPORTS")
   set_property(TARGET libbg APPEND PROPERTY COMPILE_DEFINITIONS 
"P2T_DLL_IMPORTS")
-endif(CPP_DLL_DEFINES)
+endif(HIDE_INTERNAL_SYMBOLS)
 
 add_subdirectory(tests)
 

Modified: brlcad/branches/bioh/src/libbrep/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/libbrep/CMakeLists.txt     2020-05-21 00:45:39 UTC 
(rev 75859)
+++ brlcad/branches/bioh/src/libbrep/CMakeLists.txt     2020-05-21 02:34:47 UTC 
(rev 75860)
@@ -82,9 +82,9 @@
 CMAKEFILES(${libbrep_ignored_files})
 
 # Anyone who needs to import libbrep will also need to import openNURBS
-if(CPP_DLL_DEFINES)
+if(HIDE_INTERNAL_SYMBOLS)
   set_property(GLOBAL APPEND PROPERTY libbrep_DLL_DEFINES "ON_DLL_IMPORTS")
-endif(CPP_DLL_DEFINES)
+endif(HIDE_INTERNAL_SYMBOLS)
 
 BRLCAD_ADDLIB(libbrep "${LIBBREP_SOURCES}" 
"libbg;libbn;libbu;${OPENNURBS_LIBRARIES};${P2T_LIBRARY};${WINSOCK_LIB};${RPCRT_LIB};${STDCXX_LIBRARIES}")
 

Modified: brlcad/branches/bioh/src/libbu/tests/dylib/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/libbu/tests/dylib/CMakeLists.txt   2020-05-21 
00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/src/libbu/tests/dylib/CMakeLists.txt   2020-05-21 
02:34:47 UTC (rev 75860)
@@ -32,19 +32,19 @@
 endforeach (target_name${plugins})
 
 add_library(libdylib SHARED dylib.c)
-if (CPP_DLL_DEFINES)
+if (HIDE_INTERNAL_SYMBOLS)
   set_property(TARGET plugin_1 APPEND PROPERTY COMPILE_DEFINITIONS 
BU_DYLIB_DLL_EXPORTS)
   set_property(TARGET plugin_2 APPEND PROPERTY COMPILE_DEFINITIONS 
BU_DYLIB_DLL_EXPORTS)
   set_property(TARGET libdylib APPEND PROPERTY COMPILE_DEFINITIONS 
BU_DYLIB_DLL_EXPORTS)
-endif (CPP_DLL_DEFINES)
+endif (HIDE_INTERNAL_SYMBOLS)
 target_link_libraries(libdylib libbu)
 set_target_properties(libdylib PROPERTIES FOLDER "BRL-CAD Executables/Test 
Programs/dylib")
 
 add_executable(bu_dylib run.c)
 target_link_libraries(bu_dylib libdylib libbu)
-if (CPP_DLL_DEFINES)
+if (HIDE_INTERNAL_SYMBOLS)
   set_property(TARGET bu_dylib APPEND PROPERTY COMPILE_DEFINITIONS 
BU_DYLIB_DLL_IMPORTS)
-endif (CPP_DLL_DEFINES)
+endif (HIDE_INTERNAL_SYMBOLS)
 set_target_properties(bu_dylib PROPERTIES FOLDER "BRL-CAD Executables/Test 
Programs/dylib")
 
 # As a build convenience, make bu_dylib depend on everything

Modified: brlcad/branches/bioh/src/libbu/tests/dylib/dylib.h
===================================================================
--- brlcad/branches/bioh/src/libbu/tests/dylib/dylib.h  2020-05-21 00:45:39 UTC 
(rev 75859)
+++ brlcad/branches/bioh/src/libbu/tests/dylib/dylib.h  2020-05-21 02:34:47 UTC 
(rev 75860)
@@ -18,9 +18,9 @@
 #  if defined(BU_DYLIB_DLL_EXPORTS) && defined(BU_DYLIB_DLL_IMPORTS)
 #    error "Only BU_DYLIB_DLL_EXPORTS or BU_DYLIB_DLL_IMPORTS can be defined, 
not both."
 #  elif defined(BU_DYLIB_DLL_EXPORTS)
-#    define BU_DYLIB_EXPORT __declspec(dllexport)
+#    define BU_DYLIB_EXPORT COMPILER_DLLEXPORT
 #  elif defined(BU_DYLIB_DLL_IMPORTS)
-#    define BU_DYLIB_EXPORT __declspec(dllimport)
+#    define BU_DYLIB_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define BU_DYLIB_EXPORT
 #  endif

Modified: brlcad/branches/bioh/src/libdm/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/libdm/CMakeLists.txt       2020-05-21 00:45:39 UTC 
(rev 75859)
+++ brlcad/branches/bioh/src/libdm/CMakeLists.txt       2020-05-21 02:34:47 UTC 
(rev 75860)
@@ -118,9 +118,9 @@
 
 if(BRLCAD_ENABLE_OSG)
   BRLCAD_ADDEXEC(osg-test osg-test.cpp "librt;libbu;${OSG_LIBRARIES}" 
NO_STRICT NO_INSTALL)
-  if(CPP_DLL_DEFINES)
+  if(HIDE_INTERNAL_SYMBOLS)
     set_property(TARGET libdm APPEND PROPERTY COMPILE_DEFINITIONS 
"FREETYPE_DLL_IMPORTS")
-  endif(CPP_DLL_DEFINES)
+  endif(HIDE_INTERNAL_SYMBOLS)
 endif(BRLCAD_ENABLE_OSG)
 
 if(BRLCAD_BUILD_LOCAL_TK AND BRLCAD_ENABLE_TK)

Modified: brlcad/branches/bioh/src/libgcv/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/libgcv/CMakeLists.txt      2020-05-21 00:45:39 UTC 
(rev 75859)
+++ brlcad/branches/bioh/src/libgcv/CMakeLists.txt      2020-05-21 02:34:47 UTC 
(rev 75860)
@@ -9,11 +9,11 @@
   )
 BRLCAD_LIB_INCLUDE_DIRS(gcv GCV_INCLUDE_DIRS "")
 
-if(CPP_DLL_DEFINES)
+if(MSVC)
   set(LIBGCV_PLUGINS_PATH "${BIN_DIR}")
-else(CPP_DLL_DEFINES)
+else(MSVC)
   set(LIBGCV_PLUGINS_PATH "${LIB_DIR}")
-endif(CPP_DLL_DEFINES)
+endif(MSVC)
 set(LIBGCV_PLUGINS_DIRECTORY "libgcv_plugins")
 add_subdirectory(plugins)
 
@@ -35,9 +35,9 @@
 
 enable_testing()
 BRLCAD_ADDEXEC(test_bottess test_bottess.c libgcv NO_INSTALL)
-if(CPP_DLL_DEFINES)
+if(HIDE_INTERNAL_SYMBOLS)
   set_property(TARGET test_bottess APPEND PROPERTY COMPILE_DEFINITIONS 
"BOTTESS_DLL_IMPORTS")
-endif(CPP_DLL_DEFINES)
+endif(HIDE_INTERNAL_SYMBOLS)
 add_test(NAME bottess_test COMMAND test_bottess)
 
 

Modified: brlcad/branches/bioh/src/libgcv/plugins/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/libgcv/plugins/CMakeLists.txt      2020-05-21 
00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/src/libgcv/plugins/CMakeLists.txt      2020-05-21 
02:34:47 UTC (rev 75860)
@@ -28,9 +28,12 @@
   endif(NOT CMAKE_CONFIGURATION_TYPES)
 
   # We're using GCV_EXPORT for these plugins, so we need to set the 
DLL_EXPORTS accordingly
-  if(CPP_DLL_DEFINES)
+  if(HIDE_INTERNAL_SYMBOLS)
     set_property(TARGET ${target_name} APPEND PROPERTY COMPILE_DEFINITIONS 
"GCV_DLL_EXPORTS")
-  endif(CPP_DLL_DEFINES)
+    if (TARGET ${target_name}-obj)
+      set_property(TARGET ${target_name}-obj APPEND PROPERTY 
COMPILE_DEFINITIONS "GCV_DLL_EXPORTS")
+    endif (TARGET ${target_name}-obj)
+  endif(HIDE_INTERNAL_SYMBOLS)
 
   install(TARGETS ${target_name}
     RUNTIME DESTINATION ${BIN_DIR}/${LIBGCV_PLUGINS_DIRECTORY}

Modified: brlcad/branches/bioh/src/libgcv/plugins/obj/wfobj/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/libgcv/plugins/obj/wfobj/CMakeLists.txt    
2020-05-21 00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/src/libgcv/plugins/obj/wfobj/CMakeLists.txt    
2020-05-21 02:34:47 UTC (rev 75860)
@@ -109,10 +109,11 @@
 add_library(libwfobj SHARED ${WFOBJ_SRCS})
 set_target_properties(libwfobj PROPERTIES PREFIX "")
 set_target_properties(libwfobj PROPERTIES VERSION 20.0.1 SOVERSION 20)
-if(MSVC)
+if(HIDE_INTERNAL_SYMBOLS)
   set_property(TARGET libwfobj APPEND PROPERTY COMPILE_DEFINITIONS 
"WFOBJ_DLL_EXPORTS")
-endif(MSVC)
+endif(HIDE_INTERNAL_SYMBOLS)
 set_property(TARGET libwfobj APPEND PROPERTY INCLUDE_DIRECTORIES 
"${GENERATED_INCLUDES}")
+
 install(TARGETS libwfobj 
   RUNTIME DESTINATION ${BIN_DIR}
   LIBRARY DESTINATION ${LIB_DIR}

Modified: brlcad/branches/bioh/src/libgcv/plugins/obj/wfobj/obj_util.h
===================================================================
--- brlcad/branches/bioh/src/libgcv/plugins/obj/wfobj/obj_util.h        
2020-05-21 00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/src/libgcv/plugins/obj/wfobj/obj_util.h        
2020-05-21 02:34:47 UTC (rev 75860)
@@ -34,9 +34,9 @@
 #  elif defined(STATIC_BUILD)
 #    define WFOBJ_EXPORT
 #  elif defined(WFOBJ_DLL_EXPORTS)
-#    define WFOBJ_EXPORT __declspec(dllexport)
+#    define WFOBJ_EXPORT COMPILER_DLLEXPORT
 #  elif defined(WFOBJ_DLL_IMPORTS)
-#    define WFOBJ_EXPORT __declspec(dllimport)
+#    define WFOBJ_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define WFOBJ_EXPORT
 #  endif

Modified: brlcad/branches/bioh/src/libicv/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/libicv/CMakeLists.txt      2020-05-21 00:45:39 UTC 
(rev 75859)
+++ brlcad/branches/bioh/src/libicv/CMakeLists.txt      2020-05-21 02:34:47 UTC 
(rev 75860)
@@ -26,9 +26,9 @@
 
 BRLCAD_ADDLIB(libicv "${LIBICV_SOURCES}" 
"libbu;libbn;${PNG_LIBRARIES};${NETPBM_LIBRARY}")
 set_target_properties(libicv PROPERTIES VERSION 20.0.1 SOVERSION 20)
-if(CPP_DLL_DEFINES)
+if(HIDE_INTERNAL_SYMBOLS)
   set_property(TARGET libicv APPEND PROPERTY COMPILE_DEFINITIONS 
"NETPBM_DLL_IMPORTS")
-endif(CPP_DLL_DEFINES)
+endif(HIDE_INTERNAL_SYMBOLS)
 
 add_subdirectory(tests)
 

Modified: brlcad/branches/bioh/src/librt/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/librt/CMakeLists.txt       2020-05-21 00:45:39 UTC 
(rev 75859)
+++ brlcad/branches/bioh/src/librt/CMakeLists.txt       2020-05-21 02:34:47 UTC 
(rev 75860)
@@ -364,13 +364,13 @@
 BRLCAD_ADDLIB(librt "${LIBRT_SOURCES}" 
"${OPENCL_LIBS};${GDIAM_LIBRARY};${VDS_LIBRARY};libbrep;libnmg;libbg;libbn;libbu;${OPENNURBS_LIBRARIES};${P2T_LIBRARY};${SPR_LIB};${REGEX_LIBRARIES};${LZ4_LIBRARIES};${WINSOCK_LIB};${RPCRT_LIB};${STDCXX_LIBRARIES}")
 
 set_target_properties(librt PROPERTIES VERSION 20.0.1 SOVERSION 20)
-if(CPP_DLL_DEFINES)
+if(HIDE_INTERNAL_SYMBOLS)
   set_property(TARGET librt APPEND PROPERTY COMPILE_DEFINITIONS 
"TIE_DLL_EXPORTS")
   set_property(TARGET librt APPEND PROPERTY COMPILE_DEFINITIONS 
"DB5_DLL_EXPORTS")
   set_property(TARGET librt APPEND PROPERTY COMPILE_DEFINITIONS 
"VDS_DLL_IMPORTS")
   set_property(TARGET librt APPEND PROPERTY COMPILE_DEFINITIONS 
"GDIAM_DLL_IMPORTS")
   set_property(TARGET librt APPEND PROPERTY COMPILE_DEFINITIONS 
"LZ4_DLL_IMPORT=1")
-endif(CPP_DLL_DEFINES)
+endif(HIDE_INTERNAL_SYMBOLS)
 
 # The following is build code for test applications used during
 # development

Modified: brlcad/branches/bioh/src/libtclcad/tkImgFmtPIX.c
===================================================================
--- brlcad/branches/bioh/src/libtclcad/tkImgFmtPIX.c    2020-05-21 00:45:39 UTC 
(rev 75859)
+++ brlcad/branches/bioh/src/libtclcad/tkImgFmtPIX.c    2020-05-21 02:34:47 UTC 
(rev 75860)
@@ -66,6 +66,7 @@
 #include "fb.h"
 #include "tk.h"
 
+#include "tclcad.h"
 
 /* we need tk version numbers for compatibility compilation */
 #if !defined(TK_MAJOR_VERSION) || (TK_MAJOR_VERSION != 8)
@@ -90,7 +91,7 @@
                                                  const char *fileName, Tcl_Obj 
*formatString,
                                                  Tk_PhotoImageBlock 
*blockPtr));
 
-Tk_PhotoImageFormat tkImgFmtPIX = {
+TCLCAD_EXPORT Tk_PhotoImageFormat tkImgFmtPIX = {
     "PIX",                     /* name */
     FileMatchPIX,              /* fileMatchProc */
     NULL,                      /* stringMatchProc */

Modified: brlcad/branches/bioh/src/mged/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/mged/CMakeLists.txt        2020-05-21 00:45:39 UTC 
(rev 75859)
+++ brlcad/branches/bioh/src/mged/CMakeLists.txt        2020-05-21 02:34:47 UTC 
(rev 75860)
@@ -67,9 +67,9 @@
 if(TARGET libtermio)
   set(mged_libs ${mged_libs} libtermio)
 endif(TARGET libtermio)
-if(CPP_DLL_DEFINES)
+if(MSVC)
   set(mged_libs ${mged_libs} ws2_32.lib;opengl32.lib)
-endif(CPP_DLL_DEFINES)
+endif(MSVC)
 
 # Ideally we'd build as GUI for Windows to avoid the command window popping up,
 # but I'm not sure if that would be a problem for scripting with mged.exe on

Modified: brlcad/branches/bioh/src/other/openNURBS/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/src/other/openNURBS/CMakeLists.txt     2020-05-21 
00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/src/other/openNURBS/CMakeLists.txt     2020-05-21 
02:34:47 UTC (rev 75860)
@@ -39,7 +39,7 @@
 # If we can, use OBJECT libraries to build both shared and static
 # libraries from the same .o files, saving double compilation
 include(CMakeDependentOption)
-cmake_dependent_option(USE_OBJECT_LIBS "Use OBJECT libraries" ON "NOT 
CPP_DLL_DEFINES" OFF)
+cmake_dependent_option(USE_OBJECT_LIBS "Use OBJECT libraries" ON "NOT MSVC" 
OFF)
 
 if(BRLCAD_FLAGS_DEBUG)
   add_definitions(${DEBUG_CXX_FLAGS})

Modified: brlcad/branches/bioh/src/other/openNURBS/opennurbs_defines.h
===================================================================
--- brlcad/branches/bioh/src/other/openNURBS/opennurbs_defines.h        
2020-05-21 00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/src/other/openNURBS/opennurbs_defines.h        
2020-05-21 02:34:47 UTC (rev 75860)
@@ -90,10 +90,16 @@
 #endif
 
 /* compiling OpenNurbs as a Windows DLL - export classes, functions, 
templates, and globals */
-#define ON_CLASS __declspec(dllexport)
-#define ON_DECL __declspec(dllexport)
-#define ON_EXTERN_DECL __declspec(dllexport)
-#define ON_DLL_TEMPLATE
+#ifdef _WIN32
+# define ON_CLASS __declspec(dllexport)
+# define ON_DECL __declspec(dllexport)
+# define ON_EXTERN_DECL __declspec(dllexport)
+# define ON_DLL_TEMPLATE
+#else
+# define ON_CLASS __attribute__ ((visibility ("default")))
+# define ON_DECL __attribute__ ((visibility ("default")))
+# define ON_EXTERN_DECL __attribute__ ((visibility ("default")))
+#endif
 
 #elif defined(ON_DLL_IMPORTS)
 
@@ -102,10 +108,16 @@
 #endif
 
 /* using OpenNurbs as a Windows DLL - import classes, functions, templates, 
and globals */
-#define ON_CLASS __declspec(dllimport)
-#define ON_DECL __declspec(dllimport)
-#define ON_EXTERN_DECL __declspec(dllimport)
-#define ON_DLL_TEMPLATE extern
+#ifdef _WIN32
+# define ON_CLASS __declspec(dllimport)
+# define ON_DECL __declspec(dllimport)
+# define ON_EXTERN_DECL __declspec(dllimport)
+# define ON_DLL_TEMPLATE extern
+#else
+# define ON_CLASS __attribute__ ((visibility ("default")))
+# define ON_DECL __attribute__ ((visibility ("default")))
+# define ON_EXTERN_DECL __attribute__ ((visibility ("default")))
+#endif
 
 #else
 

Modified: brlcad/branches/bioh/src/other/stepcode/include/sc_export.h
===================================================================
--- brlcad/branches/bioh/src/other/stepcode/include/sc_export.h 2020-05-21 
00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/src/other/stepcode/include/sc_export.h 2020-05-21 
02:34:47 UTC (rev 75860)
@@ -1,12 +1,20 @@
 #ifndef SC_EXPORT_H
 #define SC_EXPORT_H
 
+#if defined(_WIN32)
+# define COMPILER_DLLEXPORT COMPILER_DLLEXPORT
+# define COMPILER_DLLIMPORT DLLIMPORT
+#else
+# define COMPILER_DLLEXPORT __attribute__ ((visibility ("default")))
+# define COMPILER_DLLIMPORT __attribute__ ((visibility ("default")))
+#endif
+
 /* Import/Export flags for base. */
 #ifndef SC_BASE_EXPORT
 # if defined(SC_BASE_DLL_EXPORTS) && defined(SC_BASE_DLL_IMPORTS)
 #  error "Only SC_BASE_DLL_EXPORTS or SC_BASE_DLL_IMPORTS can be defined, not 
both."
 # elif defined(SC_BASE_DLL_EXPORTS)
-#  define SC_BASE_EXPORT __declspec(dllexport)
+#  define SC_BASE_EXPORT COMPILER_DLLEXPORT
 # elif defined(SC_BASE_DLL_IMPORTS)
 #  define SC_BASE_EXPORT __declspec(dllimport)
 # else
@@ -19,7 +27,7 @@
 #  if defined(SC_EXPRESS_DLL_EXPORTS) && defined(SC_EXPRESS_DLL_IMPORTS)
 #    error "Only SC_EXPRESS_DLL_EXPORTS or SC_EXPRESS_DLL_IMPORTS can be 
defined, not both."
 #  elif defined(SC_EXPRESS_DLL_EXPORTS)
-#    define SC_EXPRESS_EXPORT __declspec(dllexport)
+#    define SC_EXPRESS_EXPORT COMPILER_DLLEXPORT
 #  elif defined(SC_EXPRESS_DLL_IMPORTS)
 #    define SC_EXPRESS_EXPORT __declspec(dllimport)
 #  else
@@ -32,7 +40,7 @@
 #  if defined(SC_EXPPP_DLL_EXPORTS) && defined(SC_EXPPP_DLL_IMPORTS)
 #    error "Only SC_EXPPP_DLL_EXPORTS or SC_EXPPP_DLL_IMPORTS can be defined, 
not both."
 #  elif defined(SC_EXPPP_DLL_EXPORTS)
-#    define SC_EXPPP_EXPORT __declspec(dllexport)
+#    define SC_EXPPP_EXPORT COMPILER_DLLEXPORT
 #  elif defined(SC_EXPPP_DLL_IMPORTS)
 #    define SC_EXPPP_EXPORT __declspec(dllimport)
 #  else
@@ -45,9 +53,9 @@
 #  if defined(SC_UTILS_DLL_EXPORTS) && defined(SC_UTILS_DLL_IMPORTS)
 #    error "Only SC_UTILS_DLL_EXPORTS or SC_UTILS_DLL_IMPORTS can be defined, 
not both."
 #  elif defined(SC_UTILS_DLL_EXPORTS)
-#    define SC_UTILS_EXPORT __declspec(dllexport)
+#    define SC_UTILS_EXPORT COMPILER_DLLEXPORT
 #  elif defined(SC_UTILS_DLL_IMPORTS)
-#    define SC_UTILS_EXPORT __declspec(dllimport)
+#    define SC_UTILS_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define SC_UTILS_EXPORT
 #  endif
@@ -58,9 +66,9 @@
 #  if defined(SC_DAI_DLL_EXPORTS) && defined(SC_DAI_DLL_IMPORTS)
 #    error "Only SC_DAI_DLL_EXPORTS or SC_DAI_DLL_IMPORTS can be defined, not 
both."
 #  elif defined(SC_DAI_DLL_EXPORTS)
-#    define SC_DAI_EXPORT __declspec(dllexport)
+#    define SC_DAI_EXPORT COMPILER_DLLEXPORT
 #  elif defined(SC_DAI_DLL_IMPORTS)
-#    define SC_DAI_EXPORT __declspec(dllimport)
+#    define SC_DAI_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define SC_DAI_EXPORT
 #  endif
@@ -71,9 +79,9 @@
 #  if defined(SC_CORE_DLL_EXPORTS) && defined(SC_CORE_DLL_IMPORTS)
 #    error "Only SC_CORE_DLL_EXPORTS or SC_CORE_DLL_IMPORTS can be defined, 
not both."
 #  elif defined(SC_CORE_DLL_EXPORTS)
-#    define SC_CORE_EXPORT __declspec(dllexport)
+#    define SC_CORE_EXPORT COMPILER_DLLEXPORT
 #  elif defined(SC_CORE_DLL_IMPORTS)
-#    define SC_CORE_EXPORT __declspec(dllimport)
+#    define SC_CORE_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define SC_CORE_EXPORT
 #  endif
@@ -84,9 +92,9 @@
 #  if defined(SC_EDITOR_DLL_EXPORTS) && defined(SC_EDITOR_DLL_IMPORTS)
 #    error "Only SC_EDITOR_DLL_EXPORTS or SC_EDITOR_DLL_IMPORTS can be 
defined, not both."
 #  elif defined(SC_EDITOR_DLL_EXPORTS)
-#    define SC_EDITOR_EXPORT __declspec(dllexport)
+#    define SC_EDITOR_EXPORT COMPILER_DLLEXPORT
 #  elif defined(SC_EDITOR_DLL_IMPORTS)
-#    define SC_EDITOR_EXPORT __declspec(dllimport)
+#    define SC_EDITOR_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define SC_EDITOR_EXPORT
 #  endif
@@ -97,9 +105,9 @@
 #  if defined(SC_LAZYFILE_DLL_EXPORTS) && defined(SC_LAZYFILE_DLL_IMPORTS)
 #    error "Only SC_LAZYFILE_DLL_EXPORTS or SC_LAZYFILE_DLL_IMPORTS can be 
defined, not both."
 #  elif defined(SC_LAZYFILE_DLL_EXPORTS)
-#    define SC_LAZYFILE_EXPORT __declspec(dllexport)
+#    define SC_LAZYFILE_EXPORT COMPILER_DLLEXPORT
 #  elif defined(SC_LAZYFILE_DLL_IMPORTS)
-#    define SC_LAZYFILE_EXPORT __declspec(dllimport)
+#    define SC_LAZYFILE_EXPORT COMPILER_DLLIMPORT
 #  else
 #    define SC_LAZYFILE_EXPORT
 #  endif

Modified: brlcad/branches/bioh/src/other/stepcode/src/base/judy/src/judy.h
===================================================================
--- brlcad/branches/bioh/src/other/stepcode/src/base/judy/src/judy.h    
2020-05-21 00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/src/other/stepcode/src/base/judy/src/judy.h    
2020-05-21 02:34:47 UTC (rev 75860)
@@ -33,13 +33,22 @@
 //  judy_del:   delete the key and cell for the current stack entry.
 
 /* Import/Export flags for base. */
+#if defined(_WIN32)
+# define COMPILER_DLLEXPORT COMPILER_DLLEXPORT
+# define COMPILER_DLLIMPORT DLLIMPORT
+#else
+# define COMPILER_DLLEXPORT __attribute__ ((visibility ("default")))
+# define COMPILER_DLLIMPORT __attribute__ ((visibility ("default")))
+#endif
+
+
 #ifndef SC_BASE_EXPORT
 # if defined(SC_BASE_DLL_EXPORTS) && defined(SC_BASE_DLL_IMPORTS)
 #  error "Only SC_BASE_DLL_EXPORTS or SC_BASE_DLL_IMPORTS can be defined, not 
both."
 # elif defined(SC_BASE_DLL_EXPORTS)
-#  define SC_BASE_EXPORT __declspec(dllexport)
+#  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

Modified: brlcad/branches/bioh/src/other/stepcode/src/exp2cxx/classes_wrapper.cc
===================================================================
--- brlcad/branches/bioh/src/other/stepcode/src/exp2cxx/classes_wrapper.cc      
2020-05-21 00:45:39 UTC (rev 75859)
+++ brlcad/branches/bioh/src/other/stepcode/src/exp2cxx/classes_wrapper.cc      
2020-05-21 02:34:47 UTC (rev 75860)
@@ -65,9 +65,17 @@
     fprintf( files->incall, "# if defined(SC_%s_DLL_EXPORTS) && 
defined(SC_%s_DLL_IMPORTS)\n", "SCHEMA", "SCHEMA" );
     fprintf( files->incall, "#  error \"SC_%s_DLL_EXPORTS or SC_%s_DLL_IMPORTS 
can be defined, not both.\"\n", "SCHEMA", "SCHEMA" );
     fprintf( files->incall, "# elif defined(SC_%s_DLL_EXPORTS)\n", "SCHEMA" );
+#ifdef _WIN32
     fprintf( files->incall, "#  define SC_%s_EXPORT __declspec(dllexport)\n", 
"SCHEMA" );
+#else
+    fprintf( files->incall, "#  define SC_%s_EXPORT __attribute__ ((visibility 
(\"default\")))\n", "SCHEMA" );
+#endif
     fprintf( files->incall, "# elif defined(SC_%s_DLL_IMPORTS)\n", "SCHEMA" );
+#ifdef _WIN32
     fprintf( files->incall, "#  define SC_%s_EXPORT __declspec(dllimport)\n", 
"SCHEMA" );
+#else
+    fprintf( files->incall, "#  define SC_%s_EXPORT __attribute__ ((visibility 
(\"default\")))\n", "SCHEMA" );
+#endif
     fprintf( files->incall, "# else\n" );
     fprintf( files->incall, "#  define SC_%s_EXPORT\n", "SCHEMA" );
     fprintf( files->incall, "# endif\n" );

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