--- ray/src/common/mktemp.c 1992/10/05 11:38:00 2.1 +++ ray/src/common/mktemp.c 2003/06/07 12:50:20 2.5 @@ -1,16 +1,17 @@ -/* Copyright (c) 1992 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: mktemp.c,v 2.5 2003/06/07 12:50:20 schorsch Exp $"; #endif - /* * Replacement mktemp(3) function for systems without */ -#include "standard.h" +#include "copyright.h" +#ifndef NULL +#define NULL 0 +#endif + char * mktemp(template) /* make a unique filename from template */ char *template; @@ -35,7 +36,7 @@ char *template; } p = te-1; /* final character */ for (*p = 'a'; *p <= 'z'; (*p)++) - if (access(template, F_OK) == -1) + if (access(template, 0) == -1) return(template); /* found unique name */ return(NULL); /* failure! */ }