Use standard (POSIX-compliant) macro "__linux__" for identification of Linux system, instead of obsolete "linux"
//=======================================================================
void OSD_Chronometer::GetProcessCPU (Standard_Real& UserSeconds, Standard_Real& SystemSeconds)
{
-#if defined(__linux__) || defined(linux) || defined(__FreeBSD__) || defined(__ANDROID__) || defined(__QNX__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__ANDROID__) || defined(__QNX__)
static const long aCLK_TCK = sysconf(_SC_CLK_TCK);
#else
static const long aCLK_TCK = CLK_TCK;
// POSIX threads
#include <pthread.h>
-#ifdef linux
+#ifdef __linux__
#include <fenv.h>
static Standard_Boolean fFltExceptions = Standard_False;
#endif
// cout << "OSD::Handler: signal " << (int) theSignal << " occured inside a try block " << endl ;
if ( ADR_ACT_SIGIO_HANDLER != NULL )
(*ADR_ACT_SIGIO_HANDLER)() ;
-#ifdef linux
+#ifdef __linux__
if (fFltExceptions)
feenableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
//feenableexcept (FE_INVALID | FE_DIVBYZERO);
(void)theSignal; // silence GCC warnings
(void)theContext;
#endif
-#ifdef linux
+#ifdef __linux__
if (fFltExceptions)
feenableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
//feenableexcept (FE_INVALID | FE_DIVBYZERO);
cerr << "ieee_handler does not work !!! KO " << endl;
#endif
}
-#elif defined (linux)
+#elif defined (__linux__)
feenableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
//feenableexcept (FE_INVALID | FE_DIVBYZERO);
fFltExceptions = Standard_True;
sigaction(SIGBUS,&oact,&oact);
#endif
-#if (!defined (linux)) && (!defined(__linux__))
+#if !defined(__linux__)
sigaction(SIGSYS,&act,&oact); // ...... bad argument to system call
# ifdef OBJS
}
catch(Standard_NumericError) // Linux, Windows with SSE2
{
- di << "Exception is caught, OK\n";
+ di << "Caught, OK\n";
}
catch(Standard_Failure) {
//cout << " Caught (" << Standard_Failure::Caught() << ")... KO" << endl;
perror("ERR_MEMRY_FAIL");
#endif
-#if defined(IRIX) || defined(__sgi) || defined(SOLARIS) || defined(__sun) || defined(__linux__) || defined(linux) || defined(__FreeBSD__) || defined(__ANDROID__)
+#if defined(IRIX) || defined(__sgi) || defined(SOLARIS) || defined(__sun) || defined(__linux__) || defined(__FreeBSD__) || defined(__ANDROID__)
if ((myMMap = open ("/dev/zero", O_RDWR)) < 0) {
if ((myMMap = open ("/dev/null", O_RDWR)) < 0){
myMMap = 0;
puts "TODO OCC24156 MacOS: Faulty OCC6143"
-puts "TODO OCC27713 Linux: Faulty OCC6143"
-puts "TODO OCC27713 Linux: Error"
puts "================"
puts "OCC1723"
puts "================"
puts ""
#######################################################################################
-# OSD::SetSignal : not all FLT exceptions are catched
-# Correct handling of exceptions on WNT
+# OSD::SetSignal : not all FLT exceptions are caught
#######################################################################################
pload QAcommands
# Exception in intersection algorithm if FPE is switched on
######################################################
-puts "TODO OCC26329 ALL: Error: dsetsignal command does not exist"
-
-# This "if" should be deleted after integration the fix for issue #26329
-if { [catch { dsetsignal 1 } ] } {
- puts "Error: dsetsignal command does not exist"
-}
+dsetsignal 1
restore [locate_data_file bug27842_shape1_fix.brep] b1
restore [locate_data_file bug27842_shape2_fix.brep] b2