|
From: | Osipov, Michael (LDA IT PLM) |
Subject: | Incomplete test for mkdtemp() in lib/sh/tmpfile.c for bash-5.1.8 on HP-UX |
Date: | Tue, 17 Aug 2021 13:56:45 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 |
Folks,there is an incomplete macro testing. USE_MKDTEMP is defined in config-top.h. HAVE_MKDTEMP is properly unset in config.h for HP-UX since it is not available, but tempfile.c does this:
#ifdef USE_MKDTEMP filename = (char *)xmalloc (PATH_MAX + 1); tdir = get_tmpdir (flags); tdlen = strlen (tdir);
It ignores the HAVE_MKDTEMP completely and the linker tells me: undefined symbol mkdtemp.
Turned into:
#if defined (USE_MKDTEMP) && defined (HAVE_MKDTEMP) filename = (char *)xmalloc (PATH_MAX + 1); tdir = get_tmpdir (flags); tdlen = strlen (tdir);
and it works now. Note: this pontentionally applies to USE_MKSTEMP/HAVE_MKSTEMP as well. Michael
[Prev in Thread] | Current Thread | [Next in Thread] |