MPS issue job003740

Titlempswin.h may change the setting of WIN32_LEAN_AND_MEAN
Statusclosed
Priorityoptional
Assigned userGareth Rees
OrganizationRavenbrook
DescriptionIn mpswin.h [1] it says:

    #define WIN32_LEAN_AND_MEAN
    #include <windows.h>
    #undef WIN32_LEAN_AND_MEAN

But this means that if a client has defined WIN32_LEAN_AND_MEAN then including mps.h will undefine it.
AnalysisShould write:

    #ifndef WIN32_LEAN_AND_MEAN
    #define WIN32_LEAN_AND_MEAN
    #include <windows.h>
    #undef WIN32_LEAN_AND_MEAN
    #else
    #include <windows.h>
    #endif

so that the setting is the same afterwards as before.
How foundinspection
Evidence[1] <https://info.ravenbrook.com/project/mps/master/code/mpswin.h>
Created byGareth Rees
Created on2014-04-06 15:06:54
Last modified byGareth Rees
Last modified on2014-04-07 18:27:58
History2014-04-06 GDR Created.

Fixes

Change Effect Date User Description
185323 closed 2014-04-07 18:27:57 Gareth Rees Ensure that the WIN32_LEAN_AND_MEAN is not changed by mpswin.h.