Date: Tuesday, April 17, 2007 @ 12:59:18
Author: marc
Path: /cvsroot/carob/libmysequoia/ldtest
Modified: main.cpp (1.10 -> 1.11)
Extracted testso(void * sohandle)
----------+
main.cpp | 43 +++++++++++++++++++++++++------------------
1 files changed, 25 insertions(+), 18 deletions(-)
Index: libmysequoia/ldtest/main.cpp
diff -u libmysequoia/ldtest/main.cpp:1.10 libmysequoia/ldtest/main.cpp:1.11
--- libmysequoia/ldtest/main.cpp:1.10 Tue Apr 17 12:26:15 2007
+++ libmysequoia/ldtest/main.cpp Tue Apr 17 12:59:18 2007
@@ -34,6 +34,30 @@
// http://sourceware.org/ml/libc-hacker/2004-09/msg00083.html
+
+int testso(void * sohandle)
+{
+ std::cout << " ";
+ const char *functions[2] = { "intercepted", "orig_calling_intercepted" };
+ for (int i = 0; i<2; i++)
+ {
+ std::string funct("plugin_"); funct += functions[i];
+ bool (*plugin_function)() = ( bool (*)() ) dlsym(sohandle, funct.c_str());
+
+ const char *error = dlerror();
+ if (error) {
+ std::cerr << "failed to find plugin function: " << error << std::endl;
+ exit(2);
+ }
+
+ std::cout << functions[i] << "() = "
+ << ( (*plugin_function) () ? "--INTERCEPTED--" : " --NOT--
" )
+ << " " ;
+
+ }
+}
+
+
int
test(bool global, bool deepbind = false)
{
@@ -59,25 +83,8 @@
std::cout << "...completed." << std::endl;
+ testso(plugin);
- std::cout << " ";
- const char *functions[2] = { "intercepted", "orig_calling_intercepted" };
- for (int i = 0; i<2; i++)
- {
- std::string funct("plugin_"); funct += functions[i];
- bool (*plugin_function)() = ( bool (*)() ) dlsym(plugin, funct.c_str());
-
- const char *error = dlerror();
- if (error) {
- std::cerr << "failed to find plugin function: " << error << std::endl;
- exit(2);
- }
-
- std::cout << functions[i] << "() = "
- << ( (*plugin_function) () ? "--INTERCEPTED--" : " --NOT--
" )
- << " " ;
-
- }
std::cout << std::endl;
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits