From f3de575bc45e11d0c5f7d612bfaacbfa6f63c039 Mon Sep 17 00:00:00 2001 From: Takuya SHIOZAKI Date: Tue, 15 May 2001 20:28:48 +0000 Subject: [PATCH] adapt to FreeBSD. - add #define NULL 0 instead of sys/null.h. - enable locale-insensitive functions: wcscat.c wcschr.c wcscmp.c wcscpy.c wcscspn.c wcslcat.c wcslcpy.c wcslen.c wcsncat.c wcsncmp.c wcsncpy.c wcspbrk.c wcsrchr.c wcsspn.c wcsstr.c wmemchr.c wmemcmp.c wmemcpy.c wmemmove.c wmemset.c - disable some locale-sensitive functions defined in wchar.h temporarily: mbrlen mbrtowc mbsinit mbsrtowcs wcrtomb wcsrtombs wcwidth wcswidth - disable all functions defined in wctype.h temporarily: is* tow* --- include/wchar.h | 13 ++++++++++++- include/wctype.h | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/include/wchar.h b/include/wchar.h index 488b58da6468..2ef0f17c10e9 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -69,7 +69,9 @@ #include #include -#include +#ifndef NULL +#define NULL 0 +#endif #ifdef _BSD_WCHAR_T_ typedef _BSD_WCHAR_T_ wchar_t; @@ -96,6 +98,8 @@ typedef _BSD_SIZE_T_ size_t; #endif __BEGIN_DECLS +#if 0 +/* XXX: not implemented */ size_t mbrlen __P((const char * __restrict, size_t, mbstate_t * __restrict)); size_t mbrtowc __P((wchar_t * __restrict, const char * __restrict, size_t, mbstate_t * __restrict)); @@ -103,6 +107,7 @@ int mbsinit __P((const mbstate_t *)); size_t mbsrtowcs __P((wchar_t * __restrict, const char ** __restrict, size_t, mbstate_t * __restrict)); size_t wcrtomb __P((char * __restrict, wchar_t, mbstate_t * __restrict)); +#endif wchar_t *wcscat __P((wchar_t * __restrict, const wchar_t * __restrict)); wchar_t *wcschr __P((const wchar_t *, wchar_t)); int wcscmp __P((const wchar_t *, const wchar_t *)); @@ -116,8 +121,11 @@ wchar_t *wcsncpy __P((wchar_t * __restrict , const wchar_t * __restrict, size_t)); wchar_t *wcspbrk __P((const wchar_t *, const wchar_t *)); wchar_t *wcsrchr __P((const wchar_t *, wchar_t)); +#if 0 +/* XXX: not implemented */ size_t wcsrtombs __P((char * __restrict, const wchar_t ** __restrict, size_t, mbstate_t * __restrict)); +#endif size_t wcsspn __P((const wchar_t *, const wchar_t *)); wchar_t *wcsstr __P((const wchar_t *, const wchar_t *)); wchar_t *wmemchr __P((const wchar_t *, wchar_t, size_t)); @@ -129,8 +137,11 @@ wchar_t *wmemset __P((wchar_t *, wchar_t, size_t)); size_t wcslcat __P((wchar_t *, const wchar_t *, size_t)); size_t wcslcpy __P((wchar_t *, const wchar_t *, size_t)); +#if 0 +/* XXX: not implemented */ int wcswidth __P((const wchar_t *, size_t)); int wcwidth __P((wchar_t)); +#endif __END_DECLS #endif /* !_WCHAR_H_ */ diff --git a/include/wctype.h b/include/wctype.h index 93ca454878d3..66ee7ccc4afc 100644 --- a/include/wctype.h +++ b/include/wctype.h @@ -30,6 +30,8 @@ * $FreeBSD$ */ +#if 0 +/* XXX: not implemented */ #ifndef _WCTYPE_H_ #define _WCTYPE_H_ @@ -63,3 +65,4 @@ wint_t towupper __P((wint_t)); __END_DECLS #endif /* _WCTYPE_H_ */ +#endif