On January 2, 2003 12:38 pm, Alexandre Julliard wrote:
tchar.h should not depend on msvcrt IMO, at least not in ASCII mode, so it should use the normal function names without underscores. It's not 100% compatible, but it should still do the right thing, both with and without msvcrt.
Sounds good. But since we are on the subject, here's another thing that's been troubling me: we have 3 flavors of the crt to worry about: glibc, msvcrt, and cygwin libc (let's call it cygcrt). To be honest, I haven't looked in detail at cygcrt but I guess it's a derivative of glibc (as it is used to port Unix stuff). However, it has stuff such as io.h which is not present in Unix, and is reminiscent of msvcrt.
When compiling stuff on Windows with gcc (mingw), it links by default with cygcrt if available. If the -mno-cygwin option is used, or cygwin is not available, it links against crtdll. Of course, the appropriate headers are used automatically.
For winegcc, I mapped the -mno-cygwin option to use msvcrt, otherwise we use the native glibc. This is the closest mapping I could find, and it works fairly well, with a few caveats such as the missing io.h in glibc.
Anyhow, and ideas on how to deal with all this?