diff options
author | Eli Zaretskii <eliz@gnu.org> | 2019-05-05 18:07:26 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2019-05-05 18:07:26 +0300 |
commit | 6709240b7a36d7aab7a83d4ddd2765e45e687c5d (patch) | |
tree | 760b6d2a0c8d00c4b883402f23080459216f89b0 /test/data/emacs-module | |
parent | cca81f22d972f4bfc953534104e9e72da421f51e (diff) | |
download | emacs-6709240b7a36d7aab7a83d4ddd2765e45e687c5d.tar.gz |
Fix compilation of mod-test.c on MinGW
* test/data/emacs-module/mod-test.c (Fmod_test_nanoseconds)
[__MINGW32__]: Use _Static_assert, not static_assert, as the
latter is not available in mingw.org's MinGW's assert.h.
Diffstat (limited to 'test/data/emacs-module')
-rw-r--r-- | test/data/emacs-module/mod-test.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/data/emacs-module/mod-test.c b/test/data/emacs-module/mod-test.c index fccc60fe4dd..ad962d5f685 100644 --- a/test/data/emacs-module/mod-test.c +++ b/test/data/emacs-module/mod-test.c @@ -377,7 +377,11 @@ Fmod_test_nanoseconds (emacs_env *env, ptrdiff_t nargs, emacs_value *args, void struct emacs_mpz nanoseconds; assert (LONG_MIN <= time.tv_sec && time.tv_sec <= LONG_MAX); mpz_init_set_si (nanoseconds.value, time.tv_sec); +#ifdef __MINGW32__ + _Static_assert (1000000000 <= ULONG_MAX, "unsupported architecture"); +#else static_assert (1000000000 <= ULONG_MAX, "unsupported architecture"); +#endif mpz_mul_ui (nanoseconds.value, nanoseconds.value, 1000000000); assert (0 <= time.tv_nsec && time.tv_nsec <= ULONG_MAX); mpz_add_ui (nanoseconds.value, nanoseconds.value, time.tv_nsec); |