aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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_ */