|
@@ -73,7 +73,6 @@ char *G__tempfile(int pid)
|
|
|
char path[GPATH_MAX];
|
|
|
char name[GNAME_MAX];
|
|
|
char element[100];
|
|
|
- struct stat st;
|
|
|
|
|
|
if (pid <= 0)
|
|
|
pid = getpid();
|
|
@@ -84,7 +83,7 @@ char *G__tempfile(int pid)
|
|
|
sprintf(name, "%d.%d", pid, uniq);
|
|
|
G__file_name(path, element, name, G_mapset());
|
|
|
}
|
|
|
- while (stat(path, &st) == 0);
|
|
|
+ while (access(path, F_OK) == 0);
|
|
|
|
|
|
return G_store(path);
|
|
|
}
|