version 1.6, 1998/07/10 14:09:56 |
version 1.7, 1999/12/04 00:09:22 |
|
|
static char rcsid[] = "$OpenBSD$"; |
static char rcsid[] = "$OpenBSD$"; |
#endif /* not lint */ |
#endif /* not lint */ |
|
|
#include <sys/types.h> |
#include <sys/param.h> |
#include <sys/stat.h> |
#include <sys/stat.h> |
#include <signal.h> |
#include <signal.h> |
#include <unistd.h> |
#include <unistd.h> |
|
|
FILE *o_touchedfile; /* the old file */ |
FILE *o_touchedfile; /* the old file */ |
FILE *n_touchedfile; /* the new file */ |
FILE *n_touchedfile; /* the new file */ |
char *o_name; |
char *o_name; |
char n_name[64]; |
char n_name[MAXPATHLEN]; |
int o_lineno; |
int o_lineno; |
int n_lineno; |
int n_lineno; |
boolean tempfileopen = FALSE; |
boolean tempfileopen = FALSE; |
|
|
warn("Can't open file \"%s\" to touch (read)", name); |
warn("Can't open file \"%s\" to touch (read)", name); |
return(TRUE); |
return(TRUE); |
} |
} |
strcpy(n_name, _PATH_TMPFILE); |
strlcpy(n_name, _PATH_TMPFILE, sizeof(n_name)); |
if ((fd = mkstemp(n_name)) == -1 || |
if ((fd = mkstemp(n_name)) == -1 || |
(n_touchedfile = fdopen(fd, "w")) == NULL) { |
(n_touchedfile = fdopen(fd, "w")) == NULL) { |
if (fd != -1) |
if (fd != -1) |