summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2022-08-01 12:57:12 -0400
committerPaul Smith <psmith@gnu.org>2022-08-02 23:36:35 -0400
commit09cce75c308a6e7ae0f3635724d2ae87e72f9800 (patch)
tree76b706491cd21acd9f87d80da6c8ea4852506692 /configure.ac
parent07eea3aa496184bb763b7306e9de6a40a94605c9 (diff)
downloadmake-git-09cce75c308a6e7ae0f3635724d2ae87e72f9800.tar.gz
Enhance get_tmpfile() and add get_tmppath()
Move all the logic on creating temporary files into misc.c, and add a new function get_tmppath() that returns the pathname to a temporary file without creating or opening it. * src/makeint.h: Add a declaration for get_tmppath(). Remove the template argument from get_tmpfile(): it will compute its own. * src/main.c (main): Remove the logic for computing templates. * src/vmsjobs.c (child_execute_job): Ditto. * src/misc.c (get_tmptemplate): New function to return an allocated template string for use with various mktemp-style functions. (get_tmppath): Return an allocated path to a temporary file, but do not create it. Generally this should be avoided due to TOCTOU issues. (get_tmpfile): Use get_tmptemplate() to generate a template rather than using one passed in. If we don't have mkstemp() then use get_tmppath() to compute the path of a temp file.
Diffstat (limited to 'configure.ac')
0 files changed, 0 insertions, 0 deletions