Mktemp is not in the book

Erika Pacholleck pchllck at nexgo.de
Fri Jan 31 10:41:44 PST 2003


[31.01.2003] Steve Martin <-- :
> binutils gives the same warning about mktemp, and has done for some time. I
> currently use the attached patch to fix it. I came across this whilst
> fixing up Dillon's cron for my system (an extensive patch which Matt
> currently refuses to apply), and binutils is not the only package we
> install that gives this message.

Right but is it sooo easy, just add a little "s" inbetween for all those
ocurrences? I am no programer and therefore stay away from such if I see
those surroundings.

m4-1.4/src/builtin.c:1081
=========================
static void
m4_maketemp (struct obstack *obs, int argc, token_data **argv)
{
  if (bad_argc (argv[0], argc, 2, 2))
    return;
  mktemp (ARG (1)); /* <--------- mkstemp (ARG (1)); ---? */
  obstack_grow (obs, ARG (1), strlen (ARG (1)));
}

patch-2.5.4/patch.c:1325
========================
static char const *
make_temp (int letter)
{
  char *r;
#if HAVE_MKTEMP /* <--- what about this? config.hin has only this */
  char const *tmpdir = getenv ("TMPDIR");
  if (!tmpdir) tmpdir = getenv ("TMP");
  if (!tmpdir) tmpdir = getenv ("TEMP");
  if (!tmpdir) tmpdir = TMPDIR;
  r = xmalloc (strlen (tmpdir) + 10);
  sprintf (r, "%s/p%cXXXXXX", tmpdir, letter);
  mktemp (r); /* <------------- mkstemp (r); ---? */
  if (!*r)
    pfatal ("mktemp"); /* <---- pfatal ("mkstemp"); ---? */
#else
  r = xmalloc (L_tmpnam);
  if (! (tmpnam (r) == r && *r))
    pfatal ("tmpnam");
#endif
  return r;
}

I go without ed (another one I remember) but the rest of basic lfs
is clean here due to default logs (no extra warn flags added), and
a full console system has only mutt-1.4 and lynx-2.8.4 with those.

-- 
Erika ...---...: pacholleck at nexgo dot de
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message



More information about the lfs-dev mailing list