Mercurial > gnulib
changeset 40164:b973ad598121
Fix build error when building a shared libunistring on Android.
* tests/uninorm/test-nfc.c (n): Don't define on Android.
(main): Add 'volatile', to defeat a GCC optimization that would
eliminate the reference.
* tests/uninorm/test-nfd.c (n): Don't define on Android.
(main): Add 'volatile', to defeat a GCC optimization that would
eliminate the reference.
* tests/uninorm/test-nfkc.c (n): Don't define on Android.
(main): Add 'volatile', to defeat a GCC optimization that would
eliminate the reference.
* tests/uninorm/test-nfkd.c (n): Don't define on Android.
(main): Add 'volatile', to defeat a GCC optimization that would
eliminate the reference.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Mon, 28 Jan 2019 21:14:08 +0100 |
parents | b89f4c441767 |
children | 959d7cd4aec1 |
files | ChangeLog tests/uninorm/test-nfc.c tests/uninorm/test-nfd.c tests/uninorm/test-nfkc.c tests/uninorm/test-nfkd.c |
diffstat | 5 files changed, 24 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Jan 28 01:20:11 2019 +0100 +++ b/ChangeLog Mon Jan 28 21:14:08 2019 +0100 @@ -1,3 +1,19 @@ +2019-01-28 Bruno Haible <bruno@clisp.org> + + Fix build error when building a shared libunistring on Android. + * tests/uninorm/test-nfc.c (n): Don't define on Android. + (main): Add 'volatile', to defeat a GCC optimization that would + eliminate the reference. + * tests/uninorm/test-nfd.c (n): Don't define on Android. + (main): Add 'volatile', to defeat a GCC optimization that would + eliminate the reference. + * tests/uninorm/test-nfkc.c (n): Don't define on Android. + (main): Add 'volatile', to defeat a GCC optimization that would + eliminate the reference. + * tests/uninorm/test-nfkd.c (n): Don't define on Android. + (main): Add 'volatile', to defeat a GCC optimization that would + eliminate the reference. + 2019-01-27 Bruno Haible <bruno@clisp.org> Avoid build errors due to wrong references between modules.
--- a/tests/uninorm/test-nfc.c Mon Jan 28 01:20:11 2019 +0100 +++ b/tests/uninorm/test-nfc.c Mon Jan 28 21:14:08 2019 +0100 @@ -20,7 +20,7 @@ #include "uninorm.h" -#if !WOE32DLL +#if !(WOE32DLL || defined __ANDROID__) /* Check that UNINORM_NFC is defined and links. */ uninorm_t n = UNINORM_NFC; #endif @@ -33,7 +33,7 @@ main () { /* Check that UNINORM_NFC is defined and links. */ - uninorm_t nf = UNINORM_NFC; + volatile uninorm_t nf = UNINORM_NFC; (void) nf; test_u32_nfc ();
--- a/tests/uninorm/test-nfd.c Mon Jan 28 01:20:11 2019 +0100 +++ b/tests/uninorm/test-nfd.c Mon Jan 28 21:14:08 2019 +0100 @@ -20,7 +20,7 @@ #include "uninorm.h" -#if !WOE32DLL +#if !(WOE32DLL || defined __ANDROID__) /* Check that UNINORM_NFD is defined and links. */ uninorm_t n = UNINORM_NFD; #endif @@ -33,7 +33,7 @@ main () { /* Check that UNINORM_NFD is defined and links. */ - uninorm_t nf = UNINORM_NFD; + volatile uninorm_t nf = UNINORM_NFD; (void) nf; test_u32_nfd ();
--- a/tests/uninorm/test-nfkc.c Mon Jan 28 01:20:11 2019 +0100 +++ b/tests/uninorm/test-nfkc.c Mon Jan 28 21:14:08 2019 +0100 @@ -20,7 +20,7 @@ #include "uninorm.h" -#if !WOE32DLL +#if !(WOE32DLL || defined __ANDROID__) /* Check that UNINORM_NFKC is defined and links. */ uninorm_t n = UNINORM_NFKC; #endif @@ -33,7 +33,7 @@ main () { /* Check that UNINORM_NFKC is defined and links. */ - uninorm_t nf = UNINORM_NFKC; + volatile uninorm_t nf = UNINORM_NFKC; (void) nf; test_u32_nfkc ();
--- a/tests/uninorm/test-nfkd.c Mon Jan 28 01:20:11 2019 +0100 +++ b/tests/uninorm/test-nfkd.c Mon Jan 28 21:14:08 2019 +0100 @@ -20,7 +20,7 @@ #include "uninorm.h" -#if !WOE32DLL +#if !(WOE32DLL || defined __ANDROID__) /* Check that UNINORM_NFKD is defined and links. */ uninorm_t n = UNINORM_NFKD; #endif @@ -33,7 +33,7 @@ main () { /* Check that UNINORM_NFKD is defined and links. */ - uninorm_t nf = UNINORM_NFKD; + volatile uninorm_t nf = UNINORM_NFKD; (void) nf; test_u32_nfkd ();