Switched from mktemp to mkstemp
This commit is contained in:
@@ -520,7 +520,12 @@ void startup ()
|
||||
{
|
||||
register int i;
|
||||
|
||||
mktemp (tfilename);
|
||||
int fd = mkstemp (tfilename);
|
||||
if (fd == -1) {
|
||||
uerror ("cannot create temporary file %2", tfilename);
|
||||
} else {
|
||||
close(fd);
|
||||
}
|
||||
for (i=STEXT; i<SBSS; i++) {
|
||||
sfile [i] = fopen (tfilename, "w+");
|
||||
if (! sfile [i])
|
||||
|
||||
@@ -1287,7 +1287,13 @@ void middle()
|
||||
void setupout ()
|
||||
{
|
||||
tcreat (&outb, 0);
|
||||
mktemp (tfname);
|
||||
int fd = mkstemp (tfname);
|
||||
if (fd == -1) {
|
||||
error(2, "internal error: unable to create temporary file %s", tfname);
|
||||
} else {
|
||||
close(fd);
|
||||
}
|
||||
|
||||
tcreat (&toutb, 1);
|
||||
tcreat (&doutb, 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user