Use -Werror=undef for assembly code.
[glibc.git] / wcsmbs / wcsmbsload.h
blobb64a829aa536ebbfbd8e1d4c56fa1b38834c5b4b
1 /* Copyright (C) 1998-2015 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
19 #ifndef _WCSMBSLOAD_H
20 #define _WCSMBSLOAD_H 1
22 #include <locale.h>
23 #include <wchar.h>
24 #include <locale/localeinfo.h>
27 /* Contains pointers to the used functions in the `gconv' modules. */
28 struct gconv_fcts
30 struct __gconv_step *towc;
31 size_t towc_nsteps;
32 struct __gconv_step *tomb;
33 size_t tomb_nsteps;
36 /* Set of currently active conversion functions. */
37 extern const struct gconv_fcts __wcsmbs_gconv_fcts_c attribute_hidden;
39 /* Load conversion functions for the currently selected locale. */
40 extern void __wcsmbs_load_conv (struct __locale_data *new_category)
41 internal_function;
43 /* Clone the current `__wcsmbs_load_conv' value. */
44 extern void __wcsmbs_clone_conv (struct gconv_fcts *copy)
45 internal_function;
47 /* Find the conversion functions for converting to and from NAME. */
48 extern int __wcsmbs_named_conv (struct gconv_fcts *copy, const char *name)
49 internal_function;
51 /* Function used for the `private.cleanup' hook. */
52 extern void _nl_cleanup_ctype (struct __locale_data *)
53 internal_function attribute_hidden;
56 #include <iconv/gconv_int.h>
59 /* Load the function implementation if necessary. */
60 extern struct __gconv_step *__wcsmbs_getfct (const char *to, const char *from,
61 size_t *nstepsp)
62 attribute_hidden;
64 extern const struct __locale_data _nl_C_LC_CTYPE attribute_hidden;
66 /* Check whether the LC_CTYPE locale changed since the last call.
67 Update the pointers appropriately. */
68 static inline const struct gconv_fcts *
69 get_gconv_fcts (struct __locale_data *data)
71 if (__glibc_unlikely (data->private.ctype == NULL))
73 if (__glibc_unlikely (data == &_nl_C_LC_CTYPE))
74 return &__wcsmbs_gconv_fcts_c;
75 __wcsmbs_load_conv (data);
77 return data->private.ctype;
80 #endif /* wcsmbsload.h */