# HG changeset patch # User John W. Eaton # Date 1466017953 14400 # Node ID e4a53d9b28bde1e401e3406b8b4a43b0939b5ca9 # Parent f500cde065f7c5e00829fb167b2a7990cdf2977f remove code specific to obsolete version of GCC * thread-manager.cc, sighandlers.cc: Delete code to work around bug in GCC 4.1.2 and possibly earlier versions. diff -r f500cde065f7 -r e4a53d9b28bd libgui/src/thread-manager.cc --- a/libgui/src/thread-manager.cc Wed Jun 15 18:23:15 2016 -0700 +++ b/libgui/src/thread-manager.cc Wed Jun 15 15:12:33 2016 -0400 @@ -99,18 +99,6 @@ : rep (octave_thread_manager::create_rep ()) { } -// The following is a workaround for an apparent bug in GCC 4.1.2 and -// possibly earlier versions. See Octave bug report #30685 for details. -#if defined (__GNUC__) -# if ! (__GNUC__ > 4 \ - || (__GNUC__ == 4 && (__GNUC_MINOR__ > 1 \ - || (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ > 2)))) -# undef GNULIB_NAMESPACE -# define GNULIB_NAMESPACE -# warning "disabling GNULIB_NAMESPACE for signal functions -- consider upgrading to a current version of GCC" -# endif -#endif - static void block_or_unblock_signal (int how, int sig) { @@ -124,9 +112,9 @@ sigset_t signal_mask; - GNULIB_NAMESPACE::sigemptyset (&signal_mask); + gnulib::sigemptyset (&signal_mask); - GNULIB_NAMESPACE::sigaddset (&signal_mask, sig); + gnulib::sigaddset (&signal_mask, sig); pthread_sigmask (how, &signal_mask, 0); #endif diff -r f500cde065f7 -r e4a53d9b28bd libinterp/corefcn/sighandlers.cc --- a/libinterp/corefcn/sighandlers.cc Wed Jun 15 18:23:15 2016 -0700 +++ b/libinterp/corefcn/sighandlers.cc Wed Jun 15 15:12:33 2016 -0400 @@ -227,25 +227,13 @@ # define BADSIG (void (*)(int))-1 #endif -// The following is a workaround for an apparent bug in GCC 4.1.2 and -// possibly earlier versions. See Octave bug report #30685 for details. -#if defined (__GNUC__) -# if ! (__GNUC__ > 4 \ - || (__GNUC__ == 4 && (__GNUC_MINOR__ > 1 \ - || (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ > 2)))) -# undef GNULIB_NAMESPACE -# define GNULIB_NAMESPACE -# warning "disabling GNULIB_NAMESPACE for signal functions -- consider upgrading to a current version of GCC" -# endif -#endif - #define BLOCK_SIGNAL(sig, nvar, ovar) \ do \ { \ - GNULIB_NAMESPACE::sigemptyset (&nvar); \ - GNULIB_NAMESPACE::sigaddset (&nvar, sig); \ - GNULIB_NAMESPACE::sigemptyset (&ovar); \ - GNULIB_NAMESPACE::sigprocmask (SIG_BLOCK, &nvar, &ovar); \ + gnulib::sigemptyset (&nvar); \ + gnulib::sigaddset (&nvar, sig); \ + gnulib::sigemptyset (&ovar); \ + gnulib::sigprocmask (SIG_BLOCK, &nvar, &ovar); \ } \ while (0) @@ -254,7 +242,7 @@ #endif #define BLOCK_CHILD(nvar, ovar) BLOCK_SIGNAL (SIGCHLD, nvar, ovar) -#define UNBLOCK_CHILD(ovar) GNULIB_NAMESPACE::sigprocmask (SIG_SETMASK, &ovar, 0) +#define UNBLOCK_CHILD(ovar) gnulib::sigprocmask (SIG_SETMASK, &ovar, 0) // Called from octave_quit () to actually do something about the signals // we have caught. @@ -345,7 +333,7 @@ { octave_set_signal_handler (sig_number, SIG_DFL); - GNULIB_NAMESPACE::raise (sig_number); + gnulib::raise (sig_number); } } } @@ -376,10 +364,10 @@ act.sa_flags |= SA_RESTART; #endif - GNULIB_NAMESPACE::sigemptyset (&act.sa_mask); - GNULIB_NAMESPACE::sigemptyset (&oact.sa_mask); + gnulib::sigemptyset (&act.sa_mask); + gnulib::sigemptyset (&oact.sa_mask); - GNULIB_NAMESPACE::sigaction (sig, &act, &oact); + gnulib::sigaction (sig, &act, &oact); return oact.sa_handler; }