From 1a79c689d694573c8649aca4e6fd58ecbbd70754 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 26 Jul 2015 16:44:33 +0100 Subject: Visibility hidden --- libfusepp/fuseAppBase.h | 5 ++++- netfs/daemon/Jamfile.jam | 4 ++++ netfs/daemon/daemon.cpp | 1 + netfs/daemon/daemon.h | 5 ++++- netfs/fuse/Jamfile.jam | 6 ++++++ netfs/fuse/fuseApp.h | 5 ++++- netfs/ice/Jamfile.jam | 1 + netfs/ice/typeConvert.h | 2 ++ netfs/lib/Jamfile.jam | 2 ++ netfs/lib/entCache.cpp | 32 ++++++++++++++++++-------------- 10 files changed, 46 insertions(+), 17 deletions(-) diff --git a/libfusepp/fuseAppBase.h b/libfusepp/fuseAppBase.h index ccd2027..1a4a0bc 100644 --- a/libfusepp/fuseAppBase.h +++ b/libfusepp/fuseAppBase.h @@ -7,8 +7,11 @@ #include #include #include +#ifndef DLL_PUBLIC +#define DLL_PUBLIC __attribute__ ((visibility ("default"))) +#endif -class FuseAppBase { +class DLL_PUBLIC FuseAppBase { public: FuseAppBase(); virtual ~FuseAppBase() = 0; diff --git a/netfs/daemon/Jamfile.jam b/netfs/daemon/Jamfile.jam index 53ac99d..47b81f6 100644 --- a/netfs/daemon/Jamfile.jam +++ b/netfs/daemon/Jamfile.jam @@ -20,6 +20,8 @@ lib netfsdConfiguration : ..//boost_system ..//slicer yes + -fvisibility=hidden + release:-flto : : . ..//IceUtil @@ -48,6 +50,8 @@ lib netfsd : ..//IceBox ..//libxmlpp ..//slicer-xml + -fvisibility=hidden + release:-flto : : . ../ice//netfsComms diff --git a/netfs/daemon/daemon.cpp b/netfs/daemon/daemon.cpp index 5f780d7..81a0462 100644 --- a/netfs/daemon/daemon.cpp +++ b/netfs/daemon/daemon.cpp @@ -71,6 +71,7 @@ NetFSDaemon::stop() } extern "C" { + DLL_PUBLIC IceBox::Service * createNetFSDaemon(Ice::CommunicatorPtr) { diff --git a/netfs/daemon/daemon.h b/netfs/daemon/daemon.h index e4e79ae..5f9542a 100644 --- a/netfs/daemon/daemon.h +++ b/netfs/daemon/daemon.h @@ -5,8 +5,11 @@ #include #include #include +#ifndef DLL_PUBLIC +#define DLL_PUBLIC __attribute__ ((visibility ("default"))) +#endif -class NetFSDaemon : public IceBox::Service { +class DLL_PUBLIC NetFSDaemon : public IceBox::Service { public: NetFSDaemon(); virtual ~NetFSDaemon(); diff --git a/netfs/fuse/Jamfile.jam b/netfs/fuse/Jamfile.jam index b0f04d6..142221e 100644 --- a/netfs/fuse/Jamfile.jam +++ b/netfs/fuse/Jamfile.jam @@ -20,6 +20,8 @@ lib netfsClientConfiguration : ..//IceUtil ..//pthread ..//slicer + -fvisibility=hidden + release:-flto : : ..//IceUtil ..//Ice @@ -50,6 +52,8 @@ lib netfsClient : ..//slicer ..//libxmlpp ..//slicer-xml + -fvisibility=hidden + release:-flto : : . ../../libfusepp @@ -65,5 +69,7 @@ exe netfs : netfs.cpp : netfsClient fuse + -fvisibility=hidden + release:-flto ; diff --git a/netfs/fuse/fuseApp.h b/netfs/fuse/fuseApp.h index 60ecee9..3ad8f66 100644 --- a/netfs/fuse/fuseApp.h +++ b/netfs/fuse/fuseApp.h @@ -9,9 +9,12 @@ #include "fuseAppBase.h" #include "fuseConfig.h" #include "cache.h" +#ifndef DLL_PUBLIC +#define DLL_PUBLIC __attribute__ ((visibility ("default"))) +#endif namespace NetFS { - class FuseApp : public FuseAppBase { + class DLL_PUBLIC FuseApp : public FuseAppBase { private: class OpenDir : public IceUtil::Shared { public: diff --git a/netfs/ice/Jamfile.jam b/netfs/ice/Jamfile.jam index d1e5ca6..d9d17dc 100644 --- a/netfs/ice/Jamfile.jam +++ b/netfs/ice/Jamfile.jam @@ -8,6 +8,7 @@ lib netfsComms : Ice IceUtil pthread + -fvisibility=hidden : : . Ice diff --git a/netfs/ice/typeConvert.h b/netfs/ice/typeConvert.h index 1c9e773..b07b117 100644 --- a/netfs/ice/typeConvert.h +++ b/netfs/ice/typeConvert.h @@ -25,11 +25,13 @@ struct StatSource { const EntryResolver & group; }; +#pragma GCC visibility push(default) void operator<<(struct stat &, const AttrSource &); void operator<<(struct statvfs &, const NetFS::VFS &); void operator<<(NetFS::Attr &, const struct StatSource &); void operator<<(NetFS::VFS &, const struct statvfs &); +#pragma GCC visibility pop #endif diff --git a/netfs/lib/Jamfile.jam b/netfs/lib/Jamfile.jam index 81d0be1..4172f3c 100644 --- a/netfs/lib/Jamfile.jam +++ b/netfs/lib/Jamfile.jam @@ -14,6 +14,8 @@ lib netfsCommon : ..//boost_thread ../ice//netfsComms ../ice//netfsComms + -fvisibility=hidden + release:-flto : : . ../../libmisc diff --git a/netfs/lib/entCache.cpp b/netfs/lib/entCache.cpp index 411202f..01a2de3 100644 --- a/netfs/lib/entCache.cpp +++ b/netfs/lib/entCache.cpp @@ -5,6 +5,10 @@ #include #include +#ifndef DLL_PUBLIC +#define DLL_PUBLIC __attribute__ ((visibility ("default"))) +#endif + template EntCache::EntCache() : fillTime(0) @@ -122,22 +126,22 @@ EntCache::fillCache() const } bool -Group::hasMember(uid_t u) const +DLL_PUBLIC Group::hasMember(uid_t u) const { return (members.find(u) != members.end()); } -template EntCache::EntCache(); -template EntCache::~EntCache(); -template IceUtil::Handle EntCache::getEntry(const std::string &) const; -template IceUtil::Handle EntCache::getEntry(const uid_t &) const; -template void EntCache::getName(const gid_t &, std::string *) const; -template void EntCache::getID(const std::string &, gid_t *) const; - -template EntCache::EntCache(); -template EntCache::~EntCache(); -template IceUtil::Handle EntCache::getEntry(const std::string &) const; -template IceUtil::Handle EntCache::getEntry(const gid_t &) const; -template void EntCache::getName(const gid_t &, std::string *) const; -template void EntCache::getID(const std::string &, gid_t *) const; +template DLL_PUBLIC EntCache::EntCache(); +template DLL_PUBLIC EntCache::~EntCache(); +template IceUtil::Handle DLL_PUBLIC EntCache::getEntry(const std::string &) const; +template IceUtil::Handle DLL_PUBLIC EntCache::getEntry(const uid_t &) const; +template DLL_PUBLIC void EntCache::getName(const gid_t &, std::string *) const; +template DLL_PUBLIC void EntCache::getID(const std::string &, gid_t *) const; + +template DLL_PUBLIC EntCache::EntCache(); +template DLL_PUBLIC EntCache::~EntCache(); +template IceUtil::Handle DLL_PUBLIC EntCache::getEntry(const std::string &) const; +template IceUtil::Handle DLL_PUBLIC EntCache::getEntry(const gid_t &) const; +template DLL_PUBLIC void EntCache::getName(const gid_t &, std::string *) const; +template DLL_PUBLIC void EntCache::getID(const std::string &, gid_t *) const; -- cgit v1.2.3