Date: Friday, April 13, 2007 @ 20:16:01
Author: marc
Path: /cvsroot/carob/libmysequoia/ldtest
Modified: main.cpp (1.2 -> 1.3)
Now running both RTLD_DEEPBIND (if exists) and none
----------+
main.cpp | 27 +++++++++++++++++----------
1 files changed, 17 insertions(+), 10 deletions(-)
Index: libmysequoia/ldtest/main.cpp
diff -u libmysequoia/ldtest/main.cpp:1.2 libmysequoia/ldtest/main.cpp:1.3
--- libmysequoia/ldtest/main.cpp:1.2 Fri Apr 13 20:01:18 2007
+++ libmysequoia/ldtest/main.cpp Fri Apr 13 20:16:01 2007
@@ -26,10 +26,6 @@
#include <dlfcn.h>
-#define STRINGIFY(x) #x
-#define TOSTRING(x) STRINGIFY(x)
-
-
// collections of nasty flags - PHP- is using all the ones it can
// find, see ./Zend/zend.h
@@ -37,9 +33,6 @@
// http://sourceware.org/ml/libc-hacker/2004-09/msg00083.html
-#ifndef DEEPBIND_ARG
-#define DEEPBIND_ARG RTLD_DEEPBIND
-#endif
#ifdef NOGLOBAL
#warning now nullifying RTLD_GLOBAL
@@ -65,8 +58,15 @@
return 2;
}
- std::cout << "DEEPBIND_ARG=" TOSTRING(DEEPBIND_ARG)
- " ---> " << (*plugin_function) () << std::endl;
+ std::cout << "RTLD_DEEPBIND=" << (flags
+#ifdef RTLD_DEEPBIND
+ & RTLD_DEEPBIND)
+#else
+ & 0)
+#endif
+ ;
+
+ std::cout << " ---> " << (*plugin_function) () << std::endl;
dlclose(plugin);
@@ -77,5 +77,12 @@
int
main()
{
- return test(RTLD_NOW | RTLD_GLOBAL | DEEPBIND_ARG);
+ if (test(RTLD_NOW | RTLD_GLOBAL))
+ return 1;
+
+#ifdef RTLD_DEEPBIND
+ if (test(RTLD_NOW | RTLD_GLOBAL | RTLD_DEEPBIND))
+ return 1;
+#endif
+
}
_______________________________________________
Carob-commits mailing list
[EMAIL PROTECTED]
https://forge.continuent.org/mailman/listinfo/carob-commits