diff options
| author | Philipp Stephani | 2019-04-24 19:35:36 +0200 |
|---|---|---|
| committer | Philipp Stephani | 2019-04-24 23:27:43 +0200 |
| commit | 4eb7f9ef595c10df1ea78518b2f0410a0e79ec70 (patch) | |
| tree | b5721d7166a2b7d7285879bcb06b3a122182f6ff /test/data | |
| parent | 553220fca670ec13180e0763bc9338fbf8ed4b30 (diff) | |
| download | emacs-4eb7f9ef595c10df1ea78518b2f0410a0e79ec70.tar.gz emacs-4eb7f9ef595c10df1ea78518b2f0410a0e79ec70.zip | |
Unbreak build when building without GMP support.
Add support for a new preprocessor macro EMACS_MODULE_HAVE_MPZ_T to
emacs-module.h. If this macro is defined, assume that mpz_t is
already defined and don’t include gmp.h.
Don’t document the new macro for now, as it’s unclear whether we want
to support this in modules outside the Emacs tree.
* src/emacs-module.h.in: Allow user to prevent inclusion of gmp.h.
* src/emacs-module.c: Use mini-gmp if GMP is unavailable. Don’t
include gmp.h.
* src/lisp.h: Don’t require gmp.h. It’s not needed for lisp.h.
* test/Makefile.in (GMP_LIB, GMP_OBJ): New variables.
($(test_module)): Use them.
* test/data/emacs-module/mod-test.c: Use mini-gmp if GMP is unavailable.
Diffstat (limited to 'test/data')
| -rw-r--r-- | test/data/emacs-module/mod-test.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/data/emacs-module/mod-test.c b/test/data/emacs-module/mod-test.c index 8ac08f71534..b7007bd80ff 100644 --- a/test/data/emacs-module/mod-test.c +++ b/test/data/emacs-module/mod-test.c | |||
| @@ -27,11 +27,16 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 27 | #include <string.h> | 27 | #include <string.h> |
| 28 | #include <time.h> | 28 | #include <time.h> |
| 29 | 29 | ||
| 30 | #ifdef HAVE_GMP | ||
| 31 | #include <gmp.h> | ||
| 32 | #else | ||
| 33 | #include "mini-gmp.h" | ||
| 34 | #define EMACS_MODULE_HAVE_MPZ_T | ||
| 35 | #endif | ||
| 36 | |||
| 30 | #define EMACS_MODULE_GMP | 37 | #define EMACS_MODULE_GMP |
| 31 | #include <emacs-module.h> | 38 | #include <emacs-module.h> |
| 32 | 39 | ||
| 33 | #include <gmp.h> | ||
| 34 | |||
| 35 | #include "timespec.h" | 40 | #include "timespec.h" |
| 36 | 41 | ||
| 37 | int plugin_is_GPL_compatible; | 42 | int plugin_is_GPL_compatible; |