[SERVER-1258] Do not redefine _WIN32 Created: 19/Jun/10  Updated: 12/Jul/16  Resolved: 13/Jul/10

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 1.5.5

Type: Bug Priority: Critical - P2
Reporter: Johannes Wienke Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7, 32 Bit


Operating System: Windows
Participants:

 Description   

Current nightly build e72597e.

pch.h redefines _WIN32:

#if defined(WIN32)
// so you don't have to define this yourself as the code seems to use it...
#undef _WIN32
#define _WIN32
#endif

_WIN32 is a reserved symbol and should never be changes. This breaks e.g. compilation of Intels threading building blocks because they expect it to be defined as a number.

See:
http://predef.sourceforge.net/preos.html
http://stackoverflow.com/questions/228783/what-are-the-rules-about-using-an-underscore-in-a-c-identifier



 Comments   
Comment by auto [ 13/Jul/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: don't undef _WIN32 SERVER-1258
http://github.com/mongodb/mongo/commit/22653fdefeea36317cbe2557b9cb039e64512ce6

Generated at Thu Feb 08 02:56:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.