#ifndef _WCHAR_H_GUARD
#define _WCHAR_H_GUARD

#include <wctype.h>
#include <stdio.h>
#include <stdarg.h>
#include <stddef.h>

/* FIXME: stubs for STLport!
 * These declarations are needed only to compile something like
 *   using std::fgetwc;
 * No implementation is provided.
 * { */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
wint_t fgetwc(FILE *stream);
wchar_t *fgetws(wchar_t * /*restrict*/ s, int n, FILE * /*restrict*/ stream);
wint_t fputwc(wchar_t c, FILE *stream);
int fputws(const wchar_t * /*restrict*/ s, FILE * /*restrict*/ stream);
int fwide(FILE *stream, int mode);
#pragma __printf_args
int fwprintf(FILE * /*restrict*/ stream, const wchar_t * /*restrict*/ format, ...);
#pragma __scanf_args
int fwscanf(FILE * /*restrict*/ stream, const wchar_t * /*restrict*/ format, ...);
wint_t getwc(FILE *stream);
wint_t getwchar(void);
wint_t ungetwc(wint_t c, FILE *stream);
wint_t putwc(wchar_t c, FILE *stream);
wint_t putwchar(wchar_t c);
#pragma __printf_args
int swprintf(wchar_t * /*restrict*/ s, size_t n, const wchar_t * /*restrict*/ format, ...);
#pragma __scanf_args
int swscanf(const wchar_t * /*restrict*/ s, const wchar_t * /*restrict*/ format, ...);
#pragma __printf_args
int vfwprintf(FILE * /*restrict*/ stream, const wchar_t * /*restrict*/ format, va_list arg);
#pragma __printf_args
int vswprintf(wchar_t * /*restrict*/ s, size_t n, const wchar_t * /*restrict*/ format, va_list arg);
#pragma __printf_args
int vwprintf(const wchar_t * /*restrict*/ format, va_list arg);
struct tm;
size_t wcsftime(wchar_t * /*restrict*/ s, size_t maxsize, const wchar_t * /*restrict*/ format, const struct tm * /*restrict*/ timeptr);
wchar_t *wcstok(wchar_t * /*restrict*/ s1, const wchar_t * /*restrict*/ s2, wchar_t ** /*restrict*/ ptr);
wchar_t *wcscat(wchar_t * /*restrict*/ s1, const wchar_t * /*restrict*/ s2);
wchar_t *wcsrchr(const wchar_t *s, wchar_t c);
int wcscmp(const wchar_t *s1, const wchar_t *s2);
int wcscoll(const wchar_t *s1, const wchar_t *s2);
wchar_t *wcscpy(wchar_t * /*restrict*/ s1, const wchar_t * /*restrict*/ s2);
size_t wcscspn(const wchar_t *s1, const wchar_t *s2);
size_t wcslen(const wchar_t *s);
wchar_t *wcsncat(wchar_t * /*restrict*/ s1, const wchar_t * /*restrict*/ s2, size_t n);
int wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n);
wchar_t *wcsncpy(wchar_t * /*restrict*/ s1, const wchar_t * /*restrict*/ s2, size_t n);
wchar_t *wcspbrk(const wchar_t *s1, const wchar_t *s2);
wchar_t *wcschr(const wchar_t *s, wchar_t c);
size_t wcsspn(const wchar_t *s1, const wchar_t *s2);
size_t wcsxfrm(wchar_t * /*restrict*/ s1, const wchar_t * /*restrict*/ s2, size_t n);
double wcstod(const wchar_t * /*restrict*/ nptr, wchar_t ** /*restrict*/ endptr);
long int wcstol(const wchar_t * /*restrict*/ nptr, wchar_t ** /*restrict*/ endptr, int base);
wchar_t *wcsstr(const wchar_t *s1, const wchar_t *s2);
wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n);
int wctob(wint_t c);
int wmemcmp(wchar_t * /*restrict*/ s1, const wchar_t * /*restrict*/ s2, size_t n);
wchar_t *wmemmove(wchar_t *s1, const wchar_t *s2, size_t n);
#pragma __printf_args
int wprintf(const wchar_t * /*restrict*/ format, ...);
#pragma __scanf_args
int wscanf(const wchar_t * /*restrict*/ format, ...);
wchar_t *wmemcpy(wchar_t * /*restrict*/ s1, const wchar_t * /*restrict*/ s2, size_t n);
wchar_t *wmemset(wchar_t *s, wchar_t c, size_t n);
size_t wcstombs( char *s , const wchar_t *pwcs , size_t n);
size_t mbstowcs( wchar_t *pwcs , const char *s , size_t n);
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
/* } FIXME */

#endif /* _WCHAR_H_GUARD */
