Skip to content

Commit 46912d9

Browse files
committed
Add port/strnlen support to libpq and ecpg Makefiles.
In the wake of fffd651, any makefile that pulls in snprintf.c from src/port/ needs to be prepared to pull in strnlen.c as well. Per buildfarm.
1 parent e9e0f78 commit 46912d9

File tree

8 files changed

+18
-12
lines changed

8 files changed

+18
-12
lines changed

src/interfaces/ecpg/compatlib/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/blibecpg_compatdll.def
33
/exports.list
44
/snprintf.c
5+
/strnlen.c

src/interfaces/ecpg/compatlib/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ SHLIB_EXPORTS = exports.txt
3131
# Need to recompile any libpgport object files
3232
LIBS := $(filter-out -lpgport, $(LIBS))
3333

34-
OBJS= informix.o $(filter snprintf.o, $(LIBOBJS)) $(WIN32RES)
34+
OBJS= informix.o $(filter snprintf.o strnlen.o, $(LIBOBJS)) $(WIN32RES)
3535

3636
PKG_CONFIG_REQUIRES_PRIVATE = libecpg libpgtypes
3737

@@ -48,7 +48,7 @@ submake-pgtypeslib:
4848
# Shared library stuff
4949
include $(top_srcdir)/src/Makefile.shlib
5050

51-
snprintf.c: % : $(top_srcdir)/src/port/%
51+
snprintf.c strnlen.c: % : $(top_srcdir)/src/port/%
5252
rm -f $@ && $(LN_S) $< .
5353

5454
install: all installdirs install-lib
@@ -58,6 +58,6 @@ installdirs: installdirs-lib
5858
uninstall: uninstall-lib
5959

6060
clean distclean: clean-lib
61-
rm -f $(OBJS) snprintf.c
61+
rm -f $(OBJS) snprintf.c strnlen.c
6262

6363
maintainer-clean: distclean maintainer-clean-lib

src/interfaces/ecpg/ecpglib/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/pgstrcasecmp.c
66
/snprintf.c
77
/strlcpy.c
8+
/strnlen.c
89
/thread.c
910
/win32setlocale.c
1011
/isinf.c

src/interfaces/ecpg/ecpglib/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ LIBS := $(filter-out -lpgport, $(LIBS))
2727

2828
OBJS= execute.o typename.o descriptor.o sqlda.o data.o error.o prepare.o memory.o \
2929
connect.o misc.o path.o pgstrcasecmp.o \
30-
$(filter snprintf.o strlcpy.o win32setlocale.o isinf.o, $(LIBOBJS)) $(WIN32RES)
30+
$(filter snprintf.o strlcpy.o strnlen.o win32setlocale.o isinf.o, $(LIBOBJS)) \
31+
$(WIN32RES)
3132

3233
# thread.c is needed only for non-WIN32 implementation of path.c
3334
ifneq ($(PORTNAME), win32)
@@ -55,7 +56,7 @@ include $(top_srcdir)/src/Makefile.shlib
5556
# necessarily use the same object files as the backend uses. Instead,
5657
# symlink the source files in here and build our own object file.
5758

58-
path.c pgstrcasecmp.c snprintf.c strlcpy.c thread.c win32setlocale.c isinf.c: % : $(top_srcdir)/src/port/%
59+
path.c pgstrcasecmp.c snprintf.c strlcpy.c strnlen.c thread.c win32setlocale.c isinf.c: % : $(top_srcdir)/src/port/%
5960
rm -f $@ && $(LN_S) $< .
6061

6162
misc.o: misc.c $(top_builddir)/src/port/pg_config_paths.h
@@ -72,6 +73,6 @@ uninstall: uninstall-lib
7273

7374
clean distclean: clean-lib
7475
rm -f $(OBJS)
75-
rm -f path.c pgstrcasecmp.c snprintf.c strlcpy.c thread.c win32setlocale.c isinf.c
76+
rm -f path.c pgstrcasecmp.c snprintf.c strlcpy.c strnlen.c thread.c win32setlocale.c isinf.c
7677

7778
maintainer-clean: distclean maintainer-clean-lib

src/interfaces/ecpg/pgtypeslib/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/pgstrcasecmp.c
55
/rint.c
66
/snprintf.c
7+
/strnlen.c

src/interfaces/ecpg/pgtypeslib/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ SHLIB_EXPORTS = exports.txt
3131

3232
OBJS= numeric.o datetime.o common.o dt_common.o timestamp.o interval.o \
3333
pgstrcasecmp.o \
34-
$(filter rint.o snprintf.o, $(LIBOBJS)) $(WIN32RES)
34+
$(filter rint.o snprintf.o strnlen.o, $(LIBOBJS)) \
35+
$(WIN32RES)
3536

3637
all: all-lib
3738

@@ -43,7 +44,7 @@ include $(top_srcdir)/src/Makefile.shlib
4344
# necessarily use the same object files as the backend uses. Instead,
4445
# symlink the source files in here and build our own object file.
4546

46-
pgstrcasecmp.c rint.c snprintf.c: % : $(top_srcdir)/src/port/%
47+
pgstrcasecmp.c rint.c snprintf.c strnlen.c: % : $(top_srcdir)/src/port/%
4748
rm -f $@ && $(LN_S) $< .
4849

4950
install: all installdirs install-lib
@@ -53,6 +54,6 @@ installdirs: installdirs-lib
5354
uninstall: uninstall-lib
5455

5556
clean distclean: clean-lib
56-
rm -f $(OBJS) pgstrcasecmp.c rint.c snprintf.c
57+
rm -f $(OBJS) pgstrcasecmp.c rint.c snprintf.c strnlen.c
5758

5859
maintainer-clean: distclean maintainer-clean-lib

src/interfaces/libpq/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
/snprintf.c
1919
/strerror.c
2020
/strlcpy.c
21+
/strnlen.c
2122
/thread.c
2223
/win32error.c
2324
/win32setlocale.c

src/interfaces/libpq/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ OBJS= fe-auth.o fe-auth-scram.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-l
3838
OBJS += chklocale.o inet_net_ntop.o noblock.o pgstrcasecmp.o pqsignal.o \
3939
thread.o
4040
# libpgport C files that are needed if identified by configure
41-
OBJS += $(filter crypt.o getaddrinfo.o getpeereid.o inet_aton.o open.o system.o snprintf.o strerror.o strlcpy.o win32error.o win32setlocale.o, $(LIBOBJS))
41+
OBJS += $(filter crypt.o getaddrinfo.o getpeereid.o inet_aton.o open.o system.o snprintf.o strerror.o strlcpy.o strnlen.o win32error.o win32setlocale.o, $(LIBOBJS))
4242

4343
ifeq ($(enable_strong_random), yes)
4444
OBJS += pg_strong_random.o
@@ -103,7 +103,7 @@ backend_src = $(top_srcdir)/src/backend
103103
# the module is needed (see filter hack in OBJS, above).
104104
# When you add a file here, remember to add it in the "clean" target below.
105105

106-
chklocale.c crypt.c erand48.c getaddrinfo.c getpeereid.c inet_aton.c inet_net_ntop.c noblock.c open.c system.c pgsleep.c pg_strong_random.c pgstrcasecmp.c pqsignal.c snprintf.c strerror.c strlcpy.c thread.c win32error.c win32setlocale.c: % : $(top_srcdir)/src/port/%
106+
chklocale.c crypt.c erand48.c getaddrinfo.c getpeereid.c inet_aton.c inet_net_ntop.c noblock.c open.c system.c pgsleep.c pg_strong_random.c pgstrcasecmp.c pqsignal.c snprintf.c strerror.c strlcpy.c strnlen.c thread.c win32error.c win32setlocale.c: % : $(top_srcdir)/src/port/%
107107
rm -f $@ && $(LN_S) $< .
108108

109109
ip.c md5.c base64.c scram-common.c sha2.c sha2_openssl.c saslprep.c unicode_norm.c: % : $(top_srcdir)/src/common/%
@@ -155,7 +155,7 @@ clean distclean: clean-lib
155155
# Might be left over from a Win32 client-only build
156156
rm -f pg_config_paths.h
157157
# Remove files we (may have) symlinked in from src/port and other places
158-
rm -f chklocale.c crypt.c erand48.c getaddrinfo.c getpeereid.c inet_aton.c inet_net_ntop.c noblock.c open.c system.c pgsleep.c pg_strong_random.c pgstrcasecmp.c pqsignal.c snprintf.c strerror.c strlcpy.c thread.c win32error.c win32setlocale.c
158+
rm -f chklocale.c crypt.c erand48.c getaddrinfo.c getpeereid.c inet_aton.c inet_net_ntop.c noblock.c open.c system.c pgsleep.c pg_strong_random.c pgstrcasecmp.c pqsignal.c snprintf.c strerror.c strlcpy.c strnlen.c thread.c win32error.c win32setlocale.c
159159
rm -f ip.c md5.c base64.c scram-common.c sha2.c sha2_openssl.c saslprep.c unicode_norm.c
160160
rm -f encnames.c wchar.c
161161

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy