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.