diff options
author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2006-03-08 14:16:54 (GMT) |
---|---|---|
committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2006-03-08 14:16:54 (GMT) |
commit | d91bd3dbd37e645f756191799a9521284e81c1b2 (patch) | |
tree | 7c17fa56bf80ba1d429456072eefa2f1b787faf2 /Source/kwsys/DynamicLoader.hxx.in | |
parent | cdc3c9d18bdfb86600b2e39bdc90ecd32c9cb654 (diff) | |
download | CMake-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.in | 18 |
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@ { |