summaryrefslogtreecommitdiff
path: root/m4/iconv.m4
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2015-10-25 10:49:41 +0000
committerAndy Wingo <wingo@pobox.com>2015-10-25 10:55:14 +0000
commit95ac2204d9084a01677fff9eb2669c495bd07d3d (patch)
treeb603eaaf67caaab75489478ab51605a70be006fa /m4/iconv.m4
parent1c9e23c0901363ff24c1dc4e085e7ed68cb81e6d (diff)
downloadguile-95ac2204d9084a01677fff9eb2669c495bd07d3d.tar.gz
Revert "Update Gnulib to v0.1-603-g1d16a7b"
This reverts commit 2d4da30fdefbcdb065d4b1f48f2a77d06f69e3c3. This Gnulib update was causing failures related to timezones in stime.c. I tried to fix it by adopting the time_rz module from gnulib but that then caused other failures. We can try again later.
Diffstat (limited to 'm4/iconv.m4')
-rw-r--r--m4/iconv.m461
1 files changed, 29 insertions, 32 deletions
diff --git a/m4/iconv.m4 b/m4/iconv.m4
index 4e3736315..4b29c5f2c 100644
--- a/m4/iconv.m4
+++ b/m4/iconv.m4
@@ -1,4 +1,4 @@
-# iconv.m4 serial 19 (gettext-0.18.2)
+# iconv.m4 serial 18 (gettext-0.18.2)
dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -72,33 +72,27 @@ AC_DEFUN([AM_ICONV_LINK],
if test $am_cv_lib_iconv = yes; then
LIBS="$LIBS $LIBICONV"
fi
- am_cv_func_iconv_works=no
- for ac_iconv_const in '' 'const'; do
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
#include <iconv.h>
#include <string.h>
-
-#ifndef ICONV_CONST
-# define ICONV_CONST $ac_iconv_const
-#endif
- ]],
- [[int result = 0;
+int main ()
+{
+ int result = 0;
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
returns. */
{
iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
if (cd_utf8_to_88591 != (iconv_t)(-1))
{
- static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
char buf[10];
- ICONV_CONST char *inptr = input;
+ const char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_utf8_to_88591,
- &inptr, &inbytesleft,
+ (char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res == 0)
result |= 1;
@@ -111,14 +105,14 @@ AC_DEFUN([AM_ICONV_LINK],
iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
if (cd_ascii_to_88591 != (iconv_t)(-1))
{
- static ICONV_CONST char input[] = "\263";
+ static const char input[] = "\263";
char buf[10];
- ICONV_CONST char *inptr = input;
+ const char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_ascii_to_88591,
- &inptr, &inbytesleft,
+ (char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res == 0)
result |= 2;
@@ -130,14 +124,14 @@ AC_DEFUN([AM_ICONV_LINK],
iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
if (cd_88591_to_utf8 != (iconv_t)(-1))
{
- static ICONV_CONST char input[] = "\304";
+ static const char input[] = "\304";
static char buf[2] = { (char)0xDE, (char)0xAD };
- ICONV_CONST char *inptr = input;
+ const char *inptr = input;
size_t inbytesleft = 1;
char *outptr = buf;
size_t outbytesleft = 1;
size_t res = iconv (cd_88591_to_utf8,
- &inptr, &inbytesleft,
+ (char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
result |= 4;
@@ -150,14 +144,14 @@ AC_DEFUN([AM_ICONV_LINK],
iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
if (cd_88591_to_utf8 != (iconv_t)(-1))
{
- static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
char buf[50];
- ICONV_CONST char *inptr = input;
+ const char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_88591_to_utf8,
- &inptr, &inbytesleft,
+ (char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if ((int)res > 0)
result |= 8;
@@ -177,14 +171,17 @@ AC_DEFUN([AM_ICONV_LINK],
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
result |= 16;
return result;
-]])],
- [am_cv_func_iconv_works=yes], ,
- [case "$host_os" in
- aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
- *) am_cv_func_iconv_works="guessing yes" ;;
- esac])
- test "$am_cv_func_iconv_works" = no || break
- done
+}]])],
+ [am_cv_func_iconv_works=yes],
+ [am_cv_func_iconv_works=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac
+changequote([,])dnl
+ ])
LIBS="$am_save_LIBS"
])
case "$am_cv_func_iconv_works" in