From fcbf63e62c627deae76c1b8cb8c0876c536ed811 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Mon, 16 Mar 2020 18:49:26 +0900 Subject: Fresh start --- jni/iconv/m4/eilseq.m4 | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 jni/iconv/m4/eilseq.m4 (limited to 'jni/iconv/m4/eilseq.m4') diff --git a/jni/iconv/m4/eilseq.m4 b/jni/iconv/m4/eilseq.m4 new file mode 100644 index 0000000..792d514 --- /dev/null +++ b/jni/iconv/m4/eilseq.m4 @@ -0,0 +1,67 @@ +#serial 1 + +AC_PREREQ(2.50) + +# The EILSEQ errno value ought to be defined in , according to +# ISO C 99 and POSIX. But some systems (like SunOS 4) don't define it, +# and some systems (like BSD/OS) define it in not . + +# Define EILSEQ as a C macro and as a substituted macro in such a way that +# 1. on all systems, after inclusion of , EILSEQ is usable, +# 2. on systems where EILSEQ is defined elsewhere, we use the same numeric +# value. + +AC_DEFUN([AC_EILSEQ], +[ + AC_REQUIRE([AC_PROG_CC])dnl + + dnl Check for any extra headers that could define EILSEQ. + AC_CHECK_HEADERS(wchar.h) + + AC_CACHE_CHECK([for EILSEQ], ac_cv_decl_EILSEQ, [ + AC_EGREP_CPP(yes,[ +#include +#ifdef EILSEQ +yes +#endif + ], have_eilseq=1) + if test -n "$have_eilseq"; then + dnl EILSEQ exists in . Don't need to define EILSEQ ourselves. + ac_cv_decl_EILSEQ=yes + else + AC_EGREP_CPP(yes,[ +#include +#if HAVE_WCHAR_H +#include +#endif +#ifdef EILSEQ +yes +#endif + ], have_eilseq=1) + if test -n "$have_eilseq"; then + dnl EILSEQ exists in some other system header. + dnl Define it to the same value. + _AC_COMPUTE_INT([EILSEQ], ac_cv_decl_EILSEQ, [ +#include +#if HAVE_WCHAR_H +#include +#endif +/* The following two lines are a workaround against an autoconf-2.52 bug. */ +#include +#include +]) + else + dnl EILSEQ isn't defined by the system. Define EILSEQ ourselves, but + dnl don't define it as EINVAL, because iconv() callers want to + dnl distinguish EINVAL and EILSEQ. + ac_cv_decl_EILSEQ=ENOENT + fi + fi + ]) + if test "$ac_cv_decl_EILSEQ" != yes; then + AC_DEFINE_UNQUOTED([EILSEQ], [$ac_cv_decl_EILSEQ], + [Define as good substitute value for EILSEQ.]) + EILSEQ="$ac_cv_decl_EILSEQ" + AC_SUBST(EILSEQ) + fi +]) -- cgit v1.2.3