This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=700f6cd86b939789e19fd325f3ad2862eac5975e The branch, stable-2.0 has been updated via 700f6cd86b939789e19fd325f3ad2862eac5975e (commit) via c84f25bccebb1ba557ace597370d88bc8f5382e6 (commit) from 82b8cfa40cbaea1ef2b8053af574c6d84f2705bc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 700f6cd86b939789e19fd325f3ad2862eac5975e Author: Ludovic Courtès <[email protected]> Date: Wed Jun 11 15:03:31 2014 +0200 i18n: Adjust tests for Windows. * test-suite/tests/i18n.test (mingw?): New variable. (%french-locale-name, %french-utf8-locale-name, %turkish-utf8-locale-name, %german-utf8-locale-name, %greek-utf8-locale-name): Add name of corresponding Windows codepage, when MINGW? is true. (under-turkish-utf8-locale-or-unresolved): Add exception for "mingw32". Co-authored-by: Eli Zaretskii <[email protected]> commit c84f25bccebb1ba557ace597370d88bc8f5382e6 Author: Ludovic Courtès <[email protected]> Date: Wed Jun 11 14:54:21 2014 +0200 i18n: Ignore LC_MESSAGES on MinGW. * libguile/locale-categories.h (MESSAGES): Add condition on !(defined(LC_MAX) && LC_MESSAGES > LC_MAX). * test-suite/tests/i18n.test ("locale objects")["make-locale (2 args, list)", "make-locale (3 args)", "locale?"]: Use LC_NUMERIC or LC_TIME instead of LC_MESSAGES. Co-authored-by: Eli Zaretskii <[email protected]> ----------------------------------------------------------------------- Summary of changes: libguile/locale-categories.h | 8 ++++-- test-suite/tests/i18n.test | 45 ++++++++++++++++++++++++++++------------- 2 files changed, 36 insertions(+), 17 deletions(-) diff --git a/libguile/locale-categories.h b/libguile/locale-categories.h index 26b030d..fb5ac10 100644 --- a/libguile/locale-categories.h +++ b/libguile/locale-categories.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006, 2008 Free Software Foundation, Inc. +/* Copyright (C) 2006, 2008, 2014 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -23,8 +23,10 @@ SCM_DEFINE_LOCALE_CATEGORY (COLLATE) SCM_DEFINE_LOCALE_CATEGORY (CTYPE) -#ifdef LC_MESSAGES -/* MinGW doesn't have `LC_MESSAGES'. */ +#if defined(LC_MESSAGES) && !(defined(LC_MAX) && LC_MESSAGES > LC_MAX) +/* MinGW doesn't have `LC_MESSAGES'. libintl.h might define + `LC_MESSAGES' for MinGW to an arbitrary large value which we cannot + use in a call to `setlocale'. */ SCM_DEFINE_LOCALE_CATEGORY (MESSAGES) #endif diff --git a/test-suite/tests/i18n.test b/test-suite/tests/i18n.test index b980cdc..c63e3ac 100644 --- a/test-suite/tests/i18n.test +++ b/test-suite/tests/i18n.test @@ -1,7 +1,7 @@ ;;;; i18n.test --- Exercise the i18n API. -*- coding: utf-8; mode: scheme; -*- ;;;; ;;;; Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012, -;;;; 2013 Free Software Foundation, Inc. +;;;; 2013, 2014 Free Software Foundation, Inc. ;;;; Ludovic Courtès ;;;; ;;;; This library is free software; you can redistribute it and/or @@ -38,18 +38,18 @@ (not (not (make-locale LC_ALL "C")))) (pass-if "make-locale (2 args, list)" - (not (not (make-locale (list LC_COLLATE LC_MESSAGES) "C")))) + (not (not (make-locale (list LC_COLLATE LC_NUMERIC) "C")))) (pass-if "make-locale (3 args)" (not (not (make-locale (list LC_COLLATE) "C" - (make-locale (list LC_MESSAGES) "C"))))) + (make-locale (list LC_NUMERIC) "C"))))) (pass-if-exception "make-locale with unknown locale" exception:locale-error (make-locale LC_ALL "does-not-exist")) (pass-if "locale?" (and (locale? (make-locale (list LC_ALL) "C")) - (locale? (make-locale (list LC_MESSAGES LC_NUMERIC) "C" + (locale? (make-locale (list LC_TIME LC_NUMERIC) "C" (make-locale (list LC_CTYPE) "C"))))) (pass-if "%global-locale" @@ -81,20 +81,36 @@ (make-locale (list LC_COLLATE) "C"))))) +(define mingw? + (string-contains %host-type "-mingw32")) + (define %french-locale-name - "fr_FR.ISO-8859-1") + (if mingw? + "fra_FRA.850" + "fr_FR.ISO-8859-1")) + +;; What we really want for the following locales is that they be Unicode +;; capable, not necessarily UTF-8, which Windows does not provide. (define %french-utf8-locale-name - "fr_FR.UTF-8") + (if mingw? + "fra_FRA.1252" + "fr_FR.UTF-8")) (define %turkish-utf8-locale-name - "tr_TR.UTF-8") + (if mingw? + "tur_TRK.1254" + "tr_TR.UTF-8")) (define %german-utf8-locale-name - "de_DE.UTF-8") + (if mingw? + "deu_DEU.1252" + "de_DE.UTF-8")) (define %greek-utf8-locale-name - "el_GR.UTF-8") + (if mingw? + "grc_ELL.1253" + "el_GR.UTF-8")) (define %american-english-locale-name "en_US") @@ -148,13 +164,14 @@ (under-locale-or-unresolved %french-utf8-locale thunk)) (define (under-turkish-utf8-locale-or-unresolved thunk) - ;; FreeBSD 8.2 and 9.1, Solaris 2.10, and Darwin 8.11.0 have a broken - ;; tr_TR locale where `i' is mapped to uppercase `I' instead of `İ', - ;; so disable tests on that platform. + ;; FreeBSD 8.2 and 9.1, Solaris 2.10, Darwin 8.11.0, and MinGW have + ;; a broken tr_TR locale where `i' is mapped to uppercase `I' + ;; instead of `İ', so disable tests on that platform. (if (or (string-contains %host-type "freebsd8") (string-contains %host-type "freebsd9") (string-contains %host-type "solaris2.10") - (string-contains %host-type "darwin8")) + (string-contains %host-type "darwin8") + (string-contains %host-type "mingw32")) (throw 'unresolved) (under-locale-or-unresolved %turkish-utf8-locale thunk))) @@ -192,7 +209,7 @@ ;; strings. (dynamic-wind (lambda () - (setlocale LC_ALL "fr_FR.UTF-8")) + (setlocale LC_ALL %french-utf8-locale-name)) (lambda () (string-locale-ci=? "Åuf" "ÅUF")) (lambda () hooks/post-receive -- GNU Guile
