bugGNU gettext - Bugs: bug #38162, libintl_setlocale() caches...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #38162: libintl_setlocale() caches settings under Mac OS X

Submitted by:  Guido Flohr <gflohr>
Submitted on:  Thu 24 Jan 2013 02:35:11 PM UTC  
 
Category:  End-user / runtime Severity:  3 - Normal
Item Group:  None Status:  In Progress
Privacy:  Public Assigned to:  Daiki Ueno <ueno>
Open/Closed:  Open

( Jump to the original submission)

Sun 16 Sep 2018 05:32:45 PM UTC, comment #7:

The commit at http://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=a65a37654252fd3f958aa414e42f625a55868b90 is incomplete:

1) While being necessary on all platforms except glibc, it is enabled only on macOS, native Windows, and Cygwin (see the declaration in libgnuintl.in.h).

2) The code not enabled in packages that use Gnulib's 'setlocale' module, because Gnulib does not contain the "++_nl_msg_cat_cntr;" changes and libgnuintl.in.h refrains from overriding the Gnulib version.

3) Some documentation ought to be added, in gettext.texi, at the end of node 'Triggering'.

Bruno Haible <haible>
Project Administrator
Tue 25 Jun 2013 12:23:17 PM UTC, comment #6:

Worked here as well.

Guido Flohr <gflohr>
Project Member
Tue 25 Jun 2013 07:42:31 AM UTC, comment #5:

Anyway, pushed a bit modified version. I did some testing on Mac OS X and it seems to work so far.

http://git.savannah.gnu.org/cgit/gettext.git/commit/?h=maint&id=a65a37654252fd3f958aa414e42f625a55868b90

Daiki Ueno <ueno>
Project AdministratorIn charge of this item.
Thu 07 Mar 2013 08:32:48 AM UTC, comment #4:

Sorry, I don't have a Mac at hand and won't be able to test the fix.

Guido Flohr <gflohr>
Project Member
Wed 06 Mar 2013 05:13:55 AM UTC, comment #3:

https://lists.gnu.org/archive/html/bug-gettext/2013-03/msg00039.html

Daiki Ueno <ueno>
Project AdministratorIn charge of this item.
Tue 05 Mar 2013 11:37:56 PM UTC, comment #2:

Sorry for the delay. I could reproduce this with both 0.18.2.1 and 0.18.1.1.

Daiki Ueno <ueno>
Project AdministratorIn charge of this item.
Thu 24 Jan 2013 02:39:36 PM UTC, comment #1:

Just for the records: You may have to change the directory in the call to bindtextdomain().

Guido Flohr <gflohr>
Project Member
Thu 24 Jan 2013 02:35:11 PM UTC, original submission:

When I compile the attached C file under Linux and link against glibc 2.15 it behaves as expected. It first prints the message in German, then in English:

linux $ ./setlocale-cache-bug
de_DE.UTF-8
German: Unbekannter Systemfehler
C
POSIX/C: Unknown system error

The same under Mac OS X with GNU gettext 0.18.2 (from mac ports) produces German output both times:

mac $ ./setlocale-cache-bug
de_DE.UTF-8
German: Unbekannter Systemfehler
de_DE.UTF-8
POSIX/C: Unbekannter Systemfehler

setlocale() is really libintl_setlocale() on that Mac. When I place an "#undef setlocale" into main() and compile again, I get this:

mac $ ./setlocale-cache-bug
de_DE.UTF-8
German: Unbekannter Systemfehler
C/UTF-8/C/C/C/C
POSIX/C: Unbekannter Systemfehler

Guido Flohr <gflohr>
Project Member

 

Attached Files
file #27325:  setlocale-cache-bug.c added by gflohr (786B - text/x-csrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Updated the item)
  • -email is unavailable- added by ueno (Posted a comment)
  • -email is unavailable- added by gflohr (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-09-16 haible StatusFixed => In Progress
        Open/ClosedClosed => Open
    2016-11-27 haible CategoryNone => End-user / runtime
    2013-06-25 ueno StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2013-03-06 ueno StatusConfirmed => Ready For Test
    2013-03-05 ueno StatusNone => Confirmed
        Assigned toNone => ueno
    2013-01-24 gflohr Attached File- => Added setlocale-cache-bug.c, #27325

    Back to the top


    Powered by Savane 3.3