diff options
Diffstat (limited to 'converters/ru-d1489/patches/patch-aa')
-rw-r--r-- | converters/ru-d1489/patches/patch-aa | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/converters/ru-d1489/patches/patch-aa b/converters/ru-d1489/patches/patch-aa new file mode 100644 index 00000000000..b262a0a7953 --- /dev/null +++ b/converters/ru-d1489/patches/patch-aa @@ -0,0 +1,34 @@ +$NetBSD: patch-aa,v 1.1.1.1 2002/07/12 21:01:17 agc Exp $ + +--- todos.c Tue Dec 22 01:50:00 1998 ++++ todos.nb.c Sun Jun 23 17:02:54 2002 +@@ -97,6 +97,7 @@ + main(int ac, char **av) + { + char *name, *tmpn, *srcn, *s, *incode, *outcode; ++ int tmpfd; + FILE *fin, *fout; + struct stat statb; + int got_stat = FALSE; +@@ -251,10 +252,11 @@ + } + + sprintf(tmp_name, "%s%s%s", outdir, *outdir ? "/" : "", tmp_pat); +- if ((tmpn = mktemp(tmp_name)) == NULL) { ++ if ((tmpfd = mkstemp(tmp_name)) < 0) { + perror(tmp_name); + return 1; + } ++ strcpy(tmpn, tmp_name); + + while (ac-- > 1) { + srcn = av[1]; +@@ -267,7 +269,7 @@ + perror(srcn); + goto usage; + } +- if ((fout = fopen(tmpn, WB)) == NULL) { ++ if ((fout = fdopen(tmpfd, WB)) == NULL) { + perror(tmpn); + return 1; + } |