cleaning up Microsoft Windows ifdef'ery

Noel Grandin noel at
Wed Jan 27 05:33:49 PST 2016


I'm looking at the different ways we test for the Microsoft Windows platform using #if and #ifdef.

There appear to be several different ways of doing this in our codebase.

Here is a list of what we have, along with the number of times it occurs.

7         WIN
68       WIN32
109      _WIN32
2          _WIN32_WCE
15        _WIN32_WINNT_WINBLUE
16        _WIN32_WINNT
27        _WIN64
5          _WINDOWS
1          _WINDOWS_
2          WNT
2          XP_WIN

Of these, I think we need to keep:

         _WIN32_WINNT to test for specific versions of Windows
         _WIN32 for generic Windows-32-and-64-bit specific code
         _WIN64 for generic Windows-64-bit specific code

     Noel Grandin


More information about the LibreOffice mailing list