From: Earnie B. <ea...@us...> - 2012-09-20 12:33:18
|
On Wed, Sep 19, 2012 at 2:59 PM, Earnie Boyd wrote: > On Fri, Sep 7, 2012 at 4:07 PM, Earnie Boyd wrote: >> FYI, I've pushed a branch named redo-filters to track this to the >> mingw.org-wsl repository. >> >> In this I will ensure to always include _mingw.h. >> I've created a new macro __AW() to help limit the code for mapping >> UNICODE versus ASCII symbols to the non-specific symbol. Yes, I know >> I said I was dropping it in the RFC but I realized I could keep part >> of what I was doing to get a bigger bang for my efforts on the review. >> >> So if we have fooA and fooW we can >> >> #define foo __AW(foo) >> typedef __AW(foo) foo; >> >> Instead of >> >> #if defined(UNICODE) || defined(_UNICODE) >> #define foo fooW >> typedef fooW foo; >> #else >> #define foo fooA >> typedef fooA foo; >> #endif >> >> Note: I know it is one or the other (#define or typedef), I'm just >> giving an textual example of each. > > I've just pushed the last of the changes for redo-filters branch to > the repository. Here is a list of items accomplished. > > * Ensure to include _mingw.h and that the statement follows the > #pragma GCC system_header statement. > * Ensure that the file contains the #pragma GCC system_header statement. > * Add an include of sdkddkver.h to _mingw.h so that its defines are > ensured to be present. > * Define a macro __AW() in _mingw.h to be used for UNICODE mapping of > ANSI versus UNICODE symbols to the non specific symbol when both an *A > version and a *W version of the symbol exists. > * Define a macro __STR() in _mingw.h to be used for mapping UNICODE > versus ANSI strings to non specific symbols. > * Use _WIN32_WINNT in all cases for filters replacing _WIN32_WINDOWS and WINVER. > * Remove the use of __MSVCRT_VERSION__ throughout the files as needless filters. > * Use named constant macros for the filter comparison of OS version, > e.g #if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K). > * Move the filters for OS version comparisons to the end of the file. > * Invent _WIN32_WINNT_WIN95, _WIN32_WINNT_WIN98 and _WIN32_WINNT_WINME > in sdkddkver.h. (By invent I mean that these are not defined by > Microsoft). > * Miscellaneous cleanup of some items in a few files. * In windows.h, removed inclusion of winsock2.h to be more Windows compatible. * In winsock.h, warn that it is included instead of winsock2.h. -- Earnie -- https://sites.google.com/site/earnieboyd |