Add port/strnlen support to libpq and ecpg Makefiles.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 11 Oct 2017 15:27:57 +0000 (11:27 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 11 Oct 2017 15:28:04 +0000 (11:28 -0400)
In the wake of fffd651e8, any makefile that pulls in snprintf.c
from src/port/ needs to be prepared to pull in strnlen.c as well.
Per buildfarm.

src/interfaces/ecpg/compatlib/.gitignore
src/interfaces/ecpg/compatlib/Makefile
src/interfaces/ecpg/ecpglib/.gitignore
src/interfaces/ecpg/ecpglib/Makefile
src/interfaces/ecpg/pgtypeslib/.gitignore
src/interfaces/ecpg/pgtypeslib/Makefile
src/interfaces/libpq/.gitignore
src/interfaces/libpq/Makefile

index 6eb8a0dc06996126a21df9bfcafc0e0190ce6e4c..ad5ba1354ca3d416867305f31b34ec375ccad2ea 100644 (file)
@@ -2,3 +2,4 @@
 /blibecpg_compatdll.def
 /exports.list
 /snprintf.c
+/strnlen.c
index 04ddcfeab2c64df10a25f7b2ac66df6ac399da2d..9ea5cf4ac4f372efef4a19fdd23407652739d019 100644 (file)
@@ -31,7 +31,7 @@ SHLIB_EXPORTS = exports.txt
 # Need to recompile any libpgport object files
 LIBS := $(filter-out -lpgport, $(LIBS))
 
-OBJS= informix.o $(filter snprintf.o, $(LIBOBJS)) $(WIN32RES)
+OBJS= informix.o $(filter snprintf.o strnlen.o, $(LIBOBJS)) $(WIN32RES)
 
 PKG_CONFIG_REQUIRES_PRIVATE = libecpg libpgtypes
 
@@ -48,7 +48,7 @@ submake-pgtypeslib:
 # Shared library stuff
 include $(top_srcdir)/src/Makefile.shlib
 
-snprintf.c: % : $(top_srcdir)/src/port/%
+snprintf.c strnlen.c: % : $(top_srcdir)/src/port/%
    rm -f $@ && $(LN_S) $< .
 
 install: all installdirs install-lib
@@ -58,6 +58,6 @@ installdirs: installdirs-lib
 uninstall: uninstall-lib
 
 clean distclean: clean-lib
-   rm -f $(OBJS) snprintf.c
+   rm -f $(OBJS) snprintf.c strnlen.c
 
 maintainer-clean: distclean maintainer-clean-lib
index 8ef6401dd0ebc31acc061303cc2f1f11d99f04f3..1619e970c29d8f3fdb738db5d3a2a6b498a28029 100644 (file)
@@ -5,6 +5,7 @@
 /pgstrcasecmp.c
 /snprintf.c
 /strlcpy.c
+/strnlen.c
 /thread.c
 /win32setlocale.c
 /isinf.c
index fbb14073cef4ebb0e7fd5c98e57aea8ba0cd3e2e..0b0a3e285747e852d403a932be05afaad8a79c19 100644 (file)
@@ -27,7 +27,8 @@ LIBS := $(filter-out -lpgport, $(LIBS))
 
 OBJS= execute.o typename.o descriptor.o sqlda.o data.o error.o prepare.o memory.o \
    connect.o misc.o path.o pgstrcasecmp.o \
-   $(filter snprintf.o strlcpy.o win32setlocale.o isinf.o, $(LIBOBJS)) $(WIN32RES)
+   $(filter snprintf.o strlcpy.o strnlen.o win32setlocale.o isinf.o, $(LIBOBJS)) \
+   $(WIN32RES)
 
 # thread.c is needed only for non-WIN32 implementation of path.c
 ifneq ($(PORTNAME), win32)
@@ -55,7 +56,7 @@ include $(top_srcdir)/src/Makefile.shlib
 # necessarily use the same object files as the backend uses. Instead,
 # symlink the source files in here and build our own object file.
 
-path.c pgstrcasecmp.c snprintf.c strlcpy.c thread.c win32setlocale.c isinf.c: % : $(top_srcdir)/src/port/%
+path.c pgstrcasecmp.c snprintf.c strlcpy.c strnlen.c thread.c win32setlocale.c isinf.c: % : $(top_srcdir)/src/port/%
    rm -f $@ && $(LN_S) $< .
 
 misc.o: misc.c $(top_builddir)/src/port/pg_config_paths.h
@@ -72,6 +73,6 @@ uninstall: uninstall-lib
 
 clean distclean: clean-lib
    rm -f $(OBJS)
-   rm -f path.c pgstrcasecmp.c snprintf.c strlcpy.c thread.c win32setlocale.c isinf.c
+   rm -f path.c pgstrcasecmp.c snprintf.c strlcpy.c strnlen.c thread.c win32setlocale.c isinf.c
 
 maintainer-clean: distclean maintainer-clean-lib
index fbcd68d7d3efd22a7116cc8e3bf31d119a3a7fa8..df46a79972d1460798d7fa057b081dcf461b6baa 100644 (file)
@@ -4,3 +4,4 @@
 /pgstrcasecmp.c
 /rint.c
 /snprintf.c
+/strnlen.c
index 9fc75661b5333274726e07f4935a1b23db913982..960c26ae553893c3dc687895aa2d8186b584b9d9 100644 (file)
@@ -31,7 +31,8 @@ SHLIB_EXPORTS = exports.txt
 
 OBJS= numeric.o datetime.o common.o dt_common.o timestamp.o interval.o \
    pgstrcasecmp.o \
-   $(filter rint.o snprintf.o, $(LIBOBJS)) $(WIN32RES)
+   $(filter rint.o snprintf.o strnlen.o, $(LIBOBJS)) \
+   $(WIN32RES)
 
 all: all-lib
 
@@ -43,7 +44,7 @@ include $(top_srcdir)/src/Makefile.shlib
 # necessarily use the same object files as the backend uses. Instead,
 # symlink the source files in here and build our own object file.
 
-pgstrcasecmp.c rint.c snprintf.c: % : $(top_srcdir)/src/port/%
+pgstrcasecmp.c rint.c snprintf.c strnlen.c: % : $(top_srcdir)/src/port/%
    rm -f $@ && $(LN_S) $< .
 
 install: all installdirs install-lib
@@ -53,6 +54,6 @@ installdirs: installdirs-lib
 uninstall: uninstall-lib
 
 clean distclean: clean-lib
-   rm -f $(OBJS) pgstrcasecmp.c rint.c snprintf.c
+   rm -f $(OBJS) pgstrcasecmp.c rint.c snprintf.c strnlen.c
 
 maintainer-clean: distclean maintainer-clean-lib
index 6c02dc705519e905a6859c7838a4ea4074edb30e..5c232ae2d1184887fd56d7a41ed817b1eab8f894 100644 (file)
@@ -18,6 +18,7 @@
 /snprintf.c
 /strerror.c
 /strlcpy.c
+/strnlen.c
 /thread.c
 /win32error.c
 /win32setlocale.c
index 87f22d242fbc250b825c3de67a4f81f13e2ebbba..94eb84be0301509f5b7df7a504779c1472787458 100644 (file)
@@ -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
 OBJS += chklocale.o inet_net_ntop.o noblock.o pgstrcasecmp.o pqsignal.o \
    thread.o
 # libpgport C files that are needed if identified by configure
-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))
+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))
 
 ifeq ($(enable_strong_random), yes)
 OBJS += pg_strong_random.o
@@ -103,7 +103,7 @@ backend_src = $(top_srcdir)/src/backend
 # the module is needed (see filter hack in OBJS, above).
 # When you add a file here, remember to add it in the "clean" target below.
 
-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/%
+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/%
    rm -f $@ && $(LN_S) $< .
 
 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
 # Might be left over from a Win32 client-only build
    rm -f pg_config_paths.h
 # Remove files we (may have) symlinked in from src/port and other places
-   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
+   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
    rm -f ip.c md5.c base64.c scram-common.c sha2.c sha2_openssl.c saslprep.c unicode_norm.c
    rm -f encnames.c wchar.c