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
Peter Eisentraut 3420b241a7 Fix dependency tracking for src/port/%_srv.o files 14 years ago
..
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 15 years ago
Makefile Fix dependency tracking for src/port/%_srv.o files 14 years ago
README Remove cvs keywords from all files. 15 years ago
chklocale.c Update copyright notices for year 2012. 14 years ago
crypt.c pgindent run before PG 9.1 beta 1. 15 years ago
dirent.c Update copyright notices for year 2012. 14 years ago
dirmod.c Update copyright notices for year 2012. 14 years ago
erand48.c Fix typo in pg_srand48 (srand48 in older branches). 15 years ago
exec.c Remove now redundant pgpipe code. 14 years ago
fls.c Fix typo in comment. 14 years ago
fseeko.c Remove BSD/OS (BSDi) port. There are no known users upgrading to 14 years ago
getaddrinfo.c Update copyright notices for year 2012. 14 years ago
gethostname.c Update copyright notices for year 2012. 14 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 Update copyright notices for year 2012. 14 years ago
getrusage.c Kill some remaining references to SVR4 and univel. 14 years ago
gettimeofday.c Remove cvs keywords from all files. 15 years ago
inet_aton.c Remove cvs keywords from all files. 15 years ago
inet_net_ntop.c Pgindent run before 9.1 beta2. 15 years ago
isinf.c Update copyright notices for year 2012. 14 years ago
kill.c Update copyright notices for year 2012. 14 years ago
memcmp.c Update copyright notices for year 2012. 14 years ago
noblock.c Update copyright notices for year 2012. 14 years ago
open.c Update copyright notices for year 2012. 14 years ago
path.c Use abort() instead of exit() to abort library functions 14 years ago
pg_crc.c Move CRC tables to libpgport, and provide them in a separate include file. 14 years ago
pgcheckdir.c Update copyright notices for year 2012. 14 years ago
pgmkdirp.c pgindent run before PG 9.1 beta 1. 15 years ago
pgsleep.c Update copyright notices for year 2012. 14 years ago
pgstrcasecmp.c Update copyright notices for year 2012. 14 years ago
pthread-win32.h Remove cvs keywords from all files. 15 years ago
qsort.c Speed up in-memory tuplesorting. 14 years ago
qsort_arg.c Speed up in-memory tuplesorting. 14 years ago
random.c Update copyright notices for year 2012. 14 years ago
rint.c Remove cvs keywords from all files. 15 years ago
snprintf.c pgindent run before PG 9.1 beta 1. 15 years ago
sprompt.c Update copyright notices for year 2012. 14 years ago
srandom.c Update copyright notices for year 2012. 14 years ago
strerror.c Remove cvs keywords from all files. 15 years ago
strlcat.c Remove cvs keywords from all files. 15 years ago
strlcpy.c Update copyright notices for year 2012. 14 years ago
thread.c Update copyright notices for year 2012. 14 years ago
unsetenv.c Update copyright notices for year 2012. 14 years ago
win32.ico Revert binary change in copyright year adjustment. 14 years ago
win32env.c Update copyright notices for year 2012. 14 years ago
win32error.c Update copyright notices for year 2012. 14 years ago
win32setlocale.c Update copyright notices for year 2012. 14 years ago
win32ver.rc Update copyright notices for year 2012. 14 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.