Mercurial > hg > xemacs-beta
diff src/sysdep.c @ 912:e10cdc51a200
[xemacs-hg @ 2002-07-09 11:58:12 by michaels]
2002-07-08 Mike Sperber <mike@xemacs.org>
* text.h: Only include wchar.h if we have it; define wcslen
prototype if we don't.
* config.h.in: Add stub for HAVE_WCHAR_H.
* sysdep.c (wcslen): Added definition for systems which don't have
it.
author | michaels |
---|---|
date | Tue, 09 Jul 2002 11:58:12 +0000 |
parents | 79c6ff3eef26 |
children | 37bdd24225ef |
line wrap: on
line diff
--- a/src/sysdep.c Tue Jul 09 11:57:49 2002 +0000 +++ b/src/sysdep.c Tue Jul 09 11:58:12 2002 +0000 @@ -3328,6 +3328,23 @@ return ctime_static; } +/************************************************************************/ +/* Emulation of missing functions from wchar.h */ +/************************************************************************/ + +#ifndef HAVE_WCHAR_H +size_t +wcslen(const wchar_t *s) +{ + const wchar_t *p = s; + + while (*p++) + ; + + return p - s; +} +#endif + /************************************************************************/ /* Emulations of missing system calls */