From 8c15427214095ab11697a7505e168ada0e33cdbf Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Tue, 14 Jun 2016 20:53:27 -0400 Subject: Fixed building with modern curses. Added Watcom makefile for Linux only. --- buf.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'buf.c') diff --git a/buf.c b/buf.c index dde84bf..70a7c5c 100644 --- a/buf.c +++ b/buf.c @@ -312,6 +312,7 @@ void Fast Blockwrite(struct fcb_t *F,char *B,int P) void Fast Out_Buf(struct Buffer *B) {int M; char *P; + int temp_fid; #if defined(DOS) | defined(NT) | defined(OS2) struct Memory far *M_P; #else @@ -367,7 +368,9 @@ void Fast Out_Buf(struct Buffer *B) strcpy(Overflow.File_Name,""); #endif strcat(Overflow.File_Name,"seXXXXXX"); - mktemp(Overflow.File_Name); + temp_fid = mkstemp(Overflow.File_Name); + if(temp_fid >= 0) + close(temp_fid); #else #if defined(MPE) strcpy(Overflow.File_Name,"temp.sed"); @@ -379,7 +382,9 @@ void Fast Out_Buf(struct Buffer *B) strcat(Overflow.File_Name,"seXXXXXX"); } else strcpy(Overflow.File_Name,"seXXXXXX"); - mktemp(Overflow.File_Name); + temp_fid = mkstemp(Overflow.File_Name); + if(temp_fid >= 0) + close(temp_fid); #endif #endif #endif -- cgit v1.2.3