Skip to content

configure.in: Use portable invocation of mktemp#28

Open
commitmaniac wants to merge 1 commit into
kristapsdz:masterfrom
commitmaniac:feat/portable-mktemp
Open

configure.in: Use portable invocation of mktemp#28
commitmaniac wants to merge 1 commit into
kristapsdz:masterfrom
commitmaniac:feat/portable-mktemp

Conversation

@commitmaniac
Copy link
Copy Markdown

On legacy OSX systems, mktemp -d doesn't suffice in order to create a temporary directory, which leads to various issues when building other software utilizing this project (most notably, lowdown on MacPorts, OSX 10.7.5).

A simple solution is to use a more portable invocation to cover a wide range of operating systems, per the examples below (OSX 10.7.5 and macOS 15.6.1, respectively)

lion:lowdown maniac$ mktemp -d -t tmproot.XXXXXX
/var/folders/5r/qh63gph55wx79g9cd7yjwhtc0000gn/T/tmproot.XXXXXX.I6OYR1SQ
maniac@sequoia lowdown % mktemp -d -t tmproot.XXXXXX
/var/folders/x1/44rw8ngx2gl8sdy9bfs2_8yc0000gp/T/tmproot.XXXXXX.IacEZctSvb

This solution also maintains compatibility with Linux-based distros (e.g, Debian 13.4.0, in this case)

maniac@debian:~/workspace/lowdown $ mktemp -d -t tmproot.XXXXXX
/tmp/tmproot.HJAXSe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant