[vlc-devel] [PATCH] api: add vlc_gettmpdir

Francois Cartegnie fcvlcdev at free.fr
Wed Feb 12 17:08:55 CET 2014

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 obsoleted
> by POSIX). But the function introduced in your patch is a lot worse in that
> 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).

Otherwise, I'd need some config_GetUserDir( VLC_TMP_DIR ) for building
mkstemp() templates.


More information about the vlc-devel mailing list