cf5c5f71cb
Bump PORTREVISION
26 lines
724 B
Text
26 lines
724 B
Text
--- contrib/MacPS/macps-22.shar.orig Thu Feb 28 13:45:16 1991
|
|
+++ contrib/MacPS/macps-22.shar Sat Mar 20 14:56:30 2004
|
|
@@ -738,7 +738,7 @@
|
|
{
|
|
register STR *str;
|
|
register FILE *tp;
|
|
- register int i;
|
|
+ register int i, tmpfd;
|
|
register unsigned char *lp;
|
|
char buf[BUFSIZ];
|
|
char *malloc(), *realloc();
|
|
@@ -787,11 +787,10 @@
|
|
fprintf(stderr, "%s: Can't open %s\n", myname, *argv);
|
|
exit(1);
|
|
}
|
|
- mktemp(tempname);
|
|
- if((tp = fopen(tempname, "w+")) == NULL) {
|
|
+ if ( ((tmpfd = mkstemp(tempname)) == -1 ) || (tp = fdopen(tmpfd, "w+")) ) == NULL) {
|
|
fprintf(stderr, "%s: Can't create temp file %s\n",
|
|
- myname, tempname);
|
|
- exit(1);
|
|
+ myname, tempname);
|
|
+ exit(1);
|
|
}
|
|
unlink(tempname);
|
|
str = STRalloc();
|