Ok. I have decided to use:
#if defined(sun) && if defined(sparc) && !defined(__svr4)
instead of defined(sunos4). interfaces/libpq/libpq-fe.h and
include/c.h have been modified(see included patches).
Another porblems I have found are:
o SunOS lacks strtoul(). to fix this I stole strtoul.c from FreeBSD
and place it under backend/port. necessary modifications have been
also made to backend/port/Makefile.in, include/config.h.in and
configure.in (see included patches).
I've completed the patch to fix the protocol and authentication issues I
was discussing a couple of weeks ago. The particular changes are:
- the protocol has a version number
- network byte order is used throughout
- the pg_hba.conf file is used to specify what method is used to
authenticate a frontend (either password, ident, trust, reject, krb4
or krb5)
- support for multiplexed backends is removed
- appropriate changes to man pages
- the -a switch to many programs to specify an authentication service
no longer has any effect
- the libpq.so version number has changed to 1.1
The new backend still supports the old protocol so old interfaces won't
break.
#define StrNCpy(dst,src,len) \
(strncpy((dst),(src),(len)),(len > 0) ? *((dst)+(len)-1)='\0' : \
NULL,(void)(dst))
^^^^^^ - to avoid "value computed is not used" from gcc
in ma-a-any places (should to fix thouse places instead, but ...
time)
config.h.in:
/*
* TBL_FREE_CMD_MEMORY: free memory allocated for an user query inside
* transaction block after this query is done.
*/
#define TBL_FREE_CMD_MEMORY
- this is default now.