This is an automated email from the ASF dual-hosted git repository. leginee pushed a commit to branch win10-msvc-trunk in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit acc8975175be8cd1d880c4923faccfc92d1912d9 Author: Peter Kovacs <[email protected]> AuthorDate: Fri Aug 21 17:48:27 2026 +0200 ado: take the ADO interfaces from adoint_Backcompat.h on a modern SDK AResultSet.cxx(277): error C2065: 'PositionEnum_Param': undeclared A modern Windows SDK ships the ADO interfaces twice. adoint.h has dropped the <Enum>_Param typedefs; adoint_Backcompat.h keeps them. Platform SDK v7.0 had them in adoint.h itself: #ifdef _WIN64 typedef LONGLONG PositionEnum_Param; #else typedef PositionEnum PositionEnum_Param; #endif INSTEAD OF, not in addition to, and that is the whole trick. Both files open with #ifndef _ADOINT_H_ so whichever is included second is skipped in its entirety. Adding the back-compat header after adoint.h reads correctly, compiles, and changes nothing -- which is exactly what the first attempt here did. The two declare the same interfaces (ADOConnection, ADORecordset, ADOCommand and the rest); only the typedefs differ. Gated on _MSC_VER rather than __has_include: that is C++17 and this build is /std:c++14, so the test silently never fired -- the second thing that made this look fixed when it was not. On this branch a UCRT-era compiler always pairs with the Windows 10 SDK, and VC9 with one whose adoint.h still has the typedefs, so the compiler generation is a sound proxy for the SDK here. Surfaced by trunk splitting precompiled_connectivity.hxx into per-library headers, which changed what this translation unit sees. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W7pjcp2sXU1HaUwXT7kc29 --- main/connectivity/source/inc/ado/Awrapado.hxx | 23 +++++++++++++++++++++++ main/connectivity/source/inc/ado/Awrapadox.hxx | 23 +++++++++++++++++++++++ main/connectivity/source/inc/ado/WrapColumn.hxx | 23 +++++++++++++++++++++++ 3 files changed, 69 insertions(+) diff --git a/main/connectivity/source/inc/ado/Awrapado.hxx b/main/connectivity/source/inc/ado/Awrapado.hxx index e5ae8eb4a1..54704384e7 100644 --- a/main/connectivity/source/inc/ado/Awrapado.hxx +++ b/main/connectivity/source/inc/ado/Awrapado.hxx @@ -29,7 +29,30 @@ #include "ado_pre_sys_include.h" #include <oledb.h> #include <ocidl.h> +// A modern Windows SDK ships the ADO interfaces twice: adoint.h, which has +// dropped the <Enum>_Param typedefs, and adoint_Backcompat.h, which keeps +// them. This driver uses PositionEnum_Param, so it needs the latter: +// +// AResultSet.cxx(277): error C2065: 'PositionEnum_Param': undeclared +// +// INSTEAD OF and not in addition to. Both files open with +// +// #ifndef _ADOINT_H_ +// +// so whichever is included second is skipped entirely -- adding the +// back-compat header after adoint.h looks right and does exactly nothing. +// The two declare the same interfaces (ADOConnection, ADORecordset, ...); +// only the typedefs differ. +// +// Gated on the compiler generation rather than __has_include, which is C++17 +// and this build is /std:c++14. On this branch a UCRT-era compiler always +// pairs with the Windows 10 SDK, and VC9 always with an SDK whose adoint.h +// still carries the typedefs itself. +#if defined(_MSC_VER) && _MSC_VER >= 1900 +#include <adoint_Backcompat.h> +#else #include <adoint.h> +#endif #include "ado_post_sys_include.h" diff --git a/main/connectivity/source/inc/ado/Awrapadox.hxx b/main/connectivity/source/inc/ado/Awrapadox.hxx index 80f01eea30..4b568bfd8c 100644 --- a/main/connectivity/source/inc/ado/Awrapadox.hxx +++ b/main/connectivity/source/inc/ado/Awrapadox.hxx @@ -58,7 +58,30 @@ typedef struct _ADOTable Table; #include "ado_pre_sys_include.h" +// A modern Windows SDK ships the ADO interfaces twice: adoint.h, which has +// dropped the <Enum>_Param typedefs, and adoint_Backcompat.h, which keeps +// them. This driver uses PositionEnum_Param, so it needs the latter: +// +// AResultSet.cxx(277): error C2065: 'PositionEnum_Param': undeclared +// +// INSTEAD OF and not in addition to. Both files open with +// +// #ifndef _ADOINT_H_ +// +// so whichever is included second is skipped entirely -- adding the +// back-compat header after adoint.h looks right and does exactly nothing. +// The two declare the same interfaces (ADOConnection, ADORecordset, ...); +// only the typedefs differ. +// +// Gated on the compiler generation rather than __has_include, which is C++17 +// and this build is /std:c++14. On this branch a UCRT-era compiler always +// pairs with the Windows 10 SDK, and VC9 always with an SDK whose adoint.h +// still carries the typedefs itself. +#if defined(_MSC_VER) && _MSC_VER >= 1900 +#include <adoint_Backcompat.h> +#else #include <adoint.h> +#endif #include <adoctint.h> #include "ado_post_sys_include.h" diff --git a/main/connectivity/source/inc/ado/WrapColumn.hxx b/main/connectivity/source/inc/ado/WrapColumn.hxx index b4b870869b..6341f631ce 100644 --- a/main/connectivity/source/inc/ado/WrapColumn.hxx +++ b/main/connectivity/source/inc/ado/WrapColumn.hxx @@ -26,7 +26,30 @@ #include "ado/Aolewrap.hxx" #include "ado_pre_sys_include.h" +// A modern Windows SDK ships the ADO interfaces twice: adoint.h, which has +// dropped the <Enum>_Param typedefs, and adoint_Backcompat.h, which keeps +// them. This driver uses PositionEnum_Param, so it needs the latter: +// +// AResultSet.cxx(277): error C2065: 'PositionEnum_Param': undeclared +// +// INSTEAD OF and not in addition to. Both files open with +// +// #ifndef _ADOINT_H_ +// +// so whichever is included second is skipped entirely -- adding the +// back-compat header after adoint.h looks right and does exactly nothing. +// The two declare the same interfaces (ADOConnection, ADORecordset, ...); +// only the typedefs differ. +// +// Gated on the compiler generation rather than __has_include, which is C++17 +// and this build is /std:c++14. On this branch a UCRT-era compiler always +// pairs with the Windows 10 SDK, and VC9 always with an SDK whose adoint.h +// still carries the typedefs itself. +#if defined(_MSC_VER) && _MSC_VER >= 1900 +#include <adoint_Backcompat.h> +#else #include <adoint.h> +#endif #include "ado_post_sys_include.h" namespace connectivity
