[vlc-devel] [PATCH] api: add vlc_gettmpdir
remi at remlab.net
Wed Feb 12 17:26:17 CET 2014
On Wed, 12 Feb 2014 17:08:55 +0100, Francois Cartegnie <fcvlcdev at free.fr>
> Le 12/02/2014 16:38, Rémi Denis-Courmont a écrit :
>> It is true that tempnam() is not safe in a certain respect (and
>> by POSIX). But the function introduced in your patch is a lot worse in
>> respect. As far as I know, mkdtemp() is the "correct" function in POSIX
>> land (and thus arguably, vlc_mkdtemp() should be the name).
> I was probably not clear, but my patch was about returning the "base
> directory for temporary files/dirs" (tempnam guesses it if NULL dir).
What do you mean by the lack of safety of tempnam() then?
> Otherwise, I'd need some config_GetUserDir( VLC_TMP_DIR ) for building
> mkstemp() templates.
Why would you need that? Especially why would you need to stack a
portability layer on top of another one?
Sent from my collocated server
More information about the vlc-devel