Norbert Koch wrote:
sperber@informatik.uni-tuebingen.de (Michael Sperber [Mr.  Preprocessor]) writes:

I see mainly wcslen referenced in the source.  Don't exist in FreeBSD
4.3, as far as I can tell. (What puzzles me is that a binary created
on 4.5 runs on 4.3, though.)

Hmm, yes this sounds strange, because on 4.3 it seems you'd need two
calls, wcstomb to convert to multibyte and mblen to calculate the
length.

No, you've got it backwards.  If anything, you'd convert mbstowcs and do wcslen.  wide strings are of fixed width so wcslen is extremely to implement.  it doesn't surprise me at all that it's a macro.

I can do a configure check for wcslen et al and include wchar.h [this is supposed to be standard] if so; if not, i emulate them.  i can always add a check for wchar.h as well if some extremely broken system comes up that has wcslen but no wchar.h.


Maybe wcslen is a macro which expands to these two function calls and
thus, lucky us, the code works... ahem, guesswork.

norbert.