Bug #20338 | mysql.h #defines __WIN__ | ||
---|---|---|---|
Submitted: | 8 Jun 2006 11:25 | Modified: | 29 May 2013 16:44 |
Reporter: | Christopher Yeleighton (Candidate Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S3 (Non-critical) |
Version: | 5.0.23-BK, 5.0.21 | OS: | Windows (Microsoft Windows XP Professiona) |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | qc |
[8 Jun 2006 11:25]
Christopher Yeleighton
[8 Jun 2006 12:00]
Valeriy Kravchuk
Thank you for a problem report. __WIN__ is surely defined - verified with latest 5.0.23-BK sources. Let developers decide is it OK or not.
[29 Jun 2006 17:06]
Iggy Galarza
I believe this is not a bug because: #1. The cited reference (7.1.3) refers to identifiers defined in an implementation's library. Not all identifiers universally. #2. There is no explicit limit placed on Macro idenifiers. Please see section 6.10 (Macro name definition) and 6.4.2 (Identifer definition).
[30 Jun 2006 7:34]
Christopher Yeleighton
I have the impression that if rule 7.1.3 applied to the identifiers actually defined by the compiler vendor, you still cannot define any such identifier because if you do you risk incompatibility with some compiler vendor that happens to define your identifier. The documentation of sections 6.10 and 6.4.2 seems incomplete without the statement of section 7.1.3: if a program defines a reserved identifier as a macro name, the behavior is undefined.
[30 Jun 2006 7:47]
Christopher Yeleighton
An in-depth discussion of this problem is avaliable at the C FAQ: <http://c-faq.com/decl/namespace.html>
[11 Oct 2006 8:20]
Sergei Golubchik
Not a bug. mysql.h does not define a name for internal use, it defines __WIN__ precisely to affect VC++ compilation
[11 Oct 2006 11:22]
Christopher Yeleighton
Regardless of what you want to affect, only the compiler vendor is allowed to define such a symbol. And Visual C++ does not require this symbol to be defined by client code.
[29 May 2013 16:44]
Paul DuBois
Noted in 5.7.2 changelog. mysql.h no longer defines __WIN__ on Windows, and the MySQL sources have been changed to test for _WIN32 instead.