annotate lib/locale.in.h @ 12422:f7842310a565

New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
author Bruno Haible <bruno@clisp.org>
date Fri, 11 Dec 2009 01:15:28 +0100
parents f214e6acb33b
children 8db404cb2e51
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9254
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* A POSIX <locale.h>.
11832
ff3dd373542b stddef: fix NetBSD 5.0 NULL bug, rather than working around it
Eric Blake <ebb9@byu.net>
parents: 10655
diff changeset
2 Copyright (C) 2007-2009 Free Software Foundation, Inc.
9254
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 9254
diff changeset
4 This program is free software: you can redistribute it and/or modify
9254
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 9254
diff changeset
6 the Free Software Foundation; either version 3 of the License, or
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 9254
diff changeset
7 (at your option) any later version.
9254
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 GNU General Public License for more details.
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 9254
diff changeset
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
9254
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 #ifndef _GL_LOCALE_H
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18
10655
8668b19a7032 Avoid gcc warnings because of #pragma GCC system_header on older gcc.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
19 #if __GNUC__ >= 3
10375
f96e845fc36d Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents: 9309
diff changeset
20 @PRAGMA_SYSTEM_HEADER@
10655
8668b19a7032 Avoid gcc warnings because of #pragma GCC system_header on older gcc.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
21 #endif
10375
f96e845fc36d Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents: 9309
diff changeset
22
9254
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 /* The include_next requires a split double-inclusion guard. */
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 #@INCLUDE_NEXT@ @NEXT_LOCALE_H@
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 #ifndef _GL_LOCALE_H
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 #define _GL_LOCALE_H
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28
11832
ff3dd373542b stddef: fix NetBSD 5.0 NULL bug, rather than working around it
Eric Blake <ebb9@byu.net>
parents: 10655
diff changeset
29 /* NetBSD 5.0 mis-defines NULL. */
ff3dd373542b stddef: fix NetBSD 5.0 NULL bug, rather than working around it
Eric Blake <ebb9@byu.net>
parents: 10655
diff changeset
30 #include <stddef.h>
ff3dd373542b stddef: fix NetBSD 5.0 NULL bug, rather than working around it
Eric Blake <ebb9@byu.net>
parents: 10655
diff changeset
31
12340
2da64958ab60 locale: Make locale_t available when possible.
Bruno Haible <bruno@clisp.org>
parents: 11832
diff changeset
32 /* MacOS X 10.5 defines the locale_t type in <xlocale.h>. */
2da64958ab60 locale: Make locale_t available when possible.
Bruno Haible <bruno@clisp.org>
parents: 11832
diff changeset
33 #if @HAVE_XLOCALE_H@
2da64958ab60 locale: Make locale_t available when possible.
Bruno Haible <bruno@clisp.org>
parents: 11832
diff changeset
34 # include <xlocale.h>
2da64958ab60 locale: Make locale_t available when possible.
Bruno Haible <bruno@clisp.org>
parents: 11832
diff changeset
35 #endif
2da64958ab60 locale: Make locale_t available when possible.
Bruno Haible <bruno@clisp.org>
parents: 11832
diff changeset
36
12422
f7842310a565 New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents: 12342
diff changeset
37 /* The definition of _GL_ARG_NONNULL is copied here. */
f7842310a565 New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents: 12342
diff changeset
38
9254
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 /* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C.
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 On systems that don't define it, use the same value as GNU libintl. */
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 #if !defined LC_MESSAGES
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 # define LC_MESSAGES 1729
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 #endif
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44
12342
f214e6acb33b New module 'duplocale'.
Bruno Haible <bruno@clisp.org>
parents: 12340
diff changeset
45 #if @GNULIB_DUPLOCALE@
f214e6acb33b New module 'duplocale'.
Bruno Haible <bruno@clisp.org>
parents: 12340
diff changeset
46 # if @REPLACE_DUPLOCALE@
f214e6acb33b New module 'duplocale'.
Bruno Haible <bruno@clisp.org>
parents: 12340
diff changeset
47 # undef duplocale
f214e6acb33b New module 'duplocale'.
Bruno Haible <bruno@clisp.org>
parents: 12340
diff changeset
48 # define duplocale rpl_duplocale
12422
f7842310a565 New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents: 12342
diff changeset
49 extern locale_t duplocale (locale_t locale) _GL_ARG_NONNULL ((1));
12342
f214e6acb33b New module 'duplocale'.
Bruno Haible <bruno@clisp.org>
parents: 12340
diff changeset
50 # endif
f214e6acb33b New module 'duplocale'.
Bruno Haible <bruno@clisp.org>
parents: 12340
diff changeset
51 #elif defined GNULIB_POSIXCHECK
f214e6acb33b New module 'duplocale'.
Bruno Haible <bruno@clisp.org>
parents: 12340
diff changeset
52 # undef duplocale
f214e6acb33b New module 'duplocale'.
Bruno Haible <bruno@clisp.org>
parents: 12340
diff changeset
53 # define duplocale(l) \
f214e6acb33b New module 'duplocale'.
Bruno Haible <bruno@clisp.org>
parents: 12340
diff changeset
54 (GL_LINK_WARNING ("duplocale is buggy on some glibc systems - " \
f214e6acb33b New module 'duplocale'.
Bruno Haible <bruno@clisp.org>
parents: 12340
diff changeset
55 "use gnulib module duplocale for portability"), \
f214e6acb33b New module 'duplocale'.
Bruno Haible <bruno@clisp.org>
parents: 12340
diff changeset
56 duplocale (l))
f214e6acb33b New module 'duplocale'.
Bruno Haible <bruno@clisp.org>
parents: 12340
diff changeset
57 #endif
f214e6acb33b New module 'duplocale'.
Bruno Haible <bruno@clisp.org>
parents: 12340
diff changeset
58
9254
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
59 #endif /* _GL_LOCALE_H */
aa96ae5634ab Rename locale_.h to locale.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60 #endif /* _GL_LOCALE_H */