This patch allows plibc to make use of wchar functions (both CRT and WinAPI). Their use is mostly minor, and restricted to initial information querying.
However, when compiled with -DAUTO_UTF8=1 , it will map all CRT calls to their wide-char variants by converting supplied char-strings (considering them UTF-8-encoded) into wchar-strings, and converting the results of the calls from wchar-strings to UTF-8-encoded char-strings. As long as clients of the library use UTF-8 and refrain from bypassing plibc and using CRT directly, they won't know the difference.
Discussion is welcome (some of the design decisions are questionable; some functions might not have been ported appropriately, especially *printf/*scanf).
Relevant GNUnet patch will be submitted to GNUnet Mantis later.
Uploaded a missing file.
Removed the old patch and uploaded the new one, with all missing files in it.
Runtime UTF8ization
Uploaded new patch version. Now the decision about utf8 conversion is made when plibc is initialized (there's a new plibc_init_utf8() function).