source:
scripts/untested/blfs-patches/ed-0.2-mkstemp-1.patch@
fcf217f
Last change on this file since fcf217f was 617118d, checked in by , 19 years ago | |
---|---|
|
|
File size: 819 bytes |
-
buf.c
Submitted By: LFS Book <lfs-book@linuxfromscratch.org> Date: 2003-10-05 Initial Package Version: 0.2 Origin: Slackware Source Description: Use mkstemp instead of mktemp. $LastChangedBy: bdubbs $ $Date: 2004-08-07 18:56:30 -0600 (Sat, 07 Aug 2004) $ diff -Naur ed-0.2/buf.c ed-0.2-2/buf.c
old new 200 200 int 201 201 open_sbuf () 202 202 { 203 char *mktemp (); 204 int u; 203 int u, sfd; 205 204 206 205 isbinary = newline_added = 0; 207 206 u = umask(077); 208 207 strcpy (sfn, "/tmp/ed.XXXXXX"); 209 if (mktemp (sfn) == NULL || (sfp = fopen (sfn, "w+")) == NULL) 208 sfd = mkstemp(sfn); 209 if ((sfd == -1) || (sfp = fopen (sfn, "w+")) == NULL) 210 210 { 211 211 fprintf (stderr, "%s: %s\n", sfn, strerror (errno)); 212 212 sprintf (errmsg, "Cannot open temp file");
Note:
See TracBrowser
for help on using the repository browser.