From 297ffd821a9f90bbc4d4875cc460b7ee27b3e6a0 Mon Sep 17 00:00:00 2001
From: Andy Cedilnik <andy.cedilnik@kitware.com>
Date: Thu, 16 Mar 2006 11:21:01 -0500
Subject: [PATCH] COMP: Fix problem with namespace

---
 DynamicLoader.hxx.in | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/DynamicLoader.hxx.in b/DynamicLoader.hxx.in
index 80ea2e3f..f061086e 100644
--- a/DynamicLoader.hxx.in
+++ b/DynamicLoader.hxx.in
@@ -16,6 +16,17 @@
 
 #include <@KWSYS_NAMESPACE@/Configure.h>
 
+#if defined(__hpux)
+  #include <dl.h>
+#elif defined(_WIN32)
+  #include <windows.h>
+#elif defined(__APPLE__)
+  #include <AvailabilityMacros.h>
+  #if MAC_OS_X_VERSION_MIN_REQUIRED < 1030
+    #include <mach-o/dyld.h>
+  #endif
+#endif
+
 namespace @KWSYS_NAMESPACE@
 {
 /** \class DynamicLoader
@@ -42,15 +53,11 @@ public:
 // Ugly stuff for library handles
 // They are different on several different OS's
 #if defined(__hpux)
-  #include <dl.h>
   typedef shl_t LibraryHandle;
 #elif defined(_WIN32)
-  #include <windows.h>
   typedef HMODULE LibraryHandle;
 #elif defined(__APPLE__)
-  #include <AvailabilityMacros.h>
   #if MAC_OS_X_VERSION_MIN_REQUIRED < 1030
-    #include <mach-o/dyld.h>
     typedef NSModule LibraryHandle;
   #else
     typedef void* LibraryHandle;
-- 
GitLab