octave-maintainers
[Top][All Lists]
Advanced

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

cygwin init


From: Marco Atzeri
Subject: cygwin init
Date: Thu, 13 Nov 2008 17:44:15 +0100 (CET)

Hi All,
trying to solve an issue about image loading

http://sourceforge.net/mailarchive/message.php?msg_id=20081108035356.13562.qmail%40web3813.mail.bbt.yahoo.co.jp

I found that the "cygwin_init" in "src/sysdep.cc"
has a strange modification of TMPDIR to Windows
directory name that can create problem 

octave:1> getenv("TMPDIR")
    ans = C:/cygwin/tmp
instead of a plain
    ans = /tmp
that I should expect.

removing the modification with the attached patch
creates no visible issue (all test Passed)
and solve the image loading.

Do someone knows why the translation of TMPDIR
is in place for cygwin ?

Regards
Marco Atzeri
  



      Unisciti alla community di Io fotografo e video, il nuovo corso di 
fotografia di Gazzetta dello sport:
http://www.flickr.com/groups/iofotografoevideo
--- origsrc/octave-3.0.3/src/sysdep.cc  2008-09-24 09:13:49.000000000 +0200
+++ src/octave-3.0.3/src/sysdep.cc      2008-11-13 14:42:14.913839200 +0100
@@ -204,20 +204,6 @@
   if (tmpdir.empty ())
     tmpdir = "/tmp";
 
-  char buf [PATH_MAX];
-
-  if (cygwin32_conv_to_full_win32_path (tmpdir.c_str (), buf) < 0)
-    panic ("CYGWIN_init: unable to convert TMPDIR (= \"%s\") to Windows 
directory name",
-          tmpdir.c_str ());
-  else
-    {
-      tmpdir = buf;
-
-      for (size_t i = 0; i < tmpdir.length (); i++)
-       if (tmpdir[i] == '\\')
-         tmpdir[i] = '/';
-    }
-
   octave_env::putenv ("TMPDIR", tmpdir);
 }
 #endif

reply via email to

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