Postgres 4.0 needs some fixes. The files src/utils/adt/geo-ops.c and src/lib/libpq/fe-pqexec.c need to be replaced in the postgres distribution. The replacements are in this directory.