[cmake-commits] alex committed SystemTools.cxx 1.210 1.211 testDynamicLoader.cxx 1.21 1.22

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Nov 23 20:45:51 EST 2007


Update of /cvsroot/CMake/CMake/Source/kwsys
In directory public:/mounts/ram/cvs-serv17476/Source/kwsys

Modified Files:
	SystemTools.cxx testDynamicLoader.cxx 
Log Message:
ENH: add support for the Syllable OS (http://www.syllable.org)
major issues: 
-access() doesn't return false for an empty string (#ifdefed in cmake)
-dlopen() doesn't return 0 on failure (#ifdefed in cmake and fixed now in Syllable)
-the kwsys and Bootstrap tests fail with timeout due to the fact that I'm doing all that in qemu, which is quite slow
-RPATH is now supported, so without modifying the test adapting DLL_PATH in Syllable is required for the tests to succeed
-the Plugin test fails with an undefined reference to example_exe_function() in example_mod_1, it seems this isn't supported under Syllable

Alex



Index: testDynamicLoader.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/testDynamicLoader.cxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- testDynamicLoader.cxx	7 Mar 2007 18:52:32 -0000	1.21
+++ testDynamicLoader.cxx	24 Nov 2007 01:45:49 -0000	1.22
@@ -97,17 +97,22 @@
 #elif defined(__BEOS__)
   disable_debugger(1);
 #endif
-  int res;
+  int res = 0;
   if( argc == 3 )
     {
     // User specify a libname and symbol to check.
     res = TestDynamicLoader(argv[1], argv[2],1,1,1);
     return res;
     }
+
+// dlopen() on Syllable before 11/22/2007 doesn't return 0 on error
+#ifndef __SYLLABLE__
   // Make sure that inexistant lib is giving correct result
-  res = TestDynamicLoader("azerty_", "foo_bar",0,0,0);
+  res += TestDynamicLoader("azerty_", "foo_bar",0,0,0);
   // Make sure that random binary file cannnot be assimilated as dylib
   res += TestDynamicLoader(TEST_SYSTEMTOOLS_BIN_FILE, "wp",0,0,0);
+#endif
+
 #ifdef __linux__
   // This one is actually fun to test, since dlopen is by default loaded...wonder why :)
   res += TestDynamicLoader("foobar.lib", "dlopen",0,1,0);

Index: SystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/SystemTools.cxx,v
retrieving revision 1.210
retrieving revision 1.211
diff -u -d -r1.210 -r1.211
--- SystemTools.cxx	16 Nov 2007 12:01:58 -0000	1.210
+++ SystemTools.cxx	24 Nov 2007 01:45:49 -0000	1.211
@@ -818,6 +818,14 @@
 #ifndef R_OK
 # define R_OK 04
 #endif
+
+#ifdef __SYLLABLE__
+  if ((filename !=0) && (*filename == 0))
+    {
+    return false;
+  }
+#endif
+
   if ( access(filename, R_OK) != 0 )
     {
     return false;



More information about the Cmake-commits mailing list