summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/DynamicLoader.hxx.in
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2006-03-08 14:16:54 (GMT)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2006-03-08 14:16:54 (GMT)
commitd91bd3dbd37e645f756191799a9521284e81c1b2 (patch)
tree7c17fa56bf80ba1d429456072eefa2f1b787faf2 /Source/kwsys/DynamicLoader.hxx.in
parentcdc3c9d18bdfb86600b2e39bdc90ecd32c9cb654 (diff)
downloadCMake-d91bd3dbd37e645f756191799a9521284e81c1b2.zip
CMake-d91bd3dbd37e645f756191799a9521284e81c1b2.tar.gz
CMake-d91bd3dbd37e645f756191799a9521284e81c1b2.tar.bz2
BUG: Including file within a namespace{} is dangerous(unless symbols are within an extern C). Also update documentation about special case for MacOSX
Diffstat (limited to 'Source/kwsys/DynamicLoader.hxx.in')
-rw-r--r--Source/kwsys/DynamicLoader.hxx.in18
1 files changed, 15 insertions, 3 deletions
diff --git a/Source/kwsys/DynamicLoader.hxx.in b/Source/kwsys/DynamicLoader.hxx.in
index dc5a1d3..3430eb6 100644
--- a/Source/kwsys/DynamicLoader.hxx.in
+++ b/Source/kwsys/DynamicLoader.hxx.in
@@ -16,28 +16,40 @@
#include <@KWSYS_NAMESPACE@/Configure.h>
-namespace @KWSYS_NAMESPACE@
-{
// Ugly stuff for library handles
// They are different on several different OS's
#if defined(__hpux)
#include <dl.h>
+namespace @KWSYS_NAMESPACE@
+{
typedef shl_t LibHandle;
+} // namespace @KWSYS_NAMESPACE@
#elif defined(_WIN32)
#include <windows.h>
+namespace @KWSYS_NAMESPACE@
+{
typedef HMODULE LibHandle;
+} // namespace @KWSYS_NAMESPACE@
#elif defined(__APPLE__)
#include <AvailabilityMacros.h>
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1030
#include <mach-o/dyld.h>
+namespace @KWSYS_NAMESPACE@
+{
typedef NSModule LibHandle;
+} // namespace @KWSYS_NAMESPACE@
#else
+namespace @KWSYS_NAMESPACE@
+{
typedef void* LibHandle;
+} // namespace @KWSYS_NAMESPACE@
#endif
#else
+namespace @KWSYS_NAMESPACE@
+{
typedef void* LibHandle;
-#endif
} // namespace @KWSYS_NAMESPACE@
+#endif
namespace @KWSYS_NAMESPACE@
{