1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-21 10:42:50 +03:00
Files
postgres/src/port
Robert Haas d7f51b2c49 Move copydir.c from src/port to src/backend/storage/file
The previous commit to make copydir() interruptible prevented
postgres.exe from linking on MinGW and Cygwin, because on those
platforms libpgport_srv.a can't freely reference symbols defined
by the backend.  Since that code is already backend-specific anyway,
just move the whole file into the backend rather than adding further
kludges to deal with the symbols needed by CHECK_FOR_INTERRUPTS().

This probably needs some further cleanup, but this commit just moves
the file as-is, which should hopefully be enough to turn the
buildfarm green again.
2010-07-02 17:03:38 +00:00
..
2009-02-10 19:29:39 +00:00
2009-01-01 17:24:05 +00:00
2009-01-01 17:24:05 +00:00
2009-01-01 17:24:05 +00:00
2009-01-01 17:24:05 +00:00
2009-01-01 17:24:05 +00:00
2009-01-01 17:24:05 +00:00
2009-01-01 17:24:05 +00:00
2009-01-01 17:24:05 +00:00
2009-01-01 17:24:05 +00:00
2009-01-01 17:24:05 +00:00
2008-03-21 13:23:29 +00:00
2003-11-29 19:52:15 +00:00
2009-01-01 17:24:05 +00:00
2009-01-01 17:24:05 +00:00
2009-01-01 17:24:05 +00:00
2009-01-01 17:24:05 +00:00
2009-01-14 21:18:30 +00:00
2009-01-01 17:24:05 +00:00
2004-10-07 13:59:45 +00:00
2009-01-01 17:24:05 +00:00
2010-05-14 03:20:06 +00:00

$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.