dtdocbook: glibc 2.27 drops support for matherr() support in math.h
authorPeter Howkins <flibble@users.sf.net>
Tue, 27 Mar 2018 02:55:32 +0000 (03:55 +0100)
committerPeter Howkins <flibble@users.sf.net>
Tue, 27 Mar 2018 02:55:32 +0000 (03:55 +0100)
cde/programs/dtdocbook/tcl/tclMtherr.c

index b5a4f5c753d94a2c0b5e6d6aa0e7d5921f0bafc8..2c02a4308afc0966524dc3478ae75a5e45548860 100644 (file)
@@ -65,6 +65,13 @@ extern int tcl_MathInProgress;
  * that don't really support it.  The compiled procedure is bogus,
  * but it will never be executed on these systems anyway.
  */
+#if defined(linux) && defined(__GLIBC__)
+# include <features.h>
+/* glibc removed matherr() support between 2.26 and 2.27 */
+# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 27) || __GLIBC__ >= 3
+#  undef NEED_MATHERR
+# endif
+#endif /* linux */
 
 #ifndef NEED_MATHERR
 struct exception {