• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.gitignoreH A D08-Nov-202149 43

MakefileH A D08-Nov-20213.8 KiB11550

READMEH A D08-Nov-20211.3 KiB3324

chklocale.cH A D08-Nov-202110.7 KiB458290

crypt.cH A D08-Nov-202129.6 KiB1,089699

dirent.cH A D08-Nov-20212.4 KiB12492

dirmod.cH A D08-Nov-20219.6 KiB408264

erand48.cH A D08-Nov-20214.3 KiB14269

fls.cH A D08-Nov-20212.3 KiB6511

fseeko.cH A D08-Nov-20211.5 KiB8549

getaddrinfo.cH A D08-Nov-20219 KiB414276

getopt.cH A D08-Nov-20214.2 KiB13776

getopt_long.cH A D08-Nov-20215.1 KiB219141

getpeereid.cH A D08-Nov-20211.8 KiB8151

getrusage.cH A D08-Nov-20212.6 KiB11173

gettimeofday.cH A D08-Nov-20214.1 KiB12033

inet_aton.cH A D08-Nov-20214 KiB15078

inet_net_ntop.cH A D08-Nov-20217 KiB298191

isinf.cH A D08-Nov-20211.2 KiB7854

kill.cH A D08-Nov-20211.9 KiB9863

mkdtemp.cH A D08-Nov-20217.6 KiB294165

noblock.cH A D08-Nov-20211.4 KiB6734

open.cH A D08-Nov-20215.3 KiB200129

path.cH A D08-Nov-202120.2 KiB909501

pg_crc32c_armv8.cH A D08-Nov-20211.5 KiB7647

pg_crc32c_armv8_choose.cH A D08-Nov-20212.4 KiB9647

pg_crc32c_sb8.cH A D08-Nov-202152.9 KiB1,1701,118

pg_crc32c_sse42.cH A D08-Nov-20211.5 KiB7034

pg_crc32c_sse42_choose.cH A D08-Nov-20211.6 KiB6531

pg_strong_random.cH A D08-Nov-20213.8 KiB17990

pgcheckdir.cH A D08-Nov-20212 KiB9150

pgmkdirp.cH A D08-Nov-20214.1 KiB14972

pgsleep.cH A D08-Nov-20211.9 KiB6423

pgstrcasecmp.cH A D08-Nov-20213.5 KiB15284

pgstrsignal.cH A D08-Nov-20211.8 KiB6514

pqsignal.cH A D08-Nov-20211.7 KiB6224

pthread-win32.hH A D08-Nov-2021474 2312

qsort.cH A D08-Nov-20216.2 KiB236152

qsort_arg.cH A D08-Nov-20216.1 KiB227147

quotes.cH A D08-Nov-20211.3 KiB5219

random.cH A D08-Nov-2021468 267

rint.cH A D08-Nov-20212.3 KiB9939

snprintf.cH A D08-Nov-202126.3 KiB1,171897

sprompt.cH A D08-Nov-20214.4 KiB17189

srandom.cH A D08-Nov-2021497 267

strerror.cH A D08-Nov-2021502 3114

strlcat.cH A D08-Nov-20211.7 KiB6126

strlcpy.cH A D08-Nov-20212 KiB7224

strnlen.cH A D08-Nov-2021816 349

system.cH A D08-Nov-20212.5 KiB11856

tar.cH A D08-Nov-20214.6 KiB205106

thread.cH A D08-Nov-20214.4 KiB14755

unsetenv.cH A D08-Nov-20211.6 KiB5815

win32env.cH A D08-Nov-20213.1 KiB12675

win32error.cH A D08-Nov-20212.9 KiB210188

win32security.cH A D08-Nov-20214.1 KiB179111

win32setlocale.cH A D08-Nov-20215.9 KiB19481

win32ver.rcH A D08-Nov-2021788 3229

README

1src/port/README
2
3libpgport
4=========
5
6libpgport must have special behavior.  It supplies functions to both
7libraries and applications.  However, there are two complexities:
8
91)  Libraries need to use object files that are compiled with exactly
10the same flags as the library.  libpgport might not use the same flags,
11so it is necessary to recompile the object files for individual
12libraries.  This is done by removing -lpgport from the link line:
13
14        # Need to recompile any libpgport object files
15        LIBS := $(filter-out -lpgport, $(LIBS))
16
17and adding infrastructure to recompile the object files:
18
19        OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \
20                connect.o misc.o path.o exec.o \
21                $(filter snprintf.o, $(LIBOBJS))
22
23The problem is that there is no testing of which object files need to be
24added, but missing functions usually show up when linking user
25applications.
26
272) For applications, we use -lpgport before -lpq, so the static files
28from libpgport are linked first.  This avoids having applications
29dependent on symbols that are _used_ by libpq, but not intended to be
30exported by libpq.  libpq's libpgport usage changes over time, so such a
31dependency is a problem.  Windows, Linux, and macOS use an export list to
32control the symbols exported by libpq.
33