Re: HAVE_LC_MESSAGES
* Sam Steingold f...@tah.bet [2011-07-14 17:57:10 -0400]: * Bruno Haible oe...@pyvfc.bet [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.
Re: HAVE_LC_MESSAGES
Sam Steingold wrote: also, can I now remove gt_LC_MESSAGES from configure.in? If HAVE_LC_MESSAGES is nowhere used any more, then yes, you can remove the invocation of gt_LC_MESSAGES. Bruno -- In memoriam Paul Schneider http://en.wikipedia.org/wiki/Paul_Schneider_(pastor)
Re: HAVE_LC_MESSAGES
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). I think you can remove the #if because all Unix platforms nowadays have LC_MESSAGES. Bruno -- In memoriam The men and boys of Srebenica http://en.wikipedia.org/wiki/Srebrenica_massacre
Re: HAVE_LC_MESSAGES
* Bruno Haible oe...@pyvfc.bet [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? -- Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 11.0.60900031 http://honestreporting.com http://openvotingconsortium.org http://memri.org http://jihadwatch.org http://truepeace.org http://palestinefacts.org Oral sex was invented by mermaids.
Re: HAVE_LC_MESSAGES
Hi, Sam Steingold wrote: What's the point of HAVE_LC_MESSAGES? The point is to tell whether LC_MESSAGES is supported by the system, or is a fake one defined by libintl or gnulib. See doc/posix-headers/locale.texi: Portability problems fixed by Gnulib: @itemize @item The definition of @samp{LC_MESSAGES} is missing on some platforms: mingw. ... Note that gnulib also overrides setlocale(), so that the fake LC_MESSAGES locale category actually becomes functional. However, how is #if HAVE_LC_MESSAGES setlocale(LC_MESSAGES,); #endif better than #ifdef LC_MESSAGES setlocale(LC_MESSAGES,); #endif ?? This #if or #ifdef is outdated. The gettext manual [1] explains why. Bruno [1] http://www.gnu.org/software/gettext/manual/html_node/Triggering.html -- In memoriam Kurt Huber http://en.wikipedia.org/wiki/Kurt_Huber
Re: HAVE_LC_MESSAGES
Hi, * Bruno Haible oe...@pyvfc.bet [2011-07-13 21:12:49 +0200]: Sam Steingold wrote: What's the point of HAVE_LC_MESSAGES? The point is to tell whether LC_MESSAGES is supported by the system, or is a fake one defined by libintl or gnulib. does clisp need to know the difference? This #if or #ifdef is outdated. The gettext manual [1] explains why. [1] http://www.gnu.org/software/gettext/manual/html_node/Triggering.html are you suggesting that clisp should import the locale gnulib module instead? -- Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 11.0.60900031 http://truepeace.org http://jihadwatch.org http://honestreporting.com http://ffii.org http://pmw.org.il http://palestinefacts.org http://iris.org.il Oral sex was invented by mermaids.
Re: HAVE_LC_MESSAGES
Sam Steingold wrote: does clisp need to know the difference? This #if or #ifdef is outdated. The gettext manual [1] explains why. [1] http://www.gnu.org/software/gettext/manual/html_node/Triggering.html The gettext manual answers this question. are you suggesting that clisp should import the locale gnulib module instead? No, this is not needed: gettext's libintl.h already defines LC_MESSAGES when needed, and clisp uses libintl.h. Bruno -- In memoriam Kurt Huber http://en.wikipedia.org/wiki/Kurt_Huber
Re: HAVE_LC_MESSAGES
* Bruno Haible oe...@pyvfc.bet [2011-07-13 22:44:49 +0200]: Sam Steingold wrote: does clisp need to know the difference? This #if or #ifdef is outdated. The gettext manual [1] explains why. [1] http://www.gnu.org/software/gettext/manual/html_node/Triggering.html The gettext manual answers this question. Sorry, I need more help here. I read the page and I see no answer to the question: Does clisp need to know whether LC_MESSAGES is supported by the system, or is a fake one defined by libintl or gnulib. Please remember that I am an English-only bigot who believes that all i18n/l12n efforts are a waste of time :-) so I know very little about gettext et al and I wish I knew even less. are you suggesting that clisp should import the locale gnulib module instead? 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. -- Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 11.0.60900031 http://memri.org http://iris.org.il http://www.PetitionOnline.com/tap12009/ http://thereligionofpeace.com http://truepeace.org http://dhimmi.com If at first you don't suck seed, try and suck another seed.