aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xChangeLog4
-rw-r--r--custom.h7
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a0654c6..a2d8aa53 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-10-01 Nelson H.F. Beebe <beebe@math.utah.edu>
+
+ * custom.h (__builtin_expect): Define for non-GNU compilers.
+
2018-09-27 Andrew J. Schorr <aschorr@telemetry-investments.com>
* mpfr.c (force_mpnum): Check that base is 10 also before
diff --git a/custom.h b/custom.h
index 468c1a50..8d375c89 100644
--- a/custom.h
+++ b/custom.h
@@ -53,6 +53,13 @@
#endif
#endif
+/* This keeps regex happy on non-GCC compilers */
+#ifndef __GNUC__
+#ifndef __builtin_expect
+#define __builtin_expect(expr, val) (expr)
+#endif
+#endif
+
/* For QNX, based on submission from Michael Hunter, mphunter@qnx.com */
#ifdef __QNX__
#define GETPGRP_VOID 1