clfs-1.2
clfs-2.1
clfs-3.0.0-systemd
clfs-3.0.0-sysvinit
systemd
sysvinit
Last change
on this file since 1cca9e2 was 7f65c0e, checked in by Jim Gifford <clfs@…>, 19 years ago |
r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move
|
-
Property mode
set to
100644
|
File size:
738 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 | diff -Naur ed-0.2/buf.c ed-0.2-2/buf.c
|
---|
| 7 | --- ed-0.2/buf.c Sat Nov 19 04:37:59 1994
|
---|
| 8 | +++ ed-0.2-2/buf.c Tue May 28 18:38:23 2002
|
---|
| 9 | @@ -200,13 +200,13 @@
|
---|
| 10 | int
|
---|
| 11 | open_sbuf ()
|
---|
| 12 | {
|
---|
| 13 | - char *mktemp ();
|
---|
| 14 | - int u;
|
---|
| 15 | + int u, sfd;
|
---|
| 16 |
|
---|
| 17 | isbinary = newline_added = 0;
|
---|
| 18 | u = umask(077);
|
---|
| 19 | strcpy (sfn, "/tmp/ed.XXXXXX");
|
---|
| 20 | - if (mktemp (sfn) == NULL || (sfp = fopen (sfn, "w+")) == NULL)
|
---|
| 21 | + sfd = mkstemp(sfn);
|
---|
| 22 | + if ((sfd == -1) || (sfp = fopen (sfn, "w+")) == NULL)
|
---|
| 23 | {
|
---|
| 24 | fprintf (stderr, "%s: %s\n", sfn, strerror (errno));
|
---|
| 25 | sprintf (errmsg, "Cannot open temp file");
|
---|
Note:
See
TracBrowser
for help on using the repository browser.