1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-04 22:33:27 +00:00
freebsd-ports/editors/gate/files/patch-ad
Kevin Lo 02585bd39c Initial import of gate-2.04c.
gate is a simple and unobtrusive line-oriented text editor.

PR: 19905
Submitted by: Christopher N. Harrell <cnh@ivmg.net>
Reviewed by: sobomax
2000-07-21 10:11:44 +00:00

20 lines
503 B
Plaintext

--- proc.c.orig Mon Jul 17 23:13:54 2000
+++ proc.c Mon Jul 17 23:14:26 2000
@@ -57,13 +57,14 @@
char tmpname[20];
FILE *cfp;
long oldt;
+int fd;
/* We could use a call to make_copy() here, but this method survives
* interupts better
*/
strcpy(tmpname, "/tmp/gateXXXXXX");
- mktemp(tmpname);
- if ((cfp= fopen(tmpname,"w+")) == NULL)
+ fd = mkstemp(tmpname);
+ if ((cfp= fdopen(fd,"w+")) == NULL)
{
printf("Cannot open file %s.\n",tmpname);
return(NULL);