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
Magnus Hagander 206378e4ab Use CRITICAL_SECTION instead of Mutexes for thread-locking in libpq on 18 years ago
..
Makefile Added --htmldir option to pg_config, equivalent to the new configure option. 18 years ago
README More README src cleanups. 18 years ago
chklocale.c Update copyrights in source tree to 2008. 18 years ago
copydir.c Fix a number of places that were making file-type tests infelicitously. 18 years ago
crypt.c
dirent.c Update copyrights in source tree to 2008. 18 years ago
dirmod.c Fix rmtree() so that it keeps going after failure to remove any individual 18 years ago
exec.c Fix MinGW warnings re formats and unused variables. per ITAGAKI Takahiro 18 years ago
fseeko.c Update copyrights in source tree to 2008. 18 years ago
getaddrinfo.c Update copyrights in source tree to 2008. 18 years ago
gethostname.c Update copyrights in source tree to 2008. 18 years ago
getopt.c Remove advertising clause from Berkeley BSD-licensed files, per 19 years ago
getopt_long.c Remove advertising clause from Berkeley BSD-licensed files, per 19 years ago
getrusage.c Make the win32 implementation of getrusage() return EINVAL if being 18 years ago
gettimeofday.c
inet_aton.c Remove advertising clause from Berkeley BSD-licensed files, per 19 years ago
isinf.c Update copyrights in source tree to 2008. 18 years ago
kill.c Update copyrights in source tree to 2008. 18 years ago
memcmp.c Update copyrights in source tree to 2008. 18 years ago
noblock.c Update copyrights in source tree to 2008. 18 years ago
open.c Update copyrights in source tree to 2008. 18 years ago
path.c Added --htmldir option to pg_config, equivalent to the new configure option. 18 years ago
pgsleep.c Update copyrights in source tree to 2008. 18 years ago
pgstrcasecmp.c Update copyrights in source tree to 2008. 18 years ago
pipe.c Update copyrights in source tree to 2008. 18 years ago
pthread-win32.h Use CRITICAL_SECTION instead of Mutexes for thread-locking in libpq on 18 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 Add $PostgreSQL$ markers to a lot of files that were missing them. 18 years ago
random.c Update copyrights in source tree to 2008. 18 years ago
rint.c
snprintf.c Fix our printf implementation to follow spec: if a star parameter 18 years ago
sprompt.c Update copyrights in source tree to 2008. 18 years ago
srandom.c Update copyrights in source tree to 2008. 18 years ago
strdup.c Update copyrights in source tree to 2008. 18 years ago
strerror.c
strlcat.c Add $PostgreSQL$ markers to a lot of files that were missing them. 18 years ago
strlcpy.c Update copyrights in source tree to 2008. 18 years ago
strtol.c Add $PostgreSQL$ markers to a lot of files that were missing them. 18 years ago
strtoul.c Add $PostgreSQL$ markers to a lot of files that were missing them. 18 years ago
thread.c Don't pull in pthreads header files in this file because we never use them. 18 years ago
unsetenv.c Update copyrights in source tree to 2008. 18 years ago
win32.ico
win32error.c Update copyrights in source tree to 2008. 18 years ago
win32ver.rc Stamp HEAD as 8.4devel. 18 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.