postgresql/src/port
Bruce Momjian ba11258ccb When reporting the server as not responding, if the hostname was
supplied, also print the IP address.  This allows IPv4 and IPv6 failures
to be distinguished.  Also useful when a hostname resolves to multiple
IP addresses.

Also, remove use of inet_ntoa() and use our own inet_net_ntop() in all
places, including in libpq, because it is thread-safe.
2010-11-24 17:04:19 -05:00
..
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
Makefile When reporting the server as not responding, if the hostname was 2010-11-24 17:04:19 -05:00
README Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
chklocale.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
crypt.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
dirent.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
dirmod.c Fix comparisons of pointers with zero to compare with NULL instead. 2010-10-29 15:51:52 -04:00
erand48.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
exec.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
fseeko.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
getaddrinfo.c When reporting the server as not responding, if the hostname was 2010-11-24 17:04:19 -05:00
gethostname.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
getopt.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
getopt_long.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
getrusage.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
gettimeofday.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
inet_aton.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
inet_net_ntop.c When reporting the server as not responding, if the hostname was 2010-11-24 17:04:19 -05:00
isinf.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
kill.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
memcmp.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
noblock.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
open.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
path.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
pgsleep.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
pgstrcasecmp.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
pipe.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
pthread-win32.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
qsort.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
qsort_arg.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
random.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
rint.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
snprintf.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
sprompt.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
srandom.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
strdup.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
strerror.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
strlcat.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
strlcpy.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
strtol.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
strtoul.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
thread.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
unsetenv.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
win32.ico Add as binary mode 2004-10-07 13:59:45 +00:00
win32env.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
win32error.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
win32ver.rc Stamp HEAD as 9.1devel. 2010-07-09 04:10:58 +00:00

README

src/port/README

libpgport
=========

libpgport must have special behavior.  It supplies functions to both
libraries and applications.  However, there are two complexities:

1)  Libraries need to use object files that are compiled with exactly
the same flags as the library.  libpgport might not use the same flags,
so it is necessary to recompile the object files for individual
libraries.  This is done by removing -lpgport from the link line:

        # Need to recompile any libpgport object files
        LIBS := $(filter-out -lpgport, $(LIBS))

and adding infrastructure to recompile the object files:

        OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \
                connect.o misc.o path.o exec.o \
                $(filter snprintf.o, $(LIBOBJS))

The problem is that there is no testing of which object files need to be
added, but missing functions usually show up when linking user
applications.

2) For applications, we use -lpgport before -lpq, so the static files
from libpgport are linked first.  This avoids having applications
dependent on symbols that are _used_ by libpq, but not intended to be
exported by libpq.  libpq's libpgport usage changes over time, so such a
dependency is a problem.  Win32, Linux, and Darwin use an export list to
control the symbols exported by libpq.