From: Earnie B. <ea...@us...> - 2012-09-21 18:07:37
|
On Thu, Sep 20, 2012 at 8:33 AM, Earnie Boyd wrote: > 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. Round 1 test was to build binutils. It went rather smoothly but I had to quiet some warnings I included in sdkddkver.h and winsock.h. I also needed to rework include/sys/stat.h, you might want to review it. View the changed file in whole at http://mingw.git.sourceforge.net/git/gitweb.cgi?p=mingw/mingw.org-wsl;a=blob;f=include/sys/stat.h;h=75e84d7d06de2706de6ffae12b71d83c09e4f111;hb=refs/heads/redo-filters View the diff at http://mingw.git.sourceforge.net/git/gitweb.cgi?p=mingw/mingw.org-wsl;a=commitdiff;h=b6a947ede19da18e2cf8841b1283db350d7e64a6#patch4 Those are some long URL so watch the line breaks if any. -- Earnie -- https://sites.google.com/site/earnieboyd |