[Python-Dev] Who understands _ssl.c on Windows? (original) (raw)

Georg Brandl g.brandl at gmx.net
Sat Apr 8 10:26:59 CEST 2006


Michael Hudson wrote:

"Tim Peters" <tim.peters at gmail.com> writes:

Perhaps it's the case that doubles are aligned to an 8-byte boundary when socketmodule.c is compiled, but (for some unknown reason) only to a 4-byte boundary when ssl.c is compiled. Although that seems to match the details in the bug report, I have no theory for how that could happen (I don't see any MS packing pragmas anywhere). Well, poking a bit reveals that ssl and socket are built by quite different mechanisms: socket by a .vcproj but ssl by "ssl.mak". I don't see anything overly suspicious in ssl.mak, but I don't really know much about Windows compiler options...

A mailing list post found via Google suggests that Visual Studio automatically sets the struct member alignment to 4 bytes when building via old .mak files, for compatibility with older VC++.

Anyway, a /Zp8 flag should correct this.

Georg



More information about the Python-Dev mailing list