diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-11-24 01:45:49 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-11-24 01:45:49 (GMT) |
commit | e3c84cf5a6ceb3f1bbc4b47dce4dfbdb1c856408 (patch) | |
tree | 82a2ad082ba8b4d22deca15288c9daa679391b13 /Source | |
parent | d48ab19efe2daa4313e8bdcd626ffd556cb80fc3 (diff) | |
download | CMake-e3c84cf5a6ceb3f1bbc4b47dce4dfbdb1c856408.zip CMake-e3c84cf5a6ceb3f1bbc4b47dce4dfbdb1c856408.tar.gz CMake-e3c84cf5a6ceb3f1bbc4b47dce4dfbdb1c856408.tar.bz2 |
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
Diffstat (limited to 'Source')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 8 | ||||
-rw-r--r-- | Source/kwsys/testDynamicLoader.cxx | 9 |
2 files changed, 15 insertions, 2 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 37562b1..28efd40 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -818,6 +818,14 @@ bool SystemTools::FileExists(const char* filename) #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; diff --git a/Source/kwsys/testDynamicLoader.cxx b/Source/kwsys/testDynamicLoader.cxx index c7ddc2b..9021239 100644 --- a/Source/kwsys/testDynamicLoader.cxx +++ b/Source/kwsys/testDynamicLoader.cxx @@ -97,17 +97,22 @@ int testDynamicLoader(int argc, char *argv[]) #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); |