summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/DynamicLoader.hxx.in
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2006-12-09 16:25:25 (GMT)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2006-12-09 16:25:25 (GMT)
commitb9787a965f8d414b0d505ba48d10c0d4a5082d69 (patch)
tree14ecef09aa1bd3e8ceb2879fa09f3e78e10d4cca /Source/kwsys/DynamicLoader.hxx.in
parent945dfe5c8e020e73be6d36349ec29d0404b27c25 (diff)
downloadCMake-b9787a965f8d414b0d505ba48d10c0d4a5082d69.zip
CMake-b9787a965f8d414b0d505ba48d10c0d4a5082d69.tar.gz
CMake-b9787a965f8d414b0d505ba48d10c0d4a5082d69.tar.bz2
BUG: revert yesterday patch. The implementation was correct. The problem was that _WIN32 was forced to be #define on cygwin when included from ITK, which was miss matching the implementation from the declaration. Put extra condition for CYGWIN system
Diffstat (limited to 'Source/kwsys/DynamicLoader.hxx.in')
-rw-r--r--Source/kwsys/DynamicLoader.hxx.in9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/kwsys/DynamicLoader.hxx.in b/Source/kwsys/DynamicLoader.hxx.in
index 75177cc..a346992 100644
--- a/Source/kwsys/DynamicLoader.hxx.in
+++ b/Source/kwsys/DynamicLoader.hxx.in
@@ -18,7 +18,7 @@
#if defined(__hpux)
#include <dl.h>
-#elif defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
+#elif defined(_WIN32) && !defined(__CYGWIN__)
#include <windows.h>
#elif defined(__APPLE__)
#include <AvailabilityMacros.h>
@@ -47,6 +47,9 @@ namespace @KWSYS_NAMESPACE@
* Whereas this distinction does not exist on Win32. Therefore ideally you
* should be doing full path to garantee to have a consistent way of dealing
* with dynamic loading of shared library.
+ *
+ * \warning the Cygwin implementation do not use the Win32 HMODULE. Put extra
+ * condition so that we can include the correct declaration (POSIX)
*/
class @KWSYS_NAMESPACE@_EXPORT DynamicLoader
@@ -56,7 +59,7 @@ public:
// They are different on several different OS's
#if defined(__hpux)
typedef shl_t LibraryHandle;
-#elif defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
+#elif defined(_WIN32) && !defined(__CYGWIN__)
typedef HMODULE LibraryHandle;
#elif defined(__APPLE__)
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030
@@ -66,7 +69,7 @@ public:
#endif
#elif defined(__BEOS__)
typedef image_id LibraryHandle;
-#else
+#else // POSIX
typedef void* LibraryHandle;
#endif