diff options
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclLoadAout.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/unix/tclLoadAout.c b/unix/tclLoadAout.c index 4e6a196..e78158d 100644 --- a/unix/tclLoadAout.c +++ b/unix/tclLoadAout.c @@ -14,7 +14,7 @@ * and Design Engineering (MADE) Initiative through ARPA contract * F33615-94-C-4400. * - * RCS: @(#) $Id: tclLoadAout.c,v 1.7 2001/09/28 01:21:53 dgp Exp $ + * RCS: @(#) $Id: tclLoadAout.c,v 1.8 2001/10/16 21:13:50 hobbs Exp $ */ #include "tclInt.h" @@ -22,6 +22,11 @@ #ifdef HAVE_EXEC_AOUT_H # include <sys/exec_aout.h> #endif +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#else +# include "../compat/unistd.h" +#endif /* * Some systems describe the a.out header in sys/exec.h, and some in @@ -336,7 +341,7 @@ FindLibraries (interp, fileName, buf) Tcl_DString * buf; /* Buffer where the -l an -L flags */ { FILE * f; /* The load module */ - int c; /* Byte from the load module */ + int c = 0; /* Byte from the load module */ char * p; Tcl_DString ds; CONST char *native; @@ -475,9 +480,8 @@ TclGuessPackageName(fileName, bufPtr) * package name to this if possible. */ { char *p, *q, *r; - int srcOff, dstOff; - if (q = strrchr(fileName,'/')) { + if ((q = strrchr(fileName,'/'))) { q++; } else { q = fileName; |