[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, feature/api-mpfr, updated. gawk-4.1.0-27
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, feature/api-mpfr, updated. gawk-4.1.0-2704-ge9786dd |
Date: |
Wed, 9 Aug 2017 14:08:38 -0400 (EDT) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, feature/api-mpfr has been updated
via e9786ddcfcdeae8e6230f9c4b8f51445a3ff1d9c (commit)
from 63e02ea9ae9921a45d36ab631fa31593cf149370 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=e9786ddcfcdeae8e6230f9c4b8f51445a3ff1d9c
commit e9786ddcfcdeae8e6230f9c4b8f51445a3ff1d9c
Author: Arnold D. Robbins <address@hidden>
Date: Wed Aug 9 21:08:08 2017 +0300
Improve checking for MPFR in API at dl_load time.
diff --git a/ChangeLog b/ChangeLog
index 1d71517..9d50ff4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2017-08-09 Arnold D. Robbins <address@hidden>
+ * gawkapi.h (check_mpfr_versions): Define differently based on if
+ MPFR version macro is defined. Enhance body to use do/while(0).
+ (dl_load): Call check_mpfr_versions unconditionally.
+
+2017-08-09 Arnold D. Robbins <address@hidden>
+
* main.c (usage): Add URL for Bug reporting info to the help message.
Unrelated:
diff --git a/gawkapi.h b/gawkapi.h
index d87ddb7..1c6c74e 100644
--- a/gawkapi.h
+++ b/gawkapi.h
@@ -1115,6 +1115,8 @@ int dl_load(const gawk_api_t *const api_p, awk_ext_id_t
id) \
exit(1); \
} \
\
+ check_mpfr_version(extension); \
+\
/* load functions */ \
for (i = 0, j = sizeof(func_table) / sizeof(func_table[0]); i < j; i++)
{ \
if (func_table[i].name == NULL) \
@@ -1139,11 +1141,8 @@ int dl_load(const gawk_api_t *const api_p, awk_ext_id_t
id) \
return (errors == 0); \
}
-/*
- * If you are using extended-precision calculations in your library, please
- * call this macro from your init_func.
- */
-#define check_mpfr_version(extension) { \
+#if defined __GNU_MP_VERSION && defined MPFR_VERSION_MAJOR
+#define check_mpfr_version(extension) do { \
if (api->gmp_major_version != __GNU_MP_VERSION \
|| api->gmp_minor_version < __GNU_MP_VERSION_MINOR) { \
fprintf(stderr, #extension ": GMP version mismatch with
gawk!\n"); \
@@ -1160,7 +1159,10 @@ int dl_load(const gawk_api_t *const api_p, awk_ext_id_t
id) \
api->mpfr_major_version, api->mpfr_minor_version); \
exit(1); \
} \
-}
+} while (0)
+#else
+#define check_mpfr_version(extension) /* nothing */
+#endif
#endif /* GAWK */
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
gawkapi.h | 14 ++++++++------
2 files changed, 14 insertions(+), 6 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, feature/api-mpfr, updated. gawk-4.1.0-2704-ge9786dd,
Arnold Robbins <=