WinCon: define all of PDC_WIDE, UNICODE, _UNICODE if one of those are defined#321
WinCon: define all of PDC_WIDE, UNICODE, _UNICODE if one of those are defined#321
Conversation
… defined Per MSDN one should always define both macros, as they are used in different contexts, but must match. The definition of `UNICODE` can also be provided by the build environment, especially with MSVC, in which case PDC_WIDE must be defined as well.
|
Agreed, it'd make sense for this to be handled consistently, probably within The use of both One problem I do see is that you've got We also don't have any tests for what happens in non-Unicode |
But if we put this in curspriv, then there's no issue with that, is there? I'd drop that (and similar) code from all ports, then add to curspriv within |
|
friendly ping (as outlined above likely should be done different) |
Per MSDN one should always define both macros, as they are used in different contexts, but must match. The definition of
UNICODEcan also be provided by the build environment, especially with MSVC, in which case PDC_WIDE must be defined as well.In general - shouldn't we move that to another (common internal) header, wrapping it in
#ifdef _WIN32?Apart from wincon we have that also in wingui, vt and (not sure it is needed/useful there) fb:
PDCursesMod/wingui/pdcwin.h
Lines 13 to 20 in d2f479a
PDCursesMod/vt/pdcvt.h
Lines 9 to 16 in d2f479a
PDCursesMod/fb/pdcfb.h
Lines 1 to 8 in d2f479a