Errors building on windows

From: Dave Cramer <davecramer(at)gmail(dot)com>
To: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Errors building on windows
Date: 2016-07-19 15:43:10
Message-ID: CADK3HHJxHHbbsrPF9tyXCz0bWRwSN8JLv7O_iKGM1GUT0VkKdA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

I am getting the following errors:

loadlib.c(114): error C2373: '__pfnDliFailureHook2': redefinition;
different type modifiers
C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\INCLUDE\delayimp.h(141): note: see declaration of '__pfnDliFailur
eHook2'
loadlib.c(115): error C2373: '__pfnDliNotifyHook2': redefinition; different
type modifiers
C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\INCLUDE\delayimp.h(134): note: see declaration of '__pfnDliNotify
Hook2'
loadlib.c(129): error C2166: l-value specifies const object
loadlib.c(190): error C2166: l-value specifies const object
loadlib.c(198): error C2166: l-value specifies const object
loadlib.c(229): error C2166: l-value specifies const object
loadlib.c(237): error C2166: l-value specifies const object

Which appear to be from:

// Prior to Visual Studio 2015 Update 3, these hooks were non-const. They
were
// made const to improve security (global, writable function pointers are
bad).
// If for backwards compatibility you require the hooks to be writable,
define
// the macro DELAYIMP_INSECURE_WRITABLE_HOOKS prior to including this
header and
// provide your own non-const definition of the hooks.
ExternC
#ifndef DELAYIMP_INSECURE_WRITABLE_HOOKS
const
#endif
PfnDliHook __pfnDliNotifyHook2;

// This is the failure hook, dliNotify = {dliFailLoadLib|dliFailGetProc}
ExternC
#ifndef DELAYIMP_INSECURE_WRITABLE_HOOKS
const
#endif
PfnDliHook __pfnDliFailureHook2;

It would appear we need to define DELAYIMP_INSECURE_WRITABLE_HOOKS. Is
there another way to set the hook to NULL

Dave Cramer

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Dave Cramer 2016-07-19 21:09:46 How can I run installcheck using powershell ?
Previous Message krayner 2016-07-19 14:00:27 BUG #14260: psqlODBC does not support sslXXXXX variables