[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
uninorm tests: Fix compilation error on Cygwin
From: |
Bruno Haible |
Subject: |
uninorm tests: Fix compilation error on Cygwin |
Date: |
Mon, 18 Jan 2021 09:11:45 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; ) |
When compiling a testdir for all of Gnulib, on Cygwin, with libunistring
preinstalled, I get compilation errors such as:
In file included from ../../gltests/uninorm/test-nfc.c:21:0:
/usr/local/cygwin64/include/uninorm.h:130:21: error: initializer element is not
constant
#define UNINORM_NFC (&uninorm_nfc)
^
../../gltests/uninorm/test-nfc.c:25:15: note: in expansion of macro
'UNINORM_NFC'
uninorm_t n = UNINORM_NFC;
^~~~~~~~~~~
make[4]: *** [Makefile:21689: uninorm/test-nfc.o] Error 1
This patch fixes it.
2021-01-18 Bruno Haible <bruno@clisp.org>
uninorm tests: Fix compilation error on Cygwin.
* tests/uninorm/test-nfc.c (n): Don't define when using a preinstalled
libunistring on Windows.
* tests/uninorm/test-nfd.c (n): Likewise.
* tests/uninorm/test-nfkc.c (n): Likewise.
* tests/uninorm/test-nfkd.c (n): Likewise.
diff --git a/tests/uninorm/test-nfc.c b/tests/uninorm/test-nfc.c
index 0e90834..0a7d857 100644
--- a/tests/uninorm/test-nfc.c
+++ b/tests/uninorm/test-nfc.c
@@ -20,7 +20,7 @@
#include "uninorm.h"
-#if !(WOE32DLL || defined __ANDROID__)
+#if !(((defined _WIN32 || defined __CYGWIN__) && (HAVE_LIBUNISTRING ||
WOE32DLL)) || defined __ANDROID__)
/* Check that UNINORM_NFC is defined and links. */
uninorm_t n = UNINORM_NFC;
#endif
diff --git a/tests/uninorm/test-nfd.c b/tests/uninorm/test-nfd.c
index 63a40f9..e5a06bc 100644
--- a/tests/uninorm/test-nfd.c
+++ b/tests/uninorm/test-nfd.c
@@ -20,7 +20,7 @@
#include "uninorm.h"
-#if !(WOE32DLL || defined __ANDROID__)
+#if !(((defined _WIN32 || defined __CYGWIN__) && (HAVE_LIBUNISTRING ||
WOE32DLL)) || defined __ANDROID__)
/* Check that UNINORM_NFD is defined and links. */
uninorm_t n = UNINORM_NFD;
#endif
diff --git a/tests/uninorm/test-nfkc.c b/tests/uninorm/test-nfkc.c
index 0505319..52709d7 100644
--- a/tests/uninorm/test-nfkc.c
+++ b/tests/uninorm/test-nfkc.c
@@ -20,7 +20,7 @@
#include "uninorm.h"
-#if !(WOE32DLL || defined __ANDROID__)
+#if !(((defined _WIN32 || defined __CYGWIN__) && (HAVE_LIBUNISTRING ||
WOE32DLL)) || defined __ANDROID__)
/* Check that UNINORM_NFKC is defined and links. */
uninorm_t n = UNINORM_NFKC;
#endif
diff --git a/tests/uninorm/test-nfkd.c b/tests/uninorm/test-nfkd.c
index 1e20d9a..5e374e3 100644
--- a/tests/uninorm/test-nfkd.c
+++ b/tests/uninorm/test-nfkd.c
@@ -20,7 +20,7 @@
#include "uninorm.h"
-#if !(WOE32DLL || defined __ANDROID__)
+#if !(((defined _WIN32 || defined __CYGWIN__) && (HAVE_LIBUNISTRING ||
WOE32DLL)) || defined __ANDROID__)
/* Check that UNINORM_NFKD is defined and links. */
uninorm_t n = UNINORM_NFKD;
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- uninorm tests: Fix compilation error on Cygwin,
Bruno Haible <=