diff options
| author | Sam Varshavchik | 2022-05-22 23:57:54 -0400 |
|---|---|---|
| committer | Sam Varshavchik | 2022-05-22 23:57:54 -0400 |
| commit | 545e97ccb9facf67865f8f758053d440e9076de0 (patch) | |
| tree | c95472629c757a5a24fd773338c51e98f24e613f | |
| parent | 83e37efc8ed785cd095eb585ff747e5702ec49b3 (diff) | |
| download | courier-libs-545e97ccb9facf67865f8f758053d440e9076de0.tar.bz2 | |
Additional gcc 12 and C++20 fixes.
| -rw-r--r-- | unicode/Makefile.am | 2 | ||||
| -rw-r--r-- | unicode/biditest.C | 5 | ||||
| -rw-r--r-- | unicode/biditest2.C | 4 | ||||
| -rw-r--r-- | unicode/configure.ac | 1 | ||||
| -rw-r--r-- | unicode/m4/courier-unicode.m4 | 21 | ||||
| -rw-r--r-- | unicode/normalizetest.C | 12 |
6 files changed, 30 insertions, 15 deletions
diff --git a/unicode/Makefile.am b/unicode/Makefile.am index 385bb1b..b150eef 100644 --- a/unicode/Makefile.am +++ b/unicode/Makefile.am @@ -4,7 +4,7 @@ ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4 -AM_CXXFLAGS= @COURIER_UNICODE_CXXFLAGS@ @EXTRA_CXXFLAGS@ +AM_CXXFLAGS = @COURIER_UNICODE_CXXFLAGS@ noinst_SCRIPTS=update.sh \ mkcategories.pl \ diff --git a/unicode/biditest.C b/unicode/biditest.C index 1aa2c63..1a25570 100644 --- a/unicode/biditest.C +++ b/unicode/biditest.C @@ -21,8 +21,9 @@ int main(int argc, char **argv) char32_t c=atoi(argv[1]); unicode_bidi_bracket_type_t bt; - std::cout << unicode_bidi_mirror(c) << " " - << unicode_bidi_bracket_type(c, &bt) << " "; + std::cout << (unsigned long)unicode_bidi_mirror(c) << " " + << (unsigned long)unicode_bidi_bracket_type(c, &bt) + << " "; std::cout << (char)bt << std::endl; exit (0); } diff --git a/unicode/biditest2.C b/unicode/biditest2.C index 54a82a8..3399202 100644 --- a/unicode/biditest2.C +++ b/unicode/biditest2.C @@ -335,7 +335,7 @@ void character_test() std::cerr << " " << std::hex << std::setw(4) << std::setfill('0') - << s[i] << "/" + << (unsigned long)s[i] << "/" << std::dec << (int)l[i]; } @@ -506,7 +506,7 @@ void character_test() default: std::cerr << std::hex << std::setw(4) << std::setfill('0') - << c; + << (unsigned long)c; break; } } diff --git a/unicode/configure.ac b/unicode/configure.ac index 552c203..dd3536b 100644 --- a/unicode/configure.ac +++ b/unicode/configure.ac @@ -21,7 +21,6 @@ AC_PROG_CXX AX_COURIER_UNICODE_CXXFLAGS AC_SUBST(COURIER_UNICODE_CXXFLAGS) -AC_SUBST(EXTRA_CXXFLAGS) AC_PATH_PROGS(PERL, perl5 perl, perl, $LPATH) diff --git a/unicode/m4/courier-unicode.m4 b/unicode/m4/courier-unicode.m4 index 9619b45..f31ebfc 100644 --- a/unicode/m4/courier-unicode.m4 +++ b/unicode/m4/courier-unicode.m4 @@ -13,9 +13,14 @@ AC_LANG_PUSH([C++]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <string> + +void func(std::u32string, char32_t); + ]], [[ std::u32string s; - char32_t c; + char32_t c=0; + + func(s, c); ]])], [ ], @@ -26,9 +31,14 @@ CXXFLAGS="$save_CFLAGS $COURIER_UNICODE_CXXFLAGS" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <string> + +void func(std::u32string, char32_t); + ]], [[ std::u32string s; - char32_t c; + char32_t c=0; + + func(s, c); ]])], [ ], @@ -39,9 +49,14 @@ CXXFLAGS="$save_CFLAGS $COURIER_UNICODE_CXXFLAGS" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <string> + +void func(std::u32string, char32_t); + ]], [[ std::u32string s; - char32_t c; + char32_t c=0; + + func(s, c); ]])], [ ], diff --git a/unicode/normalizetest.C b/unicode/normalizetest.C index c4ecc3f..2c379cb 100644 --- a/unicode/normalizetest.C +++ b/unicode/normalizetest.C @@ -24,7 +24,7 @@ static void dump(const char32_t *s, << std::hex << std::setw(4) << std::setfill('0') - << s[i] + << (unsigned long)s[i] << std::dec << std::setw(0); } @@ -189,7 +189,7 @@ void testtablookup() 0) != t.found) { std::cerr << "unicode_tab_lookup failed for " - << t.ch << std::endl; + << (unsigned long)t.ch << std::endl; } } @@ -212,11 +212,11 @@ void testcompose1() std::cerr << "testcompose1: failed to compose " << std::hex << std::setw(4) << std::setfill('0') - << canonical_compositions[i][0] + << (unsigned long)canonical_compositions[i][0] << " with " << std::hex << std::setw(4) << std::setfill('0') - << canonical_compositions[i][1] + << (unsigned long)canonical_compositions[i][1] << std::endl; exit(1); } @@ -232,11 +232,11 @@ void testcompose1() std::cerr << "testcompose1: should not compose " << std::hex << std::setw(4) << std::setfill('0') - << canonical_compositions[i][1] + << (unsigned long)canonical_compositions[i][1] << " with " << std::hex << std::setw(4) << std::setfill('0') - << canonical_compositions[i][0] + << (unsigned long)canonical_compositions[i][0] << std::endl; exit(1); } |
