From 965a1475b64d7db1466f8312db8938b158b0cfe3 Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Wed, 29 Nov 2006 12:56:28 -0500 Subject: [PATCH] BUG: Fix problem with loading dylib on Tiger (10.4) x86. We need to be using the dlopen/dlclose instead of the old NSModule --- Source/kwsys/DynamicLoader.cxx | 16 ++++------------ Source/kwsys/DynamicLoader.hxx.in | 4 ++-- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/Source/kwsys/DynamicLoader.cxx b/Source/kwsys/DynamicLoader.cxx index a044dff54..0bcbba0f1 100644 --- a/Source/kwsys/DynamicLoader.cxx +++ b/Source/kwsys/DynamicLoader.cxx @@ -16,16 +16,6 @@ #include KWSYS_HEADER(Configure.hxx) -#ifdef __APPLE__ -#if MAC_OS_X_VERSION_MIN_REQUIRED < 1030 -#include // for strlen -#endif //MAC_OS_X_VERSION_MIN_REQUIRED < 1030 -#endif // __APPLE__ - -#ifdef __hpux -#include -#endif //__hpux - // Work-around CMake dependency scanning limitation. This must // duplicate the above list of headers. #if 0 @@ -59,6 +49,7 @@ DynamicLoader::~DynamicLoader() // --------------------------------------------------------------- // 1. Implementation for HPUX machines #ifdef __hpux +#include #include #define DYNAMICLOADER_DEFINED 1 @@ -141,7 +132,8 @@ const char* DynamicLoader::LastError() // --------------------------------------------------------------- // 2. Implementation for Mac OS X 10.2.x and earlier #ifdef __APPLE__ -#if MAC_OS_X_VERSION_MIN_REQUIRED < 1030 +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 +#include // for strlen #include #define DYNAMICLOADER_DEFINED 1 @@ -223,7 +215,7 @@ const char* DynamicLoader::LastError() } // namespace KWSYS_NAMESPACE -#endif //MAC_OS_X_VERSION_MIN_REQUIRED < 1030 +#endif // MAC_OS_X_VERSION_MAX_ALLOWED < 1030 #endif // __APPLE__ // --------------------------------------------------------------- diff --git a/Source/kwsys/DynamicLoader.hxx.in b/Source/kwsys/DynamicLoader.hxx.in index 5d3d048ac..ca1aa7018 100644 --- a/Source/kwsys/DynamicLoader.hxx.in +++ b/Source/kwsys/DynamicLoader.hxx.in @@ -22,7 +22,7 @@ #include #elif defined(__APPLE__) #include - #if MAC_OS_X_VERSION_MIN_REQUIRED < 1030 + #if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 #include #endif #endif @@ -57,7 +57,7 @@ public: #elif defined(_WIN32) typedef HMODULE LibraryHandle; #elif defined(__APPLE__) - #if MAC_OS_X_VERSION_MIN_REQUIRED < 1030 + #if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 typedef NSModule LibraryHandle; #else typedef void* LibraryHandle;