summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FL/Fl_Export.H2
-rw-r--r--configure.in2
-rw-r--r--src/Fl_x.cxx1
-rw-r--r--src/numericsort.c4
4 files changed, 7 insertions, 2 deletions
diff --git a/FL/Fl_Export.H b/FL/Fl_Export.H
index 39a3ef627..c239910eb 100644
--- a/FL/Fl_Export.H
+++ b/FL/Fl_Export.H
@@ -29,6 +29,8 @@
# else
# define FL_EXPORT __declspec(dllimport)
# endif /* FL_LIBRARY */
+# elif __GNUC__ >= 4
+# define FL_EXPORT __attribute__ ((visibility ("default")))
# else
# define FL_EXPORT
# endif /* FL_DLL */
diff --git a/configure.in b/configure.in
index d8f99d1dd..f9c64da30 100644
--- a/configure.in
+++ b/configure.in
@@ -255,6 +255,8 @@ if test x$enable_shared = xyes; then
IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o"
+ OPTIM="$OPTIM -fvisibility=hidden"
+ CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib64"; then
DSOLINK="-Wl,-rpath,$libdir"
fi
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 758ee5491..65446af1c 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -36,6 +36,7 @@
# include <FL/Fl_Paged_Device.H>
# include <FL/Fl_Shared_Image.H>
# include <FL/fl_ask.H>
+# include <FL/filename.H>
# include <stdio.h>
# include <stdlib.h>
# include "flstring.h"
diff --git a/src/numericsort.c b/src/numericsort.c
index 498a13d7e..8ffe94aec 100644
--- a/src/numericsort.c
+++ b/src/numericsort.c
@@ -39,10 +39,10 @@
# include <ndir.h>
# endif /* HAVE_NDIR_H */
# endif /* HAVE_DIRENT_H */
-#else /* For WIN32 variants */
-# include <FL/filename.H>
#endif /* !WIN32 || __CYGWIN__ */
+#include <FL/filename.H>
+
/*
* 'numericsort()' - Compare two directory entries, possibly with
* a case-insensitive comparison...