source:
scripts/patches/ed-0.2-mkstemp-1.patch@
123fd5b
Last change on this file since 123fd5b was 7f65c0e, checked in by , 19 years ago | |
---|---|
|
|
File size: 738 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. 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.