[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
TMPDIR patch
From: |
Paul Kienzle |
Subject: |
TMPDIR patch |
Date: |
Fri, 25 Jul 2003 09:56:28 -0400 |
User-agent: |
Mutt/1.2.5.1i |
Paul Kienzle <address@hidden>
* sysdep.cc: convert TMPDIR to system agnostic path name in cygwin
diff -cp octave-2.1.50-orig/src/sysdep.cc octave-2.1.50/src/sysdep.cc
*** octave-2.1.50-orig/src/sysdep.cc Sat Jan 4 01:21:29 2003
--- octave-2.1.50/src/sysdep.cc Wed Jul 23 09:50:42 2003
*************** BSD_init (void)
*** 111,126 ****
static void
CYGWIN_init (void)
{
std::string tmpdir = octave_env::getenv ("TMPDIR");
!
! if (tmpdir.empty ())
! {
! char buf [PATH_MAX];
!
! cygwin32_conv_to_win32_path ("/tmp", buf);
!
! octave_env::putenv ("TMPDIR", buf);
! }
}
#endif
--- 111,125 ----
static void
CYGWIN_init (void)
{
+ // Make sure TMPDIR contains an absolute windows path. Use '/'
+ // rather than '\\' so that sh expansion won't mess file names.
std::string tmpdir = octave_env::getenv ("TMPDIR");
! if (tmpdir.empty ()) tmpdir = "/tmp";
! char buf [PATH_MAX];
! cygwin32_conv_to_full_win32_path (tmpdir.c_str (), buf);
! for (int i=0; i < sizeof (buf); i++) if (buf[i] == '\\') buf[i] = '/';
! buf[sizeof (buf)-1] = '\0';
! octave_env::putenv ("TMPDIR", buf);
}
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- TMPDIR patch,
Paul Kienzle <=