aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Slaven <bpk@hoopajoo.net>2005-03-12 05:05:06 (GMT)
committerSteve Slaven <bpk@hoopajoo.net>2005-03-12 05:05:06 (GMT)
commit568cba4b0aa026e34b9a316b7da95b520f4d25c9 (patch)
treebc576fd6db24f3b581b32fc1b74e867dfbdb7e86
parentbc7b3f86e328ce8dc44b7b031e96533a52cdad81 (diff)
downloadpowwow-568cba4b0aa026e34b9a316b7da95b520f4d25c9.zip
powwow-568cba4b0aa026e34b9a316b7da95b520f4d25c9.tar.gz
powwow-568cba4b0aa026e34b9a316b7da95b520f4d25c9.tar.bz2
Made #module print messages prefixed with #module instead of #lib, also display
the path to the library that was loaded so that if testing new libraries you can tell which one was found :p
-rw-r--r--cmd.c6
-rw-r--r--ptr.h3
2 files changed, 7 insertions, 2 deletions
diff --git a/cmd.c b/cmd.c
index b2800ba..2eb4702 100644
--- a/cmd.c
+++ b/cmd.c
@@ -259,15 +259,17 @@ static void cmd_module __P1 (char *,arg) {
/* open lib */
lib = dlopen( libname, RTLD_LAZY );
if( ! lib ) {
- PRINTF( "#lib error: %s\n", dlerror() );
+ PRINTF( "#module error: %s\n", dlerror() );
return;
+ }else{
+ PRINTF( "#module loaded %s\n", libname );
}
func = dlsym( lib, "powwow_init" );
if( func ) {
(*func)();
}else{
- PRINTF( "#lib error: %s\n", dlerror() );
+ PRINTF( "#module error: %s\n", dlerror() );
}
}
diff --git a/ptr.h b/ptr.h
index 464b067..ebdf09d 100644
--- a/ptr.h
+++ b/ptr.h
@@ -62,6 +62,9 @@ char *memrchrs __P ((char *p, int lenp, char *q, int lenq));
# define memfind memmem
#else
char *memfind __P ((char *hay, int haylen, char *needle, int needlelen));
+/* TODO: watch memrchr, it is defined differently here than under _GNU_SOURCE,
+ * so it could cause bizarre results if a module makes use of a library that
+ * uses it */
char *memrchr __P ((char *p, int lenp, char c));
#endif