[pywin32-bugs] [ pywin32-Patches-956091 ] minimal platform portability patch for odbc.cpp
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2004-05-18 17:37:23
|
Patches item #956091, was opened at 2004-05-18 17:37 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=956091&group_id=78018 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jon Willeke (willeke) Assigned to: Nobody/Anonymous (nobody) Summary: minimal platform portability patch for odbc.cpp Initial Comment: This is the first of three patches addressing bug #955432. It is a minimal patch to allow odbc.cpp to be compiled by GNU g++ on Linux. Since the three patches don't apply cleanly on top of each other, I'm also attaching a complete patch. The first change conditions the inclusion of windows.h on MS_WINDOWS, which is defined in pyconfig.h (included by Python.h). The second change defines NOMINMAX within the MS_WINDOWS condition, to inhibit the definition of the Visual C++-specific max() macro. The third change defines a max() function. I did this, rather than use the max template function, in anticipation of making the module C compatible. The fourth change replaces NULL with 0, where the function returns int. The fifth change fixes the use of Visual C++-specific for-loop scoping. The final change replaces extern "C" __declspec with PyMODINIT_FUNC. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=956091&group_id=78018 |