From bug-octave-request at bevo dot che dot wisc dot edu Fri Jan 23 08:39:09 2004 Subject: V2.1.35 ispc() on Win-NT From: "John W. Eaton" To: Fabian at isas-berlin dot de Cc: bug-octave at bevo dot che dot wisc dot edu Date: Fri, 23 Jan 2004 08:38:15 -0600 On 23-Jan-2004, Fabian at isas-berlin dot de wrote: | Did compile new V2.1.35 Octave on Cygwin platform (Windows NT), | but the new 'ispc()' - function tells me, that I'm on UNIX, | and 'isunix()' - function confirms this erraneous result. | | | octave:> computer |- i686-pc-cygwin | octave:> version |- ans = 2.1.53 | octave:> ispc |- ans = 0 # ERROR | octave:> isunix |- ans = 1 # ERROR | | | octave:> octave_config_info | | ... | ... | octfiledir = /usr/local/libexec/octave/2.1.53/oct/i686-pc-cygwin | octincludedir = /usr/local/include/octave-2.1.53 | octlibdir = /usr/local/lib/octave-2.1.53 | prefix = /usr/local | startupfiledir = /usr/local/share/octave/2.1.53/m/startup | unix = 1 << 0 expected | version = 2.1.53 | windows = 0 << 1 expected | words_big_endian = 0 | words_little_endian = 1 If you are running inside Cygwin, then I would expect isunix to return true, becuase you have a mostly Unix-like system that you can use. But, I would also expect windows to return true, because you are running on a Windows system. The code to set these is bool unix_system = true; bool windows_system = false; #if defined (WIN32) windows_system = true; #if !defined (__CYGWIN__) unix_system = false; #endif #endif m.assign ("unix", octave_value (unix_system)); m.assign ("windows", octave_value (windows_system)); in toplevel.cc. So is WIN32 not defined by gcc on Cygwin systems now? What should we use to check this? jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------