Re: P_tmpdir in g_get_tmp_dir ()



> I just encountered a problem because of the definition of P_tmpdir
> on FreeBSD.  It is set to "/var/tmp", but that's not the best place
> for random temp stuff to go, I want "/tmp".  There's a comment in
> /usr/include/stdio.h saying:

> /* System V/ANSI C; this is the wrong way to do this, do *not* use these. */
> #ifndef _ANSI_SOURCE
> #define P_tmpdir        "/var/tmp/"
> #endif

> so I thought perhaps it shouldn't be used.

Hmm. Isn't this more of a problem in FreeBSD, then, if they can't
decide what is the better directory for temporary stuff, /var/tmp or
/tmp? Or, if it's a problem specific to a certain machine where /tmp
is preferred to /var/tmp, why not use the TMPDIR envvar? (I wonder if
the comment "do *not* use these" refers to using TMPDIR?)

--tml



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]