Skip to content
  • Jon Olav Hauglid's avatar
    cec19051
    Bug#11745828: MYSQL.H #DEFINES __WIN__ · cec19051
    Jon Olav Hauglid authored
    The problem was that we define __WIN__ when building on Windows.
    According to C/C++ standard:
    "All identifiers that begin with an underscore and either an uppercase
    letter or another underscore are always reserved for any use."
    Another problem was that we currently have a confusing mix of
    __WIN__ and _WIN32 checks.
    
    According to the MSDN documentation we always can use _WIN32.
    "Defined for applications for Win32 and Win64. Always defined."
    Since we don't support other Windows compilers, we can use _WIN32.
    
    Note that _WIN32 means 64 bit Windows as well, not just 32 bit.
    Where 32/64 bit checks are needed, we should use a combination of
    _WIN32 and _WIN64 checks.
    
    This patch removes  the __WIN__ define and replaces all usages by _WIN32.
    cec19051
    Bug#11745828: MYSQL.H #DEFINES __WIN__
    Jon Olav Hauglid authored
    The problem was that we define __WIN__ when building on Windows.
    According to C/C++ standard:
    "All identifiers that begin with an underscore and either an uppercase
    letter or another underscore are always reserved for any use."
    Another problem was that we currently have a confusing mix of
    __WIN__ and _WIN32 checks.
    
    According to the MSDN documentation we always can use _WIN32.
    "Defined for applications for Win32 and Win64. Always defined."
    Since we don't support other Windows compilers, we can use _WIN32.
    
    Note that _WIN32 means 64 bit Windows as well, not just 32 bit.
    Where 32/64 bit checks are needed, we should use a combination of
    _WIN32 and _WIN64 checks.
    
    This patch removes  the __WIN__ define and replaces all usages by _WIN32.
Loading