octave-patch-tracker
[Top][All Lists]
Advanced

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

Re: [Octave-patch-tracker] [patch #7869] Use TMPDIR environment variable


From: Corbin Champion
Subject: Re: [Octave-patch-tracker] [patch #7869] Use TMPDIR environment variable for specifying temporary directory location in sysdep.cc.
Date: Wed, 24 Oct 2012 09:30:50 -0700


On Oct 23, 2012 7:43 PM, "Mike Miller" <address@hidden> wrote:
>
> Follow-up Comment #1, patch #7869 (project octave):
>
> I'm curious why this is needed when the TMPDIR environment variable is already
> fully handled at a higher level. Can you describe or show here what failure
> this causes if left as is (other than user code calling P_tmpdir() directly)?
>
> My reading of the code is that the get_P_tmpdir() and P_tmpdir() functions are
> intended to reflect the P_tmpdir _constant_ from stdio.h, or fix it only for
> broken (non-UNIX-like) systems where it is not defined or its value is
> meaningless. Not necessarily that it has to exist.
>
> A layer above P_tmpdir() is tempdir(), which does already handle the TMPDIR
> environment variable. This is the interface that user code should rely on,
> IMHO, not P_tmpdir.
>
> Someone else please correct me if I'm wrong here, but that's the way these two
> functions appear to me to be designed.
>
> That being said, I see a couple instances of P_tmpdir used in some m-files in
> the Octave tree (bzip2.m and __makeinfo__.m), I think those should call
> tempdir() instead.
>
>     _______________________________________________________
>
> Reply to this item at:
>
>   <http://savannah.gnu.org/patch/?7869>
>
> _______________________________________________
>   Message sent via/by Savannah
>   http://savannah.gnu.org/
>

That is how I came to this patch.  __makeinfo__.m uses P_tmpdir directly.  I noticed I failed to be able to create help messages on Android and came to this fix.  Should I instead provide a patch that modifies the .m files?

Corbin


reply via email to

[Prev in Thread] Current Thread [Next in Thread]