[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error in make check / gettext 0.17
From: |
Bruno Haible |
Subject: |
Re: error in make check / gettext 0.17 |
Date: |
Fri, 26 Sep 2008 18:01:53 +0200 |
User-agent: |
KMail/1.5.4 |
Hello,
Rainer Tammer wrote:
> Hello,
> the msgunfmt-java-1 test fails.
>
> PASS: msgunfmt-2
> Skipping test: C# compiler not found
> SKIP: msgunfmt-csharp-1
> 9,11d8
> < msgid "Close"
> < msgstr "Proche"
> <
> 14a12,14
> >
> > msgid "Close"
> > msgstr "Proche"
> FAIL: msgunfmt-java-1
> PASS: msgunfmt-properties-1
Thanks for reporting this. Apparently the sorting results after "msgcat -s"
are platform dependent, because qsort is not mandated to do a stable sort.
I'm applying this workaround:
2008-09-26 Bruno Haible <address@hidden>
* write-catalog.c (cmp_by_msgid, cmp_by_filepos): Compare the msgctxt
fields if the msgid fields are the same.
Reported by Rainer Tammer <address@hidden>.
*** write-catalog.c 7 Nov 2007 11:44:43 -0000 1.5
--- write-catalog.c 26 Sep 2008 15:55:59 -0000
***************
*** 1,5 ****
/* GNU gettext - internationalization aids
! Copyright (C) 1995-1998, 2000-2007 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- 1,5 ----
/* GNU gettext - internationalization aids
! Copyright (C) 1995-1998, 2000-2008 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
***************
*** 332,341 ****
{
const message_ty *a = *(const message_ty **) va;
const message_ty *b = *(const message_ty **) vb;
! /* Because msgids normally contain only ASCII characters, it is OK to
! sort them as if we were in the C locale. And strcoll() in the C locale
! is the same as strcmp(). */
! return strcmp (a->msgid, b->msgid);
}
--- 332,353 ----
{
const message_ty *a = *(const message_ty **) va;
const message_ty *b = *(const message_ty **) vb;
!
! /* Because msgids normally contain only ASCII characters or are UTF-8
! encoded, it is OK to sort them as if we were in a C.UTF-8 locale. And
! strcoll() in a C.UTF-8 locale is the same as strcmp(). */
! int cmp = strcmp (a->msgid, b->msgid);
! if (cmp != 0)
! return cmp;
!
! /* If the msgids are equal, disambiguate by comparing the contexts. */
! if (a->msgctxt == b->msgctxt)
! return 0;
! if (a->msgctxt == NULL)
! return -1;
! if (b->msgctxt == NULL)
! return 1;
! return strcmp (a->msgctxt, b->msgctxt);
}
***************
*** 420,429 ****
return cmp;
/* If they are equal, compare on the msgid strings. */
! /* Because msgids normally contain only ASCII characters, it is OK to
! sort them as if we were in the C locale. And strcoll() in the C locale
! is the same as strcmp(). */
! return strcmp (a->msgid, b->msgid);
}
--- 432,452 ----
return cmp;
/* If they are equal, compare on the msgid strings. */
! /* Because msgids normally contain only ASCII characters or are UTF-8
! encoded, it is OK to sort them as if we were in a C.UTF-8 locale. And
! strcoll() in a C.UTF-8 locale is the same as strcmp(). */
! cmp = strcmp (a->msgid, b->msgid);
! if (cmp != 0)
! return cmp;
!
! /* If the msgids are equal, disambiguate by comparing the contexts. */
! if (a->msgctxt == b->msgctxt)
! return 0;
! if (a->msgctxt == NULL)
! return -1;
! if (b->msgctxt == NULL)
! return 1;
! return strcmp (a->msgctxt, b->msgctxt);
}