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
Tom Lane 48e4b8dc08 Fix typo in pg_srand48 (srand48 in older branches). 15 years ago
..
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 15 years ago
Makefile Make pgbench use erand48() rather than random(). 15 years ago
README Remove cvs keywords from all files. 16 years ago
chklocale.c Fix MinGW build, broken by my previous patch to add a setlocale() wrapper 15 years ago
crypt.c pgindent run before PG 9.1 beta 1. 15 years ago
dirent.c Avoid including postgres.h in frontend compiles of src/port. 15 years ago
dirmod.c pgindent run before PG 9.1 beta 1. 15 years ago
erand48.c Fix typo in pg_srand48 (srand48 in older branches). 15 years ago
exec.c Use consistent format for reporting GetLastError() 15 years ago
fseeko.c Stamp copyrights for year 2011. 15 years ago
getaddrinfo.c pgindent run before PG 9.1 beta 1. 15 years ago
gethostname.c Stamp copyrights for year 2011. 15 years ago
getopt.c Pgindent run before 9.1 beta2. 15 years ago
getopt_long.c Remove optreset from src/port/ implementations of getopt and getopt_long. 15 years ago
getpeereid.c Pgindent run before 9.1 beta2. 15 years ago
getrusage.c Stamp copyrights for year 2011. 15 years ago
gettimeofday.c Remove cvs keywords from all files. 16 years ago
inet_aton.c Remove cvs keywords from all files. 16 years ago
inet_net_ntop.c Pgindent run before 9.1 beta2. 15 years ago
isinf.c Stamp copyrights for year 2011. 15 years ago
kill.c Stamp copyrights for year 2011. 15 years ago
memcmp.c Stamp copyrights for year 2011. 15 years ago
noblock.c Pgindent run before 9.1 beta2. 15 years ago
open.c Stamp copyrights for year 2011. 15 years ago
path.c Add \ir command to psql. 15 years ago
pgcheckdir.c Stamp copyrights for year 2011. 15 years ago
pgmkdirp.c pgindent run before PG 9.1 beta 1. 15 years ago
pgsleep.c Stamp copyrights for year 2011. 15 years ago
pgstrcasecmp.c Fix up handling of C/POSIX collations. 15 years ago
pthread-win32.h Remove cvs keywords from all files. 16 years ago
qsort.c Remove cvs keywords from all files. 16 years ago
qsort_arg.c Remove cvs keywords from all files. 16 years ago
random.c Make pgbench use erand48() rather than random(). 15 years ago
rint.c Remove cvs keywords from all files. 16 years ago
snprintf.c pgindent run before PG 9.1 beta 1. 15 years ago
sprompt.c Stamp copyrights for year 2011. 15 years ago
srandom.c Make pgbench use erand48() rather than random(). 15 years ago
strdup.c Stamp copyrights for year 2011. 15 years ago
strerror.c Remove cvs keywords from all files. 16 years ago
strlcat.c Remove cvs keywords from all files. 16 years ago
strlcpy.c Stamp copyrights for year 2011. 15 years ago
strtol.c Stamp copyrights for year 2011. 15 years ago
strtoul.c Remove cvs keywords from all files. 16 years ago
thread.c Stamp copyrights for year 2011. 15 years ago
unsetenv.c pgindent run before PG 9.1 beta 1. 15 years ago
win32.ico Add as binary mode 22 years ago
win32env.c Stamp copyrights for year 2011. 15 years ago
win32error.c Avoid including postgres.h in frontend compiles of src/port. 15 years ago
win32setlocale.c Fix MinGW build, broken by my previous patch to add a setlocale() wrapper 15 years ago
win32ver.rc Stamp HEAD as 9.2devel. 15 years ago

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.