Implementations are guarded by native function pointer checks but all functions
have been present in libodbc for a very long time, so it doesn't appear to be
needed anymore.
The loading code checks the LIB_ODBC_DRIVER_MANAGER environment variable to
allow the user to override the system version of the library. This can be
achieved by other means, if it's still needed.
Clang enables -Wenum-conversion by default anyway, we add it to CFLAGS to enable them on GCC.
When explicitly enabled, Clang also enables additional warnings. Some of those warnings, like
-Wenum-enum-conversion, are too strict to be practical with win32, so avoid enabling them.
autoconf 2.72 disabled the time size increase when LARGEFILE macro is being
used: https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=cf09f48841b66fe76f606dd6018bb3a93242a7c9
That change can cause 32-bit Wine to return EOVERFLOW when running
stat() on a file in certain edge cases (which causes some files to
be skipped leading to applications failing to run properly).
This change was tested with both autoconf 2.71 and 2.72 to make sure
nothing broke there.
gcc currently assumes the stack alignment for i686-w64-mingw32 is 16, which is
essentially wrong. It works around this in most cases by applying -mstackrealign
when SSE is in use. However, this doesn't address the case of manually aligned
types (i.e. DECLSPEC_ALIGN), and it also for some reason doesn't seem to apply
when -mavx512f is in use, which seems to be an independent gcc bug.
The correct solution on the gcc end is not to assume that the stack is 4-byte
aligned. -mpreferred-stack-boundary=2 achieves exactly this, and there is motion
upstream to address this by effectively making this setting the default. Since
this will take time to propagate downstream, though, it seems prudent to address
this bug locally by essentially applying the same fix downstream.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55007
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55899