aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Slaven <bpk@hoopajoo.net>2005-03-12 02:43:43 (GMT)
committerSteve Slaven <bpk@hoopajoo.net>2005-03-12 02:43:43 (GMT)
commitbc7b3f86e328ce8dc44b7b031e96533a52cdad81 (patch)
treef10064839f198c5c79142ce2f87ff1b1435fdeb5
parent2e5aae98ffdcae5477fc2026fc030bbacd3f70db (diff)
downloadpowwow-bc7b3f86e328ce8dc44b7b031e96533a52cdad81.zip
powwow-bc7b3f86e328ce8dc44b7b031e96533a52cdad81.tar.gz
powwow-bc7b3f86e328ce8dc44b7b031e96533a52cdad81.tar.bz2
Changed #module to not require the .so extension, and added some checks
for _GNU_SOURCE in ptr.h so that modules compiled with GNU externsions will work with powwow.h (like perl)
-rw-r--r--cmd.c6
-rw-r--r--ptr.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/cmd.c b/cmd.c
index 5460f96..b2800ba 100644
--- a/cmd.c
+++ b/cmd.c
@@ -244,6 +244,12 @@ static void cmd_module __P1 (char *,arg) {
* also eventually to allow it to use .dll instead of .so under the cygwin environment */
for( pindex = 0; pindex < 4; pindex++ ) {
bzero( libname, 1024 );
+
+ snprintf( libname, 1024, "%s/%s", prefixes[ pindex ], arg );
+ if( stat( libname, &junk ) == 0 ) {
+ break;
+ }
+
snprintf( libname, 1024, "%s/%s.so", prefixes[ pindex ], arg );
if( stat( libname, &junk ) == 0 ) {
break;
diff --git a/ptr.h b/ptr.h
index a90bf63..464b067 100644
--- a/ptr.h
+++ b/ptr.h
@@ -56,13 +56,13 @@ char *ptrmchrs __P ((ptr p, char *q, int lenq));
char *ptrrchrs __P ((ptr p, ptr q));
char *ptrmrchrs __P ((ptr p, char *q, int lenq));
-char *memrchr __P ((char *p, int lenp, char c));
char *memchrs __P ((char *p, int lenp, char *q, int lenq));
char *memrchrs __P ((char *p, int lenp, char *q, int lenq));
#ifdef _GNU_SOURCE
# define memfind memmem
#else
char *memfind __P ((char *hay, int haylen, char *needle, int needlelen));
+char *memrchr __P ((char *p, int lenp, char c));
#endif
#endif /* _PTR_H_ */