]> git.ipfire.org Git - thirdparty/util-linux.git/blob - include/widechar.h
libmount: don't use sscanf() for swaps parsing
[thirdparty/util-linux.git] / include / widechar.h
1 /* Declarations for wide characters */
2 /* This file must be included last because the redefinition of wchar_t may
3 cause conflicts when system include files were included after it. */
4
5 #ifdef HAVE_WIDECHAR
6
7 # include <wchar.h>
8 # include <wctype.h>
9
10 #else /* !HAVE_WIDECHAR */
11
12 # include <ctype.h>
13 /* Fallback for types */
14 # define wchar_t char
15 # define wint_t int
16 # ifndef WEOF
17 # define WEOF EOF
18 # endif
19
20 /* Fallback for input operations */
21 # define fgetwc fgetc
22 # define getwc getc
23 # define getwchar getchar
24 # define fgetws fgets
25
26 /* Fallback for output operations */
27 # define fputwc fputc
28 # define putwc putc
29 # define putwchar putchar
30 # define fputws fputs
31
32 /* Fallback for character classification */
33 # define iswgraph isgraph
34 # define iswprint isprint
35 # define iswspace isspace
36
37 /* Fallback for string functions */
38 # define wcschr strchr
39 # define wcsdup strdup
40 # define wcslen strlen
41 # define wcspbrk strpbrk
42
43 # define wcwidth(c) (1)
44 # define wmemset memset
45 # define ungetwc ungetc
46
47 #endif /* HAVE_WIDECHAR */