clfs-1.2
clfs-2.1
clfs-3.0.0-systemd
clfs-3.0.0-sysvinit
systemd
sysvinit
Last change
on this file since e972b4d was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago |
r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure
|
-
Property mode
set to
100644
|
File size:
819 bytes
|
Rev | Line | |
---|
[617118d] | 1 | Submitted By: LFS Book <lfs-book@linuxfromscratch.org>
|
---|
| 2 | Date: 2003-10-05
|
---|
| 3 | Initial Package Version: 0.2
|
---|
| 4 | Origin: Slackware Source
|
---|
| 5 | Description: Use mkstemp instead of mktemp.
|
---|
| 6 |
|
---|
| 7 | $LastChangedBy: bdubbs $
|
---|
| 8 | $Date: 2004-08-07 18:56:30 -0600 (Sat, 07 Aug 2004) $
|
---|
| 9 |
|
---|
| 10 | diff -Naur ed-0.2/buf.c ed-0.2-2/buf.c
|
---|
| 11 | --- ed-0.2/buf.c Sat Nov 19 04:37:59 1994
|
---|
| 12 | +++ ed-0.2-2/buf.c Tue May 28 18:38:23 2002
|
---|
| 13 | @@ -200,13 +200,13 @@
|
---|
| 14 | int
|
---|
| 15 | open_sbuf ()
|
---|
| 16 | {
|
---|
| 17 | - char *mktemp ();
|
---|
| 18 | - int u;
|
---|
| 19 | + int u, sfd;
|
---|
| 20 |
|
---|
| 21 | isbinary = newline_added = 0;
|
---|
| 22 | u = umask(077);
|
---|
| 23 | strcpy (sfn, "/tmp/ed.XXXXXX");
|
---|
| 24 | - if (mktemp (sfn) == NULL || (sfp = fopen (sfn, "w+")) == NULL)
|
---|
| 25 | + sfd = mkstemp(sfn);
|
---|
| 26 | + if ((sfd == -1) || (sfp = fopen (sfn, "w+")) == NULL)
|
---|
| 27 | {
|
---|
| 28 | fprintf (stderr, "%s: %s\n", sfn, strerror (errno));
|
---|
| 29 | sprintf (errmsg, "Cannot open temp file");
|
---|
Note:
See
TracBrowser
for help on using the repository browser.