> #ifdef _WIN32
>  executable_name = strrchr (argv[0], '\\');

Bzzt. You have to use the multi-byte character set aware _mbschr() and
_mbsrchr() functions from <mbchar.h> to search for backlashes (or
slashes) in "narrow" (char *) system code page strings (for instance,
file names) on Windows. The East Asian double-byte code pages have
two-byte characters where the second byte is backslash or slash.

Alternatively, use the Unicode (wide character) APIs and wchar_t
variables and pointers. That makes it harder to share the same code
snippets between Unix and Windows, though.

--tml


_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to