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

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

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


From: Mike Miller
Subject: [Octave-patch-tracker] [patch #7869] Use TMPDIR environment variable for specifying temporary directory location in sysdep.cc.
Date: Wed, 24 Oct 2012 02:43:06 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4

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/




reply via email to

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