Commits

Satish Balay committed 53fed7e Merge

Merge branch 'balay/fix-fenv.h-check-on-cygwin64' into maint

  • Participants
  • Parent commits 25c470c, e4773d9

Comments (0)

Files changed (2)

config/BuildSystem/config/libraries.py

       self.logPrint('Warning: tgamma() not found')
     return
 
+  def checkMathFenv(self):
+    '''Checks if <fenv.h> can be used with FE_DFL_ENV'''
+    if not self.math is None and self.check(self.math, ['fesetenv'], prototype = ['#include <fenv.h>'], call = ['fesetenv(FE_DFL_ENV);']):
+      self.addDefine('HAVE_FENV_H', 1)
+    else:
+      self.logPrint('Warning: <fenv.h> with FE_DFL_ENV not found')
+    return
+
   def checkCompression(self):
     '''Check for libz, the compression library'''
     self.compression = None
     self.executeTest(self.checkMath)
     self.executeTest(self.checkMathErf)
     self.executeTest(self.checkMathTgamma)
+    self.executeTest(self.checkMathFenv)
     self.executeTest(self.checkCompression)
     self.executeTest(self.checkRealtime)
     self.executeTest(self.checkDynamic)

config/PETSc/Configure.py

                                             'unistd', 'sys/sysinfo', 'machine/endian', 'sys/param', 'sys/procfs', 'sys/resource',
                                             'sys/systeminfo', 'sys/times', 'sys/utsname','string', 'stdlib','memory',
                                             'sys/socket','sys/wait','netinet/in','netdb','Direct','time','Ws2tcpip','sys/types',
-                                            'WindowsX', 'cxxabi','float','ieeefp','stdint','fenv','sched','pthread','mathimf'])
+                                            'WindowsX', 'cxxabi','float','ieeefp','stdint','sched','pthread','mathimf'])
     functions = ['access', '_access', 'clock', 'drand48', 'getcwd', '_getcwd', 'getdomainname', 'gethostname', 'getpwuid',
                  'gettimeofday', 'getwd', 'memalign', 'memmove', 'mkstemp', 'popen', 'PXFGETARG', 'rand', 'getpagesize',
                  'readlink', 'realpath',  'sigaction', 'signal', 'sigset', 'usleep', 'sleep', '_sleep', 'socket',