Skip to content

Commit

Permalink
now up to intl/relocatable.c
Browse files Browse the repository at this point in the history
Change-Id: I0b5c58bcd83f2be3216800f5a0be6b495105cc92
  • Loading branch information
cooljeanius committed Oct 16, 2024
1 parent d22e2d5 commit dc8f1e4
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/intl/config.h.in

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/intl/configure
Original file line number Diff line number Diff line change
Expand Up @@ -20435,6 +20435,12 @@ if test "x$ac_cv_header_langinfo_h" = xyes
then :
printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "libiconv.h" "ac_cv_header_libiconv_h" "$ac_includes_default"
if test "x$ac_cv_header_libiconv_h" = xyes
then :
printf "%s\n" "#define HAVE_LIBICONV_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
if test "x$ac_cv_header_libintl_h" = xyes
Expand Down
7 changes: 4 additions & 3 deletions src/intl/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@ AC_HEADER_STAT
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 gcc/sys-types.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/malloc.h \
sys/mman.h sys/param.h uniconv.h wchar.h])dnl
libiconv.h libintl.h limits.h locale.h malloc.h \
malloc/malloc.h nl_types.h php_iconv.h 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.
Expand Down
26 changes: 24 additions & 2 deletions src/intl/relocatable.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
/* Specification: */
#include "relocatable.h"

#if !defined(__has_include)
# define __has_include(foo) 0
#endif /* !__has_include */

#if ENABLE_RELOCATABLE

# include <stddef.h>
Expand All @@ -47,11 +51,29 @@
# endif /* NO_XMALLOC */

# if (defined(DEPENDS_ON_LIBCHARSET) && DEPENDS_ON_LIBCHARSET) || \
defined(HAVE_LIBCHARSET_H)
defined(HAVE_LIBCHARSET_H) || __has_include(<libcharset.h>)
# include <libcharset.h>
# endif /* DEPENDS_ON_LIBCHARSET || HAVE_LIBCHARSET_H */
# if DEPENDS_ON_LIBICONV && (defined(HAVE_ICONV) && HAVE_ICONV)
# include <iconv.h>
# if defined(HAVE_ICONV_H) || __has_include(<iconv.h>)
# include <iconv.h>
# else
# if defined(HAVE_LIBICONV_H) || __has_include(<libiconv.h>)
# include <libiconv.h>
# else
# if defined(HAVE_PHP_ICONV_H) || __has_include(<php_iconv.h>)
# include <php_iconv.h>
# else
# if defined(HAVE_UNICONV_H) || __has_include(<uniconv.h>)
# include <uniconv.h>
# else
# if defined(__GNUC__) && !defined(__STRICT_ANSI__)
# warning "relocatable.c expects an iconv-related header to be included."
# endif /* __GNUC__ && !__STRICT_ANSI__ */
# endif /* HAVE_UNICONV_H */
# endif /* HAVE_PHP_ICONV_H */
# endif /* HAVE_LIBICONV_H */
# endif /* HAVE_ICONV_H */
# endif /* DEPENDS_ON_LIBICONV && HAVE_ICONV */
# if (defined(DEPENDS_ON_LIBINTL) && DEPENDS_ON_LIBINTL) && ENABLE_NLS
# include <libintl.h>
Expand Down

0 comments on commit dc8f1e4

Please sign in to comment.