From bc7b3f86e328ce8dc44b7b031e96533a52cdad81 Mon Sep 17 00:00:00 2001 From: Steve Slaven Date: Sat, 12 Mar 2005 02:43:43 +0000 Subject: 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) 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_ */ -- cgit v0.10.2