diff --git a/src/bfd/config.h.in b/src/bfd/config.h.in index 0ab77e377..1d1fc34d0 100644 --- a/src/bfd/config.h.in +++ b/src/bfd/config.h.in @@ -639,6 +639,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILE_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MALLOC_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAN_H @@ -708,6 +711,9 @@ /* Define to 1 if you have the 'uname' function. */ #undef HAVE_UNAME +/* Define to 1 if you have the header file. */ +#undef HAVE_UNICONV_H + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H diff --git a/src/bfd/configure b/src/bfd/configure index 3e8bacdcd..dc03bf4b2 100755 --- a/src/bfd/configure +++ b/src/bfd/configure @@ -21972,7 +21972,6 @@ fi printf "%s\n" "$ac_cv_path_CLANG_ANALYZER" >&6; } ## (need this extra line here) CLANG_ANALYZER=${ac_cv_path_CLANG_ANALYZER} - ## FIXME: recheck documentation on this one; I might be using the wrong value... { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fstrict-flex-arrays=1" >&5 printf %s "checking whether C compiler handles -fstrict-flex-arrays=1... " >&6; } @@ -25010,6 +25009,12 @@ if test "x$ac_cv_header_sys_file_h" = xyes then : printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "sys/malloc.h" "ac_cv_header_sys_malloc_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_malloc_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_MALLOC_H 1" >>confdefs.h + fi ac_fn_c_check_header_compile "$LINENO" "sys/paccess.h" "ac_cv_header_sys_paccess_h" "$ac_includes_default" if test "x$ac_cv_header_sys_paccess_h" = xyes @@ -25070,6 +25075,12 @@ if test "x$ac_cv_header_time_h" = xyes then : printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "uniconv.h" "ac_cv_header_uniconv_h" "$ac_includes_default" +if test "x$ac_cv_header_uniconv_h" = xyes +then : + printf "%s\n" "#define HAVE_UNICONV_H 1" >>confdefs.h + fi ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" if test "x$ac_cv_header_wchar_h" = xyes diff --git a/src/bfd/configure.ac b/src/bfd/configure.ac index 781c3f61f..f85ea9744 100644 --- a/src/bfd/configure.ac +++ b/src/bfd/configure.ac @@ -359,7 +359,6 @@ if test "x${WANT_CONVERSION_WARNS}" = "x" && test "x${enable_build_warnings}" = fi AM_BINUTILS_WARNINGS AM_BINUTILS_CLANG_STATIC_ANALYSIS - ## FIXME: recheck documentation on this one; I might be using the wrong value... gl_WARN_ADD([-fstrict-flex-arrays=1],[FLEXMEMBER_STRICTNESS_FLAG])dnl dnl# add some insurance to our "config.h" header: @@ -650,10 +649,11 @@ AC_CHECK_HEADERS([ctype.h errno.h fcntl.h gettext.h iconv.h libgen.h \ mach-o/loader.h malloca.h malloc/malloc.h math.h \ mingw/fcntl.h mingw/malloc.h mingw/sys/types.h \ realloc.h signal.h stdarg.h stddef.h stdio.h sys/acl.h \ - sys/core.h sys/errno.h sys/file.h sys/paccess.h \ - sys/param.h sys/region.h sys/resource.h sys/signal.h \ - sys/socket.h sys/time.h sys/user.h sys/utsname.h time.h \ - wchar.h wctype.h windef.h windows.h])dnl + sys/core.h sys/errno.h sys/file.h sys/malloc.h \ + sys/paccess.h sys/param.h sys/region.h sys/resource.h \ + sys/signal.h sys/socket.h sys/time.h sys/user.h \ + sys/utsname.h time.h uniconv.h wchar.h wctype.h \ + windef.h windows.h])dnl GCC_HEADER_STDINT([bfd_stdint.h],[stdint.h])dnl AC_HEADER_TIME AC_HEADER_DIRENT diff --git a/src/bfd/mach-o.c b/src/bfd/mach-o.c index afe8b5486..51e53c90a 100644 --- a/src/bfd/mach-o.c +++ b/src/bfd/mach-o.c @@ -1352,6 +1352,7 @@ bfd_mach_o_make_bfd_section(bfd *abfd, bfd_mach_o_section *section) bfdsec->alignment_power = (unsigned int)section->align; bfdsec->segment_mark = 0U; + /* FIXME: -Wtautological-compare in here: */ if (((section->flags & BFD_MACH_O_SECTION_TYPE_MASK) == BFD_MACH_O_S_ZEROFILL) || ((section->flags & BFD_MACH_O_SECTION_TYPE_MASK) == BFD_MACH_O_S_GB_ZEROFILL)) { diff --git a/src/bfd/po/bfd.pot b/src/bfd/po/bfd.pot index d94dafa30..75a0cf4e8 100644 --- a/src/bfd/po/bfd.pot +++ b/src/bfd/po/bfd.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-15 20:33-0400\n" +"POT-Creation-Date: 2024-10-15 21:40-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/src/binutils/arlex.l b/src/binutils/arlex.l index d4b751de7..0ee2391c4 100644 --- a/src/binutils/arlex.l +++ b/src/binutils/arlex.l @@ -60,6 +60,7 @@ extern int yyinunput(void); # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) # pragma GCC diagnostic ignored "-Wswitch-default" # pragma GCC diagnostic ignored "-Wold-style-definition" +# pragma GCC diagnostic ignored "-Wsign-compare" # endif /* gcc 4.2+ */ #endif /* any gcc */ diff --git a/src/binutils/doc/addr2line.1 b/src/binutils/doc/addr2line.1 index 3bff822fb..fcdece9a7 100644 --- a/src/binutils/doc/addr2line.1 +++ b/src/binutils/doc/addr2line.1 @@ -55,7 +55,7 @@ .\" ======================================================================== .\" .IX Title "ADDR2LINE 1" -.TH ADDR2LINE 1 2024-10-15 binutils-2.16.91 "GNU Development Tools" +.TH ADDR2LINE 1 2024-10-16 binutils-2.16.91 "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/src/binutils/doc/ar.1 b/src/binutils/doc/ar.1 index 8e3d62510..31bae30ac 100644 --- a/src/binutils/doc/ar.1 +++ b/src/binutils/doc/ar.1 @@ -55,7 +55,7 @@ .\" ======================================================================== .\" .IX Title "AR 1" -.TH AR 1 2024-10-15 binutils-2.16.91 "GNU Development Tools" +.TH AR 1 2024-10-16 binutils-2.16.91 "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/src/binutils/doc/cxxfilt.man b/src/binutils/doc/cxxfilt.man index cec50d219..530f6b18e 100644 --- a/src/binutils/doc/cxxfilt.man +++ b/src/binutils/doc/cxxfilt.man @@ -55,7 +55,7 @@ .\" ======================================================================== .\" .IX Title "C++FILT 1" -.TH C++FILT 1 2024-10-15 binutils-2.16.91 "GNU Development Tools" +.TH C++FILT 1 2024-10-16 binutils-2.16.91 "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/src/binutils/doc/dlltool.1 b/src/binutils/doc/dlltool.1 index 91f513f96..abd825f8c 100644 --- a/src/binutils/doc/dlltool.1 +++ b/src/binutils/doc/dlltool.1 @@ -55,7 +55,7 @@ .\" ======================================================================== .\" .IX Title "DLLTOOL 1" -.TH DLLTOOL 1 2024-10-15 binutils-2.16.91 "GNU Development Tools" +.TH DLLTOOL 1 2024-10-16 binutils-2.16.91 "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/src/binutils/doc/elfedit.1 b/src/binutils/doc/elfedit.1 index eaabe0a83..869464d34 100644 --- a/src/binutils/doc/elfedit.1 +++ b/src/binutils/doc/elfedit.1 @@ -55,7 +55,7 @@ .\" ======================================================================== .\" .IX Title "ELFEDIT 1" -.TH ELFEDIT 1 2024-10-15 binutils-2.16.91 "GNU Development Tools" +.TH ELFEDIT 1 2024-10-16 binutils-2.16.91 "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/src/binutils/doc/nlmconv.1 b/src/binutils/doc/nlmconv.1 index b5bb88193..6c2087f8c 100644 --- a/src/binutils/doc/nlmconv.1 +++ b/src/binutils/doc/nlmconv.1 @@ -55,7 +55,7 @@ .\" ======================================================================== .\" .IX Title "NLMCONV 1" -.TH NLMCONV 1 2024-10-15 binutils-2.16.91 "GNU Development Tools" +.TH NLMCONV 1 2024-10-16 binutils-2.16.91 "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/src/binutils/doc/nm.1 b/src/binutils/doc/nm.1 index 0bc44c519..c2663c6d1 100644 --- a/src/binutils/doc/nm.1 +++ b/src/binutils/doc/nm.1 @@ -55,7 +55,7 @@ .\" ======================================================================== .\" .IX Title "NM 1" -.TH NM 1 2024-10-15 binutils-2.16.91 "GNU Development Tools" +.TH NM 1 2024-10-16 binutils-2.16.91 "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/src/binutils/doc/objcopy.1 b/src/binutils/doc/objcopy.1 index 246cb4545..4a19edcfc 100644 --- a/src/binutils/doc/objcopy.1 +++ b/src/binutils/doc/objcopy.1 @@ -55,7 +55,7 @@ .\" ======================================================================== .\" .IX Title "OBJCOPY 1" -.TH OBJCOPY 1 2024-10-15 binutils-2.16.91 "GNU Development Tools" +.TH OBJCOPY 1 2024-10-16 binutils-2.16.91 "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/src/binutils/doc/objdump.1 b/src/binutils/doc/objdump.1 index 4ba1bb82a..30c9eebf5 100644 --- a/src/binutils/doc/objdump.1 +++ b/src/binutils/doc/objdump.1 @@ -55,7 +55,7 @@ .\" ======================================================================== .\" .IX Title "OBJDUMP 1" -.TH OBJDUMP 1 2024-10-15 binutils-2.16.91 "GNU Development Tools" +.TH OBJDUMP 1 2024-10-16 binutils-2.16.91 "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/src/binutils/doc/ranlib.1 b/src/binutils/doc/ranlib.1 index c387016a7..d9d205c82 100644 --- a/src/binutils/doc/ranlib.1 +++ b/src/binutils/doc/ranlib.1 @@ -55,7 +55,7 @@ .\" ======================================================================== .\" .IX Title "RANLIB 1" -.TH RANLIB 1 2024-10-15 binutils-2.16.91 "GNU Development Tools" +.TH RANLIB 1 2024-10-16 binutils-2.16.91 "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/src/binutils/doc/readelf.1 b/src/binutils/doc/readelf.1 index 6c7b3f472..751a963c3 100644 --- a/src/binutils/doc/readelf.1 +++ b/src/binutils/doc/readelf.1 @@ -55,7 +55,7 @@ .\" ======================================================================== .\" .IX Title "READELF 1" -.TH READELF 1 2024-10-15 binutils-2.16.91 "GNU Development Tools" +.TH READELF 1 2024-10-16 binutils-2.16.91 "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/src/binutils/doc/size.1 b/src/binutils/doc/size.1 index e88ab4cfd..8a1c10fd0 100644 --- a/src/binutils/doc/size.1 +++ b/src/binutils/doc/size.1 @@ -55,7 +55,7 @@ .\" ======================================================================== .\" .IX Title "SIZE 1" -.TH SIZE 1 2024-10-15 binutils-2.16.91 "GNU Development Tools" +.TH SIZE 1 2024-10-16 binutils-2.16.91 "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/src/binutils/doc/strings.1 b/src/binutils/doc/strings.1 index a447f320d..7cbfde452 100644 --- a/src/binutils/doc/strings.1 +++ b/src/binutils/doc/strings.1 @@ -55,7 +55,7 @@ .\" ======================================================================== .\" .IX Title "STRINGS 1" -.TH STRINGS 1 2024-10-15 binutils-2.16.91 "GNU Development Tools" +.TH STRINGS 1 2024-10-16 binutils-2.16.91 "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/src/binutils/doc/strip.1 b/src/binutils/doc/strip.1 index a3f2b48f1..ffea8d427 100644 --- a/src/binutils/doc/strip.1 +++ b/src/binutils/doc/strip.1 @@ -55,7 +55,7 @@ .\" ======================================================================== .\" .IX Title "STRIP 1" -.TH STRIP 1 2024-10-15 binutils-2.16.91 "GNU Development Tools" +.TH STRIP 1 2024-10-16 binutils-2.16.91 "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/src/binutils/doc/windmc.1 b/src/binutils/doc/windmc.1 index 683c6f393..468d60ffa 100644 --- a/src/binutils/doc/windmc.1 +++ b/src/binutils/doc/windmc.1 @@ -55,7 +55,7 @@ .\" ======================================================================== .\" .IX Title "WINDMC 1" -.TH WINDMC 1 2024-10-15 binutils-2.16.91 "GNU Development Tools" +.TH WINDMC 1 2024-10-16 binutils-2.16.91 "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/src/binutils/doc/windres.1 b/src/binutils/doc/windres.1 index f906b380e..fd9de1f9c 100644 --- a/src/binutils/doc/windres.1 +++ b/src/binutils/doc/windres.1 @@ -55,7 +55,7 @@ .\" ======================================================================== .\" .IX Title "WINDRES 1" -.TH WINDRES 1 2024-10-15 binutils-2.16.91 "GNU Development Tools" +.TH WINDRES 1 2024-10-16 binutils-2.16.91 "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/src/binutils/po/binutils.pot b/src/binutils/po/binutils.pot index 1600d981a..b269b8c47 100644 --- a/src/binutils/po/binutils.pot +++ b/src/binutils/po/binutils.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-25 04:40-0400\n" +"POT-Creation-Date: 2024-10-15 22:02-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/src/binutils/syslex_wrap.c b/src/binutils/syslex_wrap.c index 1839e16d3..41bed6254 100644 --- a/src/binutils/syslex_wrap.c +++ b/src/binutils/syslex_wrap.c @@ -44,6 +44,15 @@ # undef realloc #endif /* realloc */ +#if defined(__GNUC__) && (__GNUC__ >= 5) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif /* GCC 5+ */ + #include "syslex.c" +#if defined(__GNUC__) && (__GNUC__ >= 5) +# pragma GCC diagnostic pop +#endif /* GCC 5+ */ + /* End of syslex_wrap.c */ diff --git a/src/expect/configure b/src/expect/configure index 7c346c60b..a4d7609c7 100755 --- a/src/expect/configure +++ b/src/expect/configure @@ -4587,7 +4587,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_config_headers="$ac_config_headers expect_cf.h" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 @@ -7444,7 +7443,6 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if stty reads stdout" >&5 printf %s "checking if stty reads stdout... " >&6; } - # On some systems stty cannot be run in the background (svr4) or get it # wrong because they fail to complain (NeXT, mach), so do NOT attempt # the test on some systems. @@ -7655,7 +7653,6 @@ then : fi - # On a few systems, libm.a is the same as libc.a # Do NOT bother to test against Tcl and Tk libs, they always include -lm { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 diff --git a/src/expect/configure.ac b/src/expect/configure.ac index 9e1f7426f..2ebfdb225 100644 --- a/src/expect/configure.ac +++ b/src/expect/configure.ac @@ -57,7 +57,7 @@ if test -n "${HOST_ARCHITECTURE}"; then AC_SUBST([C_ARCHFLAGS]) fi -ACX_PROG_CC_WARNING_OPTS([-Wreturn-type -Wfatal-errors]) +ACX_PROG_CC_WARNING_OPTS([-Wreturn-type -Wfatal-errors])dnl AC_CONFIG_HEADERS([expect_cf.h])dnl @@ -270,7 +270,7 @@ else iunix=0 fi -AC_MSG_CHECKING([if stty reads stdout]) +AC_MSG_CHECKING([if stty reads stdout])dnl # On some systems stty cannot be run in the background (svr4) or get it # wrong because they fail to complain (NeXT, mach), so do NOT attempt @@ -340,7 +340,7 @@ fi # Check for a regex library: AC_SEARCH_LIBS([regcomp],[iberty regex gregex gnuregex rx grx gnurx gnu c]) -AC_SEARCH_LIBS([regexec],[iberty regex gregex gnuregex rx grx gnurx gnu c]) +AC_SEARCH_LIBS([regexec],[iberty regex gregex gnuregex rx grx gnurx gnu c])dnl # On a few systems, libm.a is the same as libc.a # Do NOT bother to test against Tcl and Tk libs, they always include -lm diff --git a/src/gdb/defs.h b/src/gdb/defs.h index cd8a94f0d..9e6fa2027 100644 --- a/src/gdb/defs.h +++ b/src/gdb/defs.h @@ -1937,6 +1937,9 @@ extern struct cleanup *start_timer(int *timer_var, const char *timer_name, /* for similar reasons, such as libiberty also providing replacements: */ # pragma GCC poison strndup memdup vsprintf vasprintf # ifndef strerror +# ifndef DEFS_H_POISONING_STRERROR_TOO +# define DEFS_H_POISONING_STRERROR_TOO 1 +# endif /* !DEFS_H_POISONING_STRERROR_TOO */ # pragma GCC poison strerror # endif /* !strerror */ /* also consider poisoining for similar reasons: asprintf atexit exit */ diff --git a/src/gdb/gdb_string.h b/src/gdb/gdb_string.h index a9f0909ec..c6cbaa1ac 100644 --- a/src/gdb/gdb_string.h +++ b/src/gdb/gdb_string.h @@ -61,9 +61,10 @@ extern int memcmp(); #endif /* STDC_HEADERS */ #if !HAVE_DECL_STRERROR -# if !defined(DEFS_H_DOING_POISONING) && !defined(strerror) +# if !defined(DEFS_H_DOING_POISONING) && \ + !defined(DEFS_H_POISONING_STRERROR_TOO) && !defined(strerror) extern char *strerror(int); /* X3.159-1989 4.11.6.2 */ -# endif /* !DEFS_H_DOING_POISONING && !strerror */ +# endif /* !DEFS_H_DOING_POISONING && !DEFS_H_POISONING_STRERROR_TOO && !strerror */ #endif /* !HAVE_DECL_STRERROR */ #if !HAVE_DECL_STRSTR diff --git a/src/intl/config.h.in b/src/intl/config.h.in index ca1643ada..e27bd925d 100644 --- a/src/intl/config.h.in +++ b/src/intl/config.h.in @@ -318,6 +318,9 @@ /* Define to 1 if you have the 'system' function. */ #undef HAVE_SYSTEM +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MALLOC_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAN_H @@ -336,6 +339,9 @@ /* Define if you have the 'uintmax_t' type in or . */ #undef HAVE_UINTMAX_T +/* Define to 1 if you have the header file. */ +#undef HAVE_UNICONV_H + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H diff --git a/src/intl/configure b/src/intl/configure index 673adbb07..05693e6c7 100755 --- a/src/intl/configure +++ b/src/intl/configure @@ -20483,6 +20483,12 @@ if test "x$ac_cv_header_stdio_h" = xyes then : printf "%s\n" "#define HAVE_STDIO_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "sys/malloc.h" "ac_cv_header_sys_malloc_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_malloc_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_MALLOC_H 1" >>confdefs.h + fi ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" if test "x$ac_cv_header_sys_mman_h" = xyes @@ -20495,6 +20501,12 @@ if test "x$ac_cv_header_sys_param_h" = xyes then : printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "uniconv.h" "ac_cv_header_uniconv_h" "$ac_includes_default" +if test "x$ac_cv_header_uniconv_h" = xyes +then : + printf "%s\n" "#define HAVE_UNICONV_H 1" >>confdefs.h + fi ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" if test "x$ac_cv_header_wchar_h" = xyes @@ -21010,6 +21022,10 @@ ac_fn_c_check_type "$LINENO" "iconv_t" "ac_cv_type_iconv_t" " #else # ifdef HAVE_PHP_ICONV_H # include +# else +# ifdef HAVE_UNICONV_H +# include +# endif /* HAVE_UNICONV_H */ # endif /* HAVE_PHP_ICONV_H */ #endif /* HAVE_ICONV_H */ diff --git a/src/intl/configure.ac b/src/intl/configure.ac index f090b40f5..98422b6f7 100644 --- a/src/intl/configure.ac +++ b/src/intl/configure.ac @@ -173,7 +173,8 @@ AC_HEADER_STDBOOL dnl# also "_CHECK"s it AC_CHECK_HEADERS([argz.h bits/libc-lock.h byteswap.h ctype.h errno.h \ fcntl.h iconv.h io.h langinfo.h libintl.h limits.h locale.h \ malloc.h malloc/malloc.h nl_types.h php_iconv.h \ - stddef.h stdio.h sys/mman.h sys/param.h wchar.h])dnl + stddef.h stdio.h sys/malloc.h sys/mman.h sys/param.h \ + uniconv.h wchar.h])dnl AC_CHECK_HEADERS_ONCE([sys/types.h])dnl # Checks for typedefs, structures, and compiler characteristics. @@ -191,6 +192,10 @@ AC_CHECK_TYPES([iconv_t],[],[],[ #else # ifdef HAVE_PHP_ICONV_H # include +# else +# ifdef HAVE_UNICONV_H +# include +# endif /* HAVE_UNICONV_H */ # endif /* HAVE_PHP_ICONV_H */ #endif /* HAVE_ICONV_H */ ])dnl diff --git a/src/intl/dcigettext.c b/src/intl/dcigettext.c index 95bda4a24..1aa1e9d0e 100644 --- a/src/intl/dcigettext.c +++ b/src/intl/dcigettext.c @@ -100,6 +100,18 @@ extern int errno; #ifdef HAVE_ICONV_H # include +#else +# ifdef HAVE_PHP_ICONV_H +# include +# else +# ifdef HAVE_UNICONV_H +# include +# else +# if defined(__GNUC__) && !defined(__STRICT_ANSI__) +# warning "dcigettext.c expects an iconv-related header to be included." +# endif /* __GNUC__ && !__STRICT_ANSI__ */ +# endif /* HAVE_UNICONV_H */ +# endif /* HAVE_PHP_ICONV_H */ #endif /* HAVE_ICONV_H */ #include "gettextP.h" @@ -889,8 +901,12 @@ _nl_find_msg(struct loaded_l10nfile *domain_file, # ifdef _LIBC # define CONV_TYPE __gconv_t # else -# if HAVE_ICONV -# define CONV_TYPE iconv_t +# if defined(HAVE_ICONV) && HAVE_ICONV +# if defined(HAVE_ICONV_T) || defined(_ICONV_T) +# define CONV_TYPE iconv_t +# else +# define CONV_TYPE void * +# endif /* HAVE_ICONV_T || _ICONV_T */ # else # define CONV_TYPE int # if defined(__GNUC__) && !defined(__STRICT_ANSI__) @@ -974,7 +990,7 @@ _nl_find_msg(struct loaded_l10nfile *domain_file, inbuf = result; # else -# if HAVE_ICONV +# if defined(HAVE_ICONV) && HAVE_ICONV const char *inptr = (const char *)inbuf; size_t inleft = resultlen; char *outptr = (char *)outbuf; diff --git a/src/intl/gettextP.h b/src/intl/gettextP.h index 042287f38..f1022b6ff 100644 --- a/src/intl/gettextP.h +++ b/src/intl/gettextP.h @@ -34,6 +34,10 @@ # else # if defined(HAVE_PHP_ICONV_H) # include +# else +# if defined(HAVE_UNICONV_H) +# include +# endif /* HAVE_UNICONV_H */ # endif /* HAVE_PHP_ICONV_H */ # endif /* HAVE_ICONV_H && HAVE_ICONV */ #endif /* _LIBC */ diff --git a/src/intl/l10nflist.c b/src/intl/l10nflist.c index 4b17137d2..9508f6002 100644 --- a/src/intl/l10nflist.c +++ b/src/intl/l10nflist.c @@ -69,9 +69,13 @@ # ifdef HAVE_MALLOC_MALLOC_H # include # else -# if defined(__GNUC__) && !defined(__STRICT_ANSI__) -# warning "l10nflist.c expects a malloc-related header to be included." -# endif /* __GNUC__ && !__STRICT_ANSI__ */ +# ifdef HAVE_SYS_MALLOC_H +# include +# else +# if defined(__GNUC__) && !defined(__STRICT_ANSI__) +# warning "l10nflist.c expects a malloc-related header to be included." +# endif /* __GNUC__ && !__STRICT_ANSI__ */ +# endif /* HAVE_SYS_MALLOC_H */ # endif /* HAVE_MALLOC_MALLOC_H */ #endif /* HAVE_MALLOC_H */ #ifdef HAVE_SYS_TYPES_H diff --git a/src/intl/loadmsgcat.c b/src/intl/loadmsgcat.c index 40e4915ab..715a714ba 100644 --- a/src/intl/loadmsgcat.c +++ b/src/intl/loadmsgcat.c @@ -37,9 +37,13 @@ # ifdef HAVE_MALLOC_MALLOC_H # include # else -# if defined(__GNUC__) && !defined(__STRICT_ANSI__) -# warning "loadmsgcat.c expects a malloc-related header to be included." -# endif /* __GNUC__ && !__STRICT_ANSI__ */ +# ifdef HAVE_SYS_MALLOC_H +# include +# else +# if defined(__GNUC__) && !defined(__STRICT_ANSI__) +# warning "loadmsgcat.c expects a malloc-related header to be included." +# endif /* __GNUC__ && !__STRICT_ANSI__ */ +# endif /* HAVE_SYS_MALLOC_H */ # endif /* HAVE_MALLOC_MALLOC_H */ #endif /* HAVE_MALLOC_H */ #ifdef HAVE_SYS_TYPES_H