--- ray/src/gen/xform.c 2003/05/13 17:58:32 2.25 +++ ray/src/gen/xform.c 2003/07/14 20:02:29 2.30 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: xform.c,v 2.25 2003/05/13 17:58:32 greg Exp $"; +static const char RCSid[] = "$Id: xform.c,v 2.30 2003/07/14 20:02:29 schorsch Exp $"; #endif /* * xform.c - program to transform object files. @@ -9,14 +9,12 @@ static const char RCSid[] = "$Id: xform.c,v 2.25 2003/ * 11/6/86 Finally added error checking! */ -#include "standard.h" - -#include "paths.h" - #include +#include "standard.h" +#include "platform.h" +#include "paths.h" #include "object.h" - #include "otypes.h" int xac; /* global xform argument count */ @@ -42,7 +40,7 @@ int nrept = 1; /* number of array repetitions */ int stdinused = 0; /* stdin has been used by -f option? */ -char mainfn[MAXPATH]; /* main file name */ +char mainfn[PATH_MAX]; /* main file name */ FILE *mainfp = NULL; /* main file pointer */ #define progname (xav[0]) @@ -889,8 +887,8 @@ char *fname; openmain(iname) /* open input, changing directory for file */ char *iname; { - static char origdir[MAXPATH]; - static char curfn[MAXPATH]; + static char origdir[PATH_MAX]; + static char curfn[PATH_MAX]; static int diffdir; register char *fpath; @@ -916,7 +914,7 @@ char *iname; return; } if (mainfp == NULL) { /* first call, initialize */ - getwd(origdir); + getcwd(origdir, sizeof(origdir)); } else if (!strcmp(iname, curfn)) { /* just need to rewind? */ rewind(mainfp); return;