|Subject:||Wine Emulator Patch...|
|From:||The Hermit Hacker (scra...@hub.org)|
|Date:||Dec 23, 1997 2:53:06 pm|
I've been following the Wine project relatively closely, and the recent distribution threw in include files that we don't appear to have, namely wctype.h. Stefan (the maintainer) "patched" it so that it gets around this deficiency (as did I when I built it onto my computer), but I got into a discussion with the developers about this in the newsgroup, and have been informed that this is, in fact, wrong :(
My argument was weak to start off with, in that I didnt' believe that anything other then Linux had this, and that putting wctype.h as part of the distribution made it more Linux-only...except that other OSs (Solaris, AIX, etc) do have a wctype.h file, so why are we missing it?
The response I got from one of my postings is as follows, and I'm curious as to whether this is something up and coming for FreeBSD, or if anyone even cares? :(
========= Originator: joh...@news.chiark.greenend.org.uk ([127.0.0.1])
If you go into misc/lstr.c with vi, do a search/replace of:
tow -> to isw -> is
That will get it to compile...
Well, it probably will compile, but the two sets of functions are *supposed* to be different.
wctype.h is the Wide Character Type definitions. ie. Unicode/DBCS support. This will be required to support the Windows lstrxxxW set of functions from TCHAR.H.
I still don't know what this wctype.h is, nor what it belongs to, other then that using it makes Wine completely a Linux-only thing from what I can tell :(
Not everyone runs Linux either :) FreeBSD doesn't have a wctype.h file at all, not even in the most current source tree...
Not at all. It's a standard header, and it appears that glibc has it. It's even documented under Visual C++'s "Standard C++ Library Reference" and "Run-Time Library Reference", so to say it's Linux libc specific is wrong. You just need to upgrade to a version of *your* OS's C library that supports this functionality. I can't believe it's either not there already (somewhere), or not planned for the near future.
Anyway, it makes sense to use this support from the libc rather than reimplement it within Wine. As to why it's being done with wctype_t and not wchar_t (MS document wchar_t as being more portable), I guess the apparently newer wctype specification gives a richer set of functionality which makes the full set of lstrxxx functions easier to implement, as well as being The True Way Forward. (The names appear to be more consistent too, unlike the wcs* versions.) ===========