diff options
author | Steve Slaven <bpk@hoopajoo.net> | 2005-03-12 02:43:43 (GMT) |
---|---|---|
committer | Steve Slaven <bpk@hoopajoo.net> | 2005-03-12 02:43:43 (GMT) |
commit | bc7b3f86e328ce8dc44b7b031e96533a52cdad81 (patch) | |
tree | f10064839f198c5c79142ce2f87ff1b1435fdeb5 | |
parent | 2e5aae98ffdcae5477fc2026fc030bbacd3f70db (diff) | |
download | powwow-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.c | 6 | ||||
-rw-r--r-- | ptr.h | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -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; @@ -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_ */ |