aboutsummaryrefslogtreecommitdiffstats
path: root/custom.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-10-01 21:43:41 +0300
committerArnold D. Robbins <arnold@skeeve.com>2018-10-01 21:43:41 +0300
commit92014ca462f99220d2238692764f230448e4dae9 (patch)
treead2c6cc6d208b23f26b5a9856838e98805aff765 /custom.h
parent7f684e83cdfa0647d8e197271fe318d2c185d291 (diff)
downloadegawk-92014ca462f99220d2238692764f230448e4dae9.tar.gz
egawk-92014ca462f99220d2238692764f230448e4dae9.tar.bz2
egawk-92014ca462f99220d2238692764f230448e4dae9.zip
Fix for regex for non-GNU compilers.
Diffstat (limited to 'custom.h')
-rw-r--r--custom.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/custom.h b/custom.h
index 774659a6..522d3371 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