Magnus Hagander wrote:
>>>The officially sanctioned function for this is now
>>
>>PQencryptPassword()
>>
>>>in libpq. Please consider using it when available.
>>
>>Ok, we'll use it ASAP. But how to detect if it's available or
>>not? Some #define PQENCRYPT_AVAILABLE 1 would be helpful.
>
>
> You're going to have to detect this at runtime, aren't you? With that,
> GetProcAddress() on win32 and whatever it's called on *nix should be the
> way to go?
We need this at compile time, to check if the prototype is present. If
it is, the function should be present in the lib we're linking to as
well. IFAIR there was consense some weeks ago that libpq should be
versioned on win32 too, so a libpq dev environment should have a
libpq.lib that references libpq-82.dll (or newer). On *ix, standard lib
versioning will do the job.
Regards,
Andreas