[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 6709240: Fix compilation of mod-test.c on MinGW
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 6709240: Fix compilation of mod-test.c on MinGW |
Date: |
Sun, 5 May 2019 11:08:35 -0400 (EDT) |
branch: master
commit 6709240b7a36d7aab7a83d4ddd2765e45e687c5d
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
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.
---
test/data/emacs-module/mod-test.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/test/data/emacs-module/mod-test.c
b/test/data/emacs-module/mod-test.c
index fccc60f..ad962d5 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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 6709240: Fix compilation of mod-test.c on MinGW,
Eli Zaretskii <=