[haiku-development] cmake dynamicloader should make use of dl*?

  • From: scott mc <scottmc2@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 28 Jan 2009 14:30:34 -0800

In working on the cmake port I've run into a failure of the dashboard
test "Plugin":
http://www.cdash.org/CDash/testDetails.php?test=15727830&build=254059

I think it traces back to DynamicLoader.cxx:
http://public.kitware.com/cgi-bin/viewcvs.cgi/Source/kwsys/DynamicLoader.cxx?revision=1.22.10.2&root=CMake&view=markup
I've tried removing the __HAIKU__ cases so that it falls through and
uses the default unix functions in section 6, but that didn't seem to
work either.

Here's the patch I made to DynamicLoader.cxx and it's header:


diff -urN CMake-orig/Source/kwsys/DynamicLoader.cxx
CMake-haiku/Source/kwsys/DynamicLoader.cxx
--- CMake-orig/Source/kwsys/DynamicLoader.cxx   2008-09-15
21:53:28.000000000 +0000
+++ CMake-haiku/Source/kwsys/DynamicLoader.cxx  2009-01-25
22:36:34.000000000 +0000
@@ -335,20 +335,13 @@
 #endif //_WIN32

 // ---------------------------------------------------------------
-// 4. Implementation for BeOS / Haiku
-#if defined __BEOS__ || defined(__HAIKU__)
+// 4. Implementation for BeOS
+#if defined __BEOS__

 #include <string.h> // for strerror()

-#ifdef __BEOS__
 #include <be/kernel/image.h>
 #include <be/support/Errors.h>
-#endif
-
-#ifdef __HAIKU__
-#include <os/kernel/image.h>
-#include <os/support/Errors.h>
-#endif

 #define DYNAMICLOADER_DEFINED 1

diff -urN CMake-orig/Source/kwsys/DynamicLoader.hxx.in
CMake-haiku/Source/kwsys/DynamicLoader.hxx.in
--- CMake-orig/Source/kwsys/DynamicLoader.hxx.in        2008-11-11
21:52:22.000000000 +0000
+++ CMake-haiku/Source/kwsys/DynamicLoader.hxx.in       2009-01-26
06:56:09.000000000 +0000
@@ -69,8 +69,6 @@
   #else
     typedef void* LibraryHandle;
   #endif
-#elif defined(__HAIKU__)
-  typedef image_id LibraryHandle;
 #elif defined(__BEOS__)
   typedef image_id LibraryHandle;
 #else  // POSIX

-scottmc

Other related posts: