Mercurial > hg > octave-nkf
changeset 4091:575507e27b8b
[project @ 2002-10-06 20:50:15 by jwe]
author | jwe |
---|---|
date | Sun, 06 Oct 2002 20:50:15 +0000 |
parents | 18adbb958baa |
children | 01f46b36e11f |
files | src/ChangeLog src/sysdep.cc |
diffstat | 2 files changed, 26 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2002-10-06 John W. Eaton <jwe@bevo.che.wisc.edu> + * sysdep.cc (CYGWIN_init): New function. + (sysdep_init) [__CYGWIN__]: Call it. + * pt-plot.cc (subplot::handle_plot_data): Surround file names in single quotes, not double (for Windows). (do_external_plotter_cd): Likewise.
--- a/src/sysdep.cc +++ b/src/sysdep.cc @@ -100,6 +100,27 @@ } #endif +#if defined (__CYGWIN__) + +#include <limits.h> +#include <sys/cygwin.h> + +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 + #if defined (NeXT) extern "C" { @@ -147,6 +168,8 @@ { #if defined (__386BSD__) || defined (__FreeBSD__) BSD_init (); +#elif defined (__CYGWIN__) + CYGWIN_init (); #elif defined (NeXT) NeXT_init (); #elif defined (__EMX__)