symbol name clash with libpq.so

From: Martin Münstermann <mmuenstermann(at)betrusted(dot)com>
To: psql-general(at)postgresql(dot)org
Subject: symbol name clash with libpq.so
Date: 2004-09-03 11:17:47
Message-ID: 413852DB.9060601@betrusted.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

after linking my database client application with a crypto library (as
shared library), I noticed that I couldn't connect to postgresql any
longer. Error message was "Password authentication failed".

After some time I found out that the issue was caused by both the crypto
library and libpq.so defining the symbol md5_hash.
After renaming the function name, the error went away.

Wouldn't it be a good idea to have all exported symbols in libpq.so
carry a postgres related prefix like 'PQ', 'pq', or 'pg_'? This way
symbol name clashes would become less probable.

Symbols in question (in this case for postgresql 8beta1) include:
EncryptMD5, SockAddr_cidr_mask, check_sigpipe_handler, freeaddrinfo_all,
getaddrinfo_all, getnameinfo_all, md5_hash, promote_v4_to_v6_addr,
promote_v4_to_v6_mask, rangeSockAddr, set_noblock.

Maybe not all of these functions need to be exported anyway?

Regards,
Martin

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Amiel 2004-09-03 12:41:30 Re: postgres "on in the internet"
Previous Message Oliver Fromme 2004-09-03 11:09:30 Re: pgAccess via ssh?