Avoid test failures on OSF/1, AIX, HP-UX, IRIX, Solaris.
authorBruno Haible <bruno@clisp.org>
Sat, 31 Mar 2007 20:42:08 +0000 (20:42 +0000)
committerBruno Haible <bruno@clisp.org>
Sat, 31 Mar 2007 20:42:08 +0000 (20:42 +0000)
ChangeLog
tests/test-striconveha.c

index 014c590..87531f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-03-31  Bruno Haible  <bruno@clisp.org>
 
+       * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
+       work on Solaris either. Protect also second use of "autodetect_jp".
+
+2007-03-31  Bruno Haible  <bruno@clisp.org>
+
        * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
        the function is not present.
 
index 6717856..3d833ac 100644 (file)
@@ -312,7 +312,7 @@ main ()
     }
 
   /* autodetect_jp is only supported when iconv() support ISO-2022-JP-2.  */
-# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__)
+# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__ || defined __sun)
   /* Test conversions from autodetect_jp to UTF-8.  */
   for (h = 0; h < SIZEOF (handlers); h++)
     {
@@ -547,6 +547,8 @@ main ()
       free (result);
     }
 
+  /* autodetect_jp is only supported when iconv() support ISO-2022-JP-2.  */
+# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__ || defined __sun)
   /* Test conversions from autodetect_jp to UTF-8.  */
   for (h = 0; h < SIZEOF (handlers); h++)
     {
@@ -578,6 +580,7 @@ main ()
       ASSERT (strcmp (result, expected) == 0);
       free (result);
     }
+# endif
 
 # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 || _LIBICONV_VERSION >= 0x0105
   /* Test conversion from UTF-8 to ISO-8859-1 with transliteration.  */