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

 
 

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: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Daiki Ueno <ueno>
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 25 Jun 2013 12:23:17 PM UTC, comment #6:

Worked here as well.

Guido Flohr <gflohr>
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>
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>
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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

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
  • -unavailable- added by ueno (Posted a comment)
  • -unavailable- added by gflohr (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 25 Jun 2013 07:42:31 AM UTCuenoStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Wed 06 Mar 2013 05:13:55 AM UTCuenoStatusConfirmed=>Ready For Test
    Tue 05 Mar 2013 11:37:56 PM UTCuenoStatusNone=>Confirmed
      Assigned toNone=>ueno
    Thu 24 Jan 2013 02:35:11 PM UTCgflohrAttached File-=>Added setlocale-cache-bug.c, #27325

    Back to the top


    Powered by Savane 3.1-cleanup