I've made a patch against PostgreSQL 7.4.3 to be able to compile 'libpq' and 'psql' with Digital Mars C++.
As Digital Mars C++ doesn't support 'popen()' and 'pclose()' calls yet, I was in need to patch some psql .c files to let them work well with the Digital Mars C++ port.
One can apply the patch doing:
tar xzf postgresql-7.4.3.tar.gz cd postgresql-7.4.3 patch -p1 <pgsql-7.4.3-dmc.patch
Maybe someone can put this patch in the postgresql source distribution somewhere?