Dimitrie O. Paun wrote:
A perfect test for my winegcc/wineg++ stuff, and for our C++ Winelib support! I've tried a little bit, it breaks badly because we use lots of macros in the msvcrt headers and the code expects functions (which, unlike macros, respect scope). I've signaled this problem before, and I've send a patch for include/msvcrt/io.h transforming those macros into inline functions, but a lot more is left to do.
That is to say, all things from include/msvcrt/* of the form:
#define isascii __isascii
must become:
static inline int isascii(int c) { return __isascii(c); }
Any takers? :)
I believe someone will be submitting a patch soon :-)
But note: varargs functions cannot be inline, it seems. Thus the defines
#define cprintf _cprintf #define cscanf _cscanf
in conio.h cannot be handled this way. BTW, although MSVC4.0 used #define's to do this kind of aliasing, MSVC6.0 uses some other scheme; both cprintf and _cprintf have real prototypes in conio.h there.
Anyone know what the right thing to do there is? - Dan