~p-ch-e/gnuhello/gnuhello

« back to all changes in this revision

Viewing changes to gnulib/m4/locale-fr.m4

  • Committer: Reuben Thomas
  • Date: 2012-04-13 13:42:35 UTC
  • Revision ID: rrt@sc3d.org-20120413134235-a327i8oah0w2e5te
Update gnulib.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# locale-fr.m4 serial 13
2
 
dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc.
 
1
# locale-fr.m4 serial 16
 
2
dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
3
3
dnl This file is free software; the Free Software Foundation
4
4
dnl gives unlimited permission to copy and/or distribute it,
5
5
dnl with or without modifications, as long as this notice is preserved.
26
26
int main () {
27
27
  /* Check whether the given locale name is recognized by the system.  */
28
28
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
29
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
29
  /* On native Windows, setlocale(category, "") looks at the system settings,
30
30
     not at the environment variables.  Also, when an encoding suffix such
31
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
31
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32
32
     category of the locale to "C".  */
33
33
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
34
34
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
63
63
     one byte long. This excludes the UTF-8 encoding.  */
64
64
  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
65
65
  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
 
66
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
66
67
  /* Check whether the decimal separator is a comma.
67
68
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
68
69
     are nl_langinfo(RADIXCHAR) are both ".".  */
69
70
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
71
#endif
70
72
  return 0;
71
73
}
72
74
changequote([,])dnl
80
82
        # "ja" as "Japanese" or "Japanese_Japan.932",
81
83
        # and similar.
82
84
        mingw*)
83
 
          # Test for the native Win32 locale name.
 
85
          # Test for the native Windows locale name.
84
86
          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
85
87
            gt_cv_locale_fr=French_France.1252
86
88
          else
152
154
#if !(defined __BEOS__ || defined __HAIKU__)
153
155
  /* Check whether the given locale name is recognized by the system.  */
154
156
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
155
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
157
  /* On native Windows, setlocale(category, "") looks at the system settings,
156
158
     not at the environment variables.  Also, when an encoding suffix such
157
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
159
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
158
160
     category of the locale to "C".  */
159
161
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
160
162
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
189
191
      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
190
192
    return 1;
191
193
#endif
 
194
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
192
195
  /* Check whether the decimal separator is a comma.
193
196
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
194
197
     are nl_langinfo(RADIXCHAR) are both ".".  */
195
198
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
199
#endif
196
200
  return 0;
197
201
}
198
202
changequote([,])dnl
206
210
        # "ja" as "Japanese" or "Japanese_Japan.932",
207
211
        # and similar.
208
212
        mingw*)
209
 
          # Test for the hypothetical native Win32 locale name.
 
213
          # Test for the hypothetical native Windows locale name.
210
214
          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
211
215
            gt_cv_locale_fr_utf8=French_France.65001
212
216
          else