bugGNU gettext - Bugs: bug #50595, libintl.h: declare newlocale when...

 
 

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

bug #50595: libintl.h: declare newlocale when requested by feature macros only

Submitter:  Michael Haubenwallner <haubi>
Submitted:  Mon 20 Mar 2017 01:53:15 PM UTC
   
 
Category:  Programmer interface Severity:  3 - Normal
Item Group:  None Status:  Fix Released
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Thu 09 May 2019 07:27:53 PM UTC, comment #2: 

The fix is contained in the gettext-0.20 release.

Bruno Haible <haible>
Group administrator
Mon 20 Mar 2017 09:39:57 PM UTC, comment #1: 
Bruno Haible <haible>
Group administrator
Mon 20 Mar 2017 01:53:15 PM UTC, original submission:  

Cygwin does provide newlocale function, thus @HAVE_NEWLOCALE@ = 1.

But <locale.h> does declare locale_t only if selected by feature macros, causing this compiler error when using libintl.h with -std=c90:

<code>
$ x86_64-pc-cygwin-gcc -std=c90 -O2 -pipe -O2 -pipe -I./subversion/include -I./subversion -I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/include/serf-1 -c subversion/libsvn_delta/compat.c  -DDLL_EXPORT -DPIC -o subversion/libsvn_delta/.libs/compat.o
In file included from ./subversion/svn_private_config.h:255:0,
                 from subversion/libsvn_delta/compat.c:36:
/usr/include/libintl.h:440:8: error: unknown type name 'locale_t'
 extern locale_t newlocale (int, const char *, locale_t);
        ^
/usr/include/libintl.h:440:47: error: unknown type name 'locale_t'
 extern locale_t newlocale (int, const char *, locale_t);
                                               ^
</code>

Michael Haubenwallner <haubi>

 

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-04 haible StatusFixed Fix Released
    2017-03-20 haible CategoryC Programmer interface
        StatusNone Fixed
        Assigned toNone haible
        Open/ClosedOpen Closed
    2017-03-20 haubi Attached File- Added 0001-libintl.h-expose-newlocale-when-requested-only.patch, #40037

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code