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
Robert Haas d7f51b2c49 Move copydir.c from src/port to src/backend/storage/file 16 years ago
..
Makefile Move copydir.c from src/port to src/backend/storage/file 16 years ago
README More README src cleanups. 18 years ago
chklocale.c Support for KOI8U encoding 17 years ago
crypt.c 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 17 years ago
dirent.c Update copyright for 2009. 17 years ago
dirmod.c Don't error out if recycling or removing an old WAL segment fails at the end 17 years ago
exec.c Add inheritable ACE when creating a restricted token for execution on 16 years ago
fseeko.c Update copyright for 2009. 17 years ago
getaddrinfo.c Update copyright for 2009. 17 years ago
gethostname.c Update copyright for 2009. 17 years ago
getopt.c 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 17 years ago
getopt_long.c 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 17 years ago
getrusage.c 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 17 years ago
gettimeofday.c > gettimeofday.c:35: warning: integer constant is too large for "long" 20 years ago
inet_aton.c Remove advertising clause from Berkeley BSD-licensed files, per 19 years ago
isinf.c Update copyright for 2009. 17 years ago
kill.c Loop calling CallNamedPipe() several times in case it fails, 17 years ago
memcmp.c Update copyright for 2009. 17 years ago
noblock.c Update copyright for 2009. 17 years ago
open.c 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 17 years ago
path.c 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 17 years ago
pgsleep.c Update copyright for 2009. 17 years ago
pgstrcasecmp.c Update copyright for 2009. 17 years ago
pipe.c 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 17 years ago
pthread-win32.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 17 years ago
qsort.c Code cleanup for function prototypes: change two K&R-style prototypes 19 years ago
qsort_arg.c Code cleanup for function prototypes: change two K&R-style prototypes 19 years ago
rand.c 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 17 years ago
random.c Update copyright for 2009. 17 years ago
rint.c
snprintf.c Fix our printf implementation to follow spec: if a star parameter 18 years ago
sprompt.c Update copyright for 2009. 17 years ago
srandom.c Update copyright for 2009. 17 years ago
strdup.c Update copyright for 2009. 17 years ago
strerror.c
strlcat.c 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 17 years ago
strlcpy.c Update copyright for 2009. 17 years ago
strtol.c 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 17 years ago
strtoul.c 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 17 years ago
thread.c Remove empty #ifdef block. 17 years ago
unsetenv.c Update copyright for 2009. 17 years ago
win32.ico
win32env.c Make the win32 putenv() override update *all* present versions of the 16 years ago
win32error.c Update copyright for 2009. 17 years ago
win32ver.rc tag 8.4.4 16 years ago

README

$PostgreSQL: pgsql/src/port/README,v 1.4 2008/03/21 13:23:29 momjian Exp $

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.