bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Subject: Re: Don't treat Apple's new Citrus/FreeBSD-based iconv like GNU libiconv
Date: Sat, 24 Feb 2024 14:01:19 +0100	[thread overview]
Message-ID: <5624055.88bMQJbFj6@nimes> (raw)
In-Reply-To: <22875863.Yz81rIOvuz@nimes>

On macOS 12.5, I'm seeing this test failure:

$ ./test-striconveha
../../tests/test-striconveha.c:426: assertion 'retval == 0' failed

Apparently the transliteration of /usr/lib/libiconv.2.dylib does
not work like the GNU libiconv one.
Either this is a copy of GNU libiconv 1.11 with modified transliteration,
or it's a backport of the bastard Apple iconv that they deploy on newer
macOS releases since fall 2023.

This patch avoids the failure.


2024-02-24  Bruno Haible  <bruno@clisp.org>

	striconveha tests: Avoid test failure on macOS 12.5.
	* tests/test-striconveha.c (main): Skip transliteration tests when using
	Apple's modified GNU libiconv or the bastard Apple iconv.

diff --git a/tests/test-striconveha.c b/tests/test-striconveha.c
index c401177e29..376f3cb603 100644
--- a/tests/test-striconveha.c
+++ b/tests/test-striconveha.c
@@ -406,7 +406,7 @@ main ()
     }
 # endif
 
-# if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) && !defined __UCLIBC__) || _LIBICONV_VERSION >= 0x0105
+# if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) && !defined __UCLIBC__) || (_LIBICONV_VERSION >= 0x0105 && !(_LIBICONV_VERSION == 0x10b && defined __APPLE__))
   /* Test conversion from UTF-8 to ISO-8859-1 with transliteration.  */
   for (h = 0; h < SIZEOF (handlers); h++)
     {
@@ -586,7 +586,7 @@ main ()
     }
 # endif
 
-# if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) && !defined __UCLIBC__) || _LIBICONV_VERSION >= 0x0105
+# if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) && !defined __UCLIBC__) || (_LIBICONV_VERSION >= 0x0105 && !(_LIBICONV_VERSION == 0x10b && defined __APPLE__))
   /* Test conversion from UTF-8 to ISO-8859-1 with transliteration.  */
   for (h = 0; h < SIZEOF (handlers); h++)
     {





      reply	other threads:[~2024-02-24 13:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-14 22:45 Don't treat Apple's new Citrus/FreeBSD-based iconv like GNU libiconv Bruno Haible
2024-02-24 13:01 ` Bruno Haible [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5624055.88bMQJbFj6@nimes \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).