You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
postgres/src/port
Bruce Momjian 399a36a75d Prepare code to be built by MSVC: 20 years ago
..
Makefile Build server libpgport with all non-FRONTEND object files. This is to 20 years ago
README Darin -> Darwin. 20 years ago
copydir.c Update copyright for 2006. Update scripts. 20 years ago
crypt.c Add CVS tag lines to files that were lacking them. 20 years ago
dirent.c Prepare code to be built by MSVC: 20 years ago
dirmod.c Update copyright for 2006. Update scripts. 20 years ago
exec.c Prepare code to be built by MSVC: 20 years ago
fseeko.c Update copyright for 2006. Update scripts. 20 years ago
getaddrinfo.c Prepare code to be built by MSVC: 20 years ago
gethostname.c Update copyright for 2006. Update scripts. 20 years ago
getopt.c Add CVS tag lines to files that were lacking them. 20 years ago
getopt_long.c Standard pgindent run for 8.1. 21 years ago
getrusage.c Update copyright for 2006. Update scripts. 20 years ago
gettimeofday.c > gettimeofday.c:35: warning: integer constant is too large for "long" 20 years ago
inet_aton.c Prepare code to be built by MSVC: 20 years ago
isinf.c Update copyright for 2006. Update scripts. 20 years ago
kill.c Update copyright for 2006. Update scripts. 20 years ago
memcmp.c Update copyright for 2006. Update scripts. 20 years ago
noblock.c Update copyright for 2006. Update scripts. 20 years ago
open.c Update copyright for 2006. Update scripts. 20 years ago
path.c Update copyright for 2006. Update scripts. 20 years ago
pgsleep.c Update copyright for 2006. Update scripts. 20 years ago
pgstrcasecmp.c Update copyright for 2006. Update scripts. 20 years ago
pipe.c Update copyright for 2006. Update scripts. 20 years ago
qsort.c Improve performance of our private version of qsort. Per recent testing, 20 years ago
rand.c Fix broken lrand48() implementation, per Merlin Moncure. 21 years ago
random.c Update copyright for 2006. Update scripts. 20 years ago
rint.c $Header: -> $PostgreSQL Changes ... 22 years ago
snprintf.c Document return-value conventions used by this implementation, per 20 years ago
sprompt.c Update copyright for 2006. Update scripts. 20 years ago
srandom.c Update copyright for 2006. Update scripts. 20 years ago
strdup.c Update copyright for 2006. Update scripts. 20 years ago
strerror.c Fix a whole bunch of #includes that were either wrong or redundant. 21 years ago
strtol.c Update copyright for 2006. Update scripts. 20 years ago
strtoul.c Fix a whole bunch of #includes that were either wrong or redundant. 21 years ago
thread.c Prepare code to be built by MSVC: 20 years ago
unsetenv.c Update copyright for 2006. Update scripts. 20 years ago
win32.ico Add as binary mode 22 years ago
win32error.c Prepare code to be built by MSVC: 20 years ago
win32ver.rc Update copyright for 2006. Update scripts. 20 years ago

README

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.