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 9af4159fce pgindent run for release 9.3 12 years ago
..
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 15 years ago
Makefile Move pqsignal() to libpgport. 13 years ago
README Remove cvs keywords from all files. 15 years ago
chklocale.c Enable building with Microsoft Visual Studio 2012. 13 years ago
crypt.c pgindent run before PG 9.1 beta 1. 15 years ago
dirent.c Update copyrights for 2013 13 years ago
dirmod.c Create libpgcommon, and move pg_malloc et al to it 13 years ago
erand48.c Run pgindent on 9.2 source tree in preparation for first 9.3 13 years ago
exec.c Add support for piping COPY to/from an external program. 13 years ago
fls.c Update copyrights for 2013 13 years ago
fseeko.c Update copyrights for 2013 13 years ago
getaddrinfo.c Update copyrights for 2013 13 years ago
gethostname.c Update copyrights for 2013 13 years ago
getopt.c Pgindent run before 9.1 beta2. 14 years ago
getopt_long.c Remove optreset from src/port/ implementations of getopt and getopt_long. 15 years ago
getpeereid.c Update copyrights for 2013 13 years ago
getrusage.c Update copyrights for 2013 13 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. 14 years ago
isinf.c Update copyrights for 2013 13 years ago
kill.c Update copyrights for 2013 13 years ago
memcmp.c Update copyrights for 2013 13 years ago
noblock.c Update copyrights for 2013 13 years ago
open.c Update copyrights for 2013 13 years ago
path.c Update copyrights for 2013 13 years ago
pg_crc.c Update copyrights for 2013 13 years ago
pgcheckdir.c pgindent run for release 9.3 12 years ago
pgmkdirp.c pgindent run before PG 9.1 beta 1. 15 years ago
pgsleep.c Update copyrights for 2013 13 years ago
pgstrcasecmp.c Update copyrights for 2013 13 years ago
pqsignal.c pgindent run for release 9.3 12 years ago
pthread-win32.h Remove cvs keywords from all files. 15 years ago
qsort.c Make new event trigger facility actually do something. 13 years ago
qsort_arg.c Speed up in-memory tuplesorting. 14 years ago
quotes.c Add standard file header comment to quotes.c. 13 years ago
random.c Update copyrights for 2013 13 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 pgindent run for release 9.3 12 years ago
srandom.c Update copyrights for 2013 13 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 copyrights for 2013 13 years ago
tar.c Move tar function headers to pgtar.h 13 years ago
thread.c Update copyrights for 2013 13 years ago
unsetenv.c Update copyrights for 2013 13 years ago
wait_error.c pgindent run for release 9.3 12 years ago
win32.ico Revert binary change in copyright year adjustment. 14 years ago
win32env.c Enable building with Microsoft Visual Studio 2012. 13 years ago
win32error.c Update copyrights for 2013 13 years ago
win32setlocale.c Update copyrights for 2013 13 years ago
win32ver.rc Update copyrights for 2013 13 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.