1
1
dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
3
dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
3
dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
4
4
dnl This file is free software; the Free Software Foundation
5
5
dnl gives unlimited permission to copy and/or distribute it,
6
6
dnl with or without modifications, as long as this notice is preserved.
8
8
dnl Written by Eric Blake.
10
# wchar_h.m4 serial 33
10
# wchar_h.m4 serial 39
12
12
AC_DEFUN([gl_WCHAR_H],
37
38
dnl Check for declarations of anything we want to poison if the
38
39
dnl corresponding gnulib module is not in use.
39
40
gl_WARN_ON_USE_PREPARE([[
40
/* Some systems require additional headers. */
41
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
43
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
44
included before <wchar.h>. */
45
#if !(defined __GLIBC__ && !defined __UCLIBC__)
42
46
# include <stddef.h>
43
47
# include <stdio.h>
47
]], [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb
48
wcsrtombs wcsnrtombs wcwidth])
52
[btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb
53
wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset
54
wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp
55
wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr
56
wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth
51
60
dnl Check whether <wchar.h> is usable at all.
115
131
AC_DEFUN([gl_WCHAR_H_DEFAULTS],
117
GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC])
118
GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB])
119
GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT])
120
GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC])
121
GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN])
122
GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS])
123
GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS])
124
GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB])
125
GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS])
126
GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS])
127
GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH])
133
GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC])
134
GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB])
135
GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT])
136
GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC])
137
GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN])
138
GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS])
139
GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS])
140
GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB])
141
GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS])
142
GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS])
143
GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH])
144
GNULIB_WMEMCHR=0; AC_SUBST([GNULIB_WMEMCHR])
145
GNULIB_WMEMCMP=0; AC_SUBST([GNULIB_WMEMCMP])
146
GNULIB_WMEMCPY=0; AC_SUBST([GNULIB_WMEMCPY])
147
GNULIB_WMEMMOVE=0; AC_SUBST([GNULIB_WMEMMOVE])
148
GNULIB_WMEMSET=0; AC_SUBST([GNULIB_WMEMSET])
149
GNULIB_WCSLEN=0; AC_SUBST([GNULIB_WCSLEN])
150
GNULIB_WCSNLEN=0; AC_SUBST([GNULIB_WCSNLEN])
151
GNULIB_WCSCPY=0; AC_SUBST([GNULIB_WCSCPY])
152
GNULIB_WCPCPY=0; AC_SUBST([GNULIB_WCPCPY])
153
GNULIB_WCSNCPY=0; AC_SUBST([GNULIB_WCSNCPY])
154
GNULIB_WCPNCPY=0; AC_SUBST([GNULIB_WCPNCPY])
155
GNULIB_WCSCAT=0; AC_SUBST([GNULIB_WCSCAT])
156
GNULIB_WCSNCAT=0; AC_SUBST([GNULIB_WCSNCAT])
157
GNULIB_WCSCMP=0; AC_SUBST([GNULIB_WCSCMP])
158
GNULIB_WCSNCMP=0; AC_SUBST([GNULIB_WCSNCMP])
159
GNULIB_WCSCASECMP=0; AC_SUBST([GNULIB_WCSCASECMP])
160
GNULIB_WCSNCASECMP=0; AC_SUBST([GNULIB_WCSNCASECMP])
161
GNULIB_WCSCOLL=0; AC_SUBST([GNULIB_WCSCOLL])
162
GNULIB_WCSXFRM=0; AC_SUBST([GNULIB_WCSXFRM])
163
GNULIB_WCSDUP=0; AC_SUBST([GNULIB_WCSDUP])
164
GNULIB_WCSCHR=0; AC_SUBST([GNULIB_WCSCHR])
165
GNULIB_WCSRCHR=0; AC_SUBST([GNULIB_WCSRCHR])
166
GNULIB_WCSCSPN=0; AC_SUBST([GNULIB_WCSCSPN])
167
GNULIB_WCSSPN=0; AC_SUBST([GNULIB_WCSSPN])
168
GNULIB_WCSPBRK=0; AC_SUBST([GNULIB_WCSPBRK])
169
GNULIB_WCSSTR=0; AC_SUBST([GNULIB_WCSSTR])
170
GNULIB_WCSTOK=0; AC_SUBST([GNULIB_WCSTOK])
171
GNULIB_WCSWIDTH=0; AC_SUBST([GNULIB_WCSWIDTH])
128
172
dnl Assume proper GNU behavior unless another module says otherwise.
129
173
HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC])
130
174
HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT])
135
179
HAVE_WCRTOMB=1; AC_SUBST([HAVE_WCRTOMB])
136
180
HAVE_WCSRTOMBS=1; AC_SUBST([HAVE_WCSRTOMBS])
137
181
HAVE_WCSNRTOMBS=1; AC_SUBST([HAVE_WCSNRTOMBS])
182
HAVE_WMEMCHR=1; AC_SUBST([HAVE_WMEMCHR])
183
HAVE_WMEMCMP=1; AC_SUBST([HAVE_WMEMCMP])
184
HAVE_WMEMCPY=1; AC_SUBST([HAVE_WMEMCPY])
185
HAVE_WMEMMOVE=1; AC_SUBST([HAVE_WMEMMOVE])
186
HAVE_WMEMSET=1; AC_SUBST([HAVE_WMEMSET])
187
HAVE_WCSLEN=1; AC_SUBST([HAVE_WCSLEN])
188
HAVE_WCSNLEN=1; AC_SUBST([HAVE_WCSNLEN])
189
HAVE_WCSCPY=1; AC_SUBST([HAVE_WCSCPY])
190
HAVE_WCPCPY=1; AC_SUBST([HAVE_WCPCPY])
191
HAVE_WCSNCPY=1; AC_SUBST([HAVE_WCSNCPY])
192
HAVE_WCPNCPY=1; AC_SUBST([HAVE_WCPNCPY])
193
HAVE_WCSCAT=1; AC_SUBST([HAVE_WCSCAT])
194
HAVE_WCSNCAT=1; AC_SUBST([HAVE_WCSNCAT])
195
HAVE_WCSCMP=1; AC_SUBST([HAVE_WCSCMP])
196
HAVE_WCSNCMP=1; AC_SUBST([HAVE_WCSNCMP])
197
HAVE_WCSCASECMP=1; AC_SUBST([HAVE_WCSCASECMP])
198
HAVE_WCSNCASECMP=1; AC_SUBST([HAVE_WCSNCASECMP])
199
HAVE_WCSCOLL=1; AC_SUBST([HAVE_WCSCOLL])
200
HAVE_WCSXFRM=1; AC_SUBST([HAVE_WCSXFRM])
201
HAVE_WCSDUP=1; AC_SUBST([HAVE_WCSDUP])
202
HAVE_WCSCHR=1; AC_SUBST([HAVE_WCSCHR])
203
HAVE_WCSRCHR=1; AC_SUBST([HAVE_WCSRCHR])
204
HAVE_WCSCSPN=1; AC_SUBST([HAVE_WCSCSPN])
205
HAVE_WCSSPN=1; AC_SUBST([HAVE_WCSSPN])
206
HAVE_WCSPBRK=1; AC_SUBST([HAVE_WCSPBRK])
207
HAVE_WCSSTR=1; AC_SUBST([HAVE_WCSSTR])
208
HAVE_WCSTOK=1; AC_SUBST([HAVE_WCSTOK])
209
HAVE_WCSWIDTH=1; AC_SUBST([HAVE_WCSWIDTH])
138
210
HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB])
139
211
HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH])
140
212
REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T])