[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HAVE_LC_MESSAGES
From: |
Sam Steingold |
Subject: |
Re: HAVE_LC_MESSAGES |
Date: |
Tue, 19 Jul 2011 11:55:38 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> * Sam Steingold <address@hidden> [2011-07-14 17:57:10 -0400]:
>
>> * Bruno Haible <address@hidden> [2011-07-14 23:18:41 +0200]:
>>
>> Sam Steingold asked:
>>> Does clisp need to know whether LC_MESSAGES is supported by the system,
>>> or is a fake one defined by libintl or gnulib.
>>> ...
>>> > No, this is not needed: gettext's libintl.h already defines LC_MESSAGES
>>> > when
>>> > needed, and clisp uses libintl.h.
>>>
>>> CLISP includes libintl.h only if ENABLE_NLS is defined (i.e., when
>>> gettext is present).
>>> It uses HAVE_LC_MESSAGES in spvw_ctype.d:init_ctype which is called
>>> unconditionally in spvw.d.
>>> I.e., on platforms without gettext where LC_MESSAGES is not defined
>>> init_ctype is still called and its call
>>>
>>> setlocale(LC_MESSAGES,"");
>>>
>>> must be guarded by either "#if HAVE_LC_MESSAGES" or "#ifdef LC_MESSAGES".
>>
>> By looking at the clisp code history:
>> $ hg annotate -r 11858 spvw_ctype.d
>> $ hg diff -r 3562 -r 3563
>> I think the point was to allow the setlocale() call to be enabled even on
>> platforms where <locale.h> does not have LC_MESSAGES (namely, native
>> Windows).
>> The macro HAVE_LC_MESSAGES means
>> - on Unix platforms, that LC_MESSAGES was found in <locale.h>,
>> - on Windows platforms, that gettext is in use (always).
>
> what are the benefits of this very complex approach (autoconf, win32 &c &c)
> over a simple "ifdef LC_MESSAGES"?
>
>> I think you can remove the #if because all Unix platforms nowadays have
>> LC_MESSAGES.
>
> what about windows without gettext?
also, can I now remove gt_LC_MESSAGES from configure.in?
--
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X
11.0.60900031
http://www.memritv.org http://openvotingconsortium.org
http://truepeace.org http://iris.org.il http://camera.org http://ffii.org
If at first you don't suck seed, try and suck another seed.
- HAVE_LC_MESSAGES, Sam Steingold, 2011/07/13
- Re: HAVE_LC_MESSAGES, Bruno Haible, 2011/07/13
- Re: HAVE_LC_MESSAGES, Sam Steingold, 2011/07/13
- Re: HAVE_LC_MESSAGES, Bruno Haible, 2011/07/13
- Re: HAVE_LC_MESSAGES, Sam Steingold, 2011/07/13
- Re: HAVE_LC_MESSAGES, Bruno Haible, 2011/07/14
- Re: HAVE_LC_MESSAGES, Sam Steingold, 2011/07/14
- Re: HAVE_LC_MESSAGES,
Sam Steingold <=
- Re: HAVE_LC_MESSAGES, Bruno Haible, 2011/07/19