# HG changeset patch # User John W. Eaton # Date 1289440532 18000 # Node ID 2f29b765c0ef7dfb7c3e0d8d9a1a7c142cb79928 # Parent 9c6143abf9e1a3792dfbf826b901f764566bc038 eliminate special cases for __EMX__ systems diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2010-11-10 John W. Eaton + + * lo-sysdep.cc (octave_chdir): Delete special case for __EMX__. + * oct-env.cc (octave_env::do_make_absolute): Likewise. + 2010-11-10 John W. Eaton * lo-ieee.h: Eliminate special cases for SCO. diff --git a/liboctave/lo-sysdep.cc b/liboctave/lo-sysdep.cc --- a/liboctave/lo-sysdep.cc +++ b/liboctave/lo-sysdep.cc @@ -72,33 +72,12 @@ { std::string path = file_ops::tilde_expand (path_arg); -#if defined (__EMX__) - int retval = -1; - - char *tmp_path = strsave (path.c_str ()); - - if (path.length () == 2 && path[1] == ':') - { - char *upper_case_dir_name = strupr (tmp_path); - _chdrive (upper_case_dir_name[0]); - if (_getdrive () == upper_case_dir_name[0]) - retval = _chdir2 ("/"); - } - else - retval = _chdir2 (tmp_path); - - delete [] tmp_path; - - return retval; -#else - #if defined (__WIN32__) && ! defined (__CYGWIN__) if (path.length() == 2 && path[1] == ':') path += "\\"; #endif return chdir (path.c_str ()); -#endif } #if defined (__WIN32__) && ! defined (__CYGWIN__) diff --git a/liboctave/oct-env.cc b/liboctave/oct-env.cc --- a/liboctave/oct-env.cc +++ b/liboctave/oct-env.cc @@ -321,11 +321,6 @@ octave_env::do_make_absolute (const std::string& s, const std::string& dot_path) const { -#if defined (__EMX__) - if (s.length () > 1 && s[1] == ':') - return s; -#endif - if (dot_path.empty () || s.empty () || do_absolute_pathname (s)) return s; diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2010-11-10 John W. Eaton + + * sighandlers.cc (MAYBE_ACK_SIGNAL): Delete macro and all uses. + (sigchld_handler): Delete special case for __EMX__. + * sysdep.cc (sysdep_init): Eliminate special case for __EMX__. + (OS2_init, Fextproc): Delete. + 2010-11-10 John W. Eaton * sysdep.cc (sysdep_init): Eliminate special case for SCO. diff --git a/src/sighandlers.cc b/src/sighandlers.cc --- a/src/sighandlers.cc +++ b/src/sighandlers.cc @@ -71,15 +71,6 @@ // Similar to Vsighup_dumps_octave_core, but for SIGTERM signal. static bool Vsigterm_dumps_octave_core = true; -#if defined (__EMX__) -#define MAYBE_ACK_SIGNAL(sig) \ - octave_set_signal_handler (sig, SIG_ACK) -#define ACK_USES_SIG 1 -#else -#define MAYBE_ACK_SIGNAL(sig) \ - do { } while (0) -#endif - // List of signals we have caught since last call to octave_signal_handler. static bool octave_signals_caught[NSIG]; @@ -218,15 +209,6 @@ volatile octave_interrupt_handler saved_interrupt_handler = octave_ignore_interrupts (); - // I wonder if this is really right, or if SIGCHLD should just be - // blocked on OS/2 systems the same as for systems with POSIX signal - // functions. - -#if defined (__EMX__) - volatile sig_handler *saved_sigchld_handler - = octave_set_signal_handler (SIGCHLD, SIG_IGN); -#endif - sigset_t set, oset; BLOCK_CHILD (set, oset); @@ -243,12 +225,6 @@ octave_set_interrupt_handler (saved_interrupt_handler); UNBLOCK_CHILD (oset); - -#ifdef __EMX__ - octave_set_signal_handler (SIGCHLD, saved_sigchld_handler); -#endif - - MAYBE_ACK_SIGNAL (SIGCHLD); } #endif /* defined(SIGCHLD) */ @@ -257,8 +233,6 @@ static void sigfpe_handler (int /* sig */) { - MAYBE_ACK_SIGNAL (SIGFPE); - if (can_interrupt && octave_interrupt_state >= 0) { octave_signal_caught = 1; @@ -275,8 +249,6 @@ static void sig_hup_or_term_handler (int sig) { - MAYBE_ACK_SIGNAL (sig); - switch (sig) { #if defined (SIGHUP) @@ -310,8 +282,6 @@ static void sigwinch_handler (int /* sig */) { - MAYBE_ACK_SIGNAL (SIGWINCH); - command_editor::resize_terminal (); } #endif @@ -382,8 +352,6 @@ static void sigint_handler (int sig) { - MAYBE_ACK_SIGNAL (sig); - #ifdef USE_W32_SIGINT if (w32_in_main_thread ()) user_abort (strsignal (sig), sig); @@ -398,8 +366,6 @@ static void sigpipe_handler (int /* sig */) { - MAYBE_ACK_SIGNAL (SIGPIPE); - octave_signal_caught = 1; octave_signals_caught[SIGPIPE] = true; diff --git a/src/sysdep.cc b/src/sysdep.cc --- a/src/sysdep.cc +++ b/src/sysdep.cc @@ -270,14 +270,6 @@ } #endif -#if defined (__EMX__) -OS2_init (void) -{ - _control87 ((EM_INVALID | EM_DENORMAL | EM_ZERODIVIDE | EM_OVERFLOW - | EM_UNDERFLOW | EM_INEXACT), MCW_EM); -} -#endif - void sysdep_init (void) { @@ -289,8 +281,6 @@ MSVC_init (); #elif defined (NeXT) NeXT_init (); -#elif defined (__EMX__) - OS2_init (); #endif octave_ieee_init (); @@ -846,15 +836,3 @@ return retval; } - -#if defined (__EMX__) && defined (OS2) - -DEFUN (extproc, , , - "extproc: ignored by Octave") -{ - return octave_value_list (); -} - -DEFALIAS (EXTPROC, extproc); - -#endif