Add gsu_make_tempfile() and fix bug in gui module.
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 20 Jan 2016 09:54:35 +0000 (10:54 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 4 Mar 2016 12:28:04 +0000 (13:28 +0100)
commit32134f1512eab90da01e9cfd9f676bffef27a939
tree3d020456f7eed7e355e0e18b2cc2bc0f9f22e51c
parent1e5e330b7a100636ef7d3874a322e7c23d7fe575
Add gsu_make_tempfile() and fix bug in gui module.

While mkstemp(3) is required by POSIX.1-2001, mktemp(1) is not in POSIX
and the various Unixes ship different and incompatible implementations
of this command line utility.

This commit adds the new public gsu_make_tempfile() helper to the
common part of gsu and changes the gui module to use it.

The mktemp invocation in the gui module was buggy because it ran
mktemp with a relative template (no slash). Hence the temporary file
was created in the current working directory. Of course this fails
if $CWD is not writable. The new public function gets this right.
common
gui