mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-02 12:30:24 +08:00
58e981a5a4
mount_info::get_mounts_here used RtlCreateUnicodeStringFromAsciiz which translates bytes into wide chars verbatim. Create a new function sys_mbstouni_alloc which can be used from mount_info::get_mounts_here to convert multibyte mount point strings to UNICODE_STRINGS in a locale-aware way. For symmetry, create a function mount_info::free_mounts_here, so the knwoledge how to free the UNICODE_STRING buffers is encapsulated in the same class. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cygwin documentation is available on the net at https://cygwin.com You might especially be interested in https://cygwin.com/faq/faq.html#faq.programming.building-cygwin