Rewrite strnlen replacement implementation from 8a241792f96.

Andres Freund <andres@anarazel.de>

Commit: fffd651e83ccbd6191a76be6ec7c6b1b27888fde
Author: Andres Freund <andres@anarazel.de>
Date: 2017-10-10T21:50:30Z
Releases: 11.0
Rewrite strnlen replacement implementation from 8a241792f96.

The previous placement of the fallback implementation in libpgcommon
was problematic, because libpqport functions need strnlen
functionality.

Move replacement into libpgport. Provide strnlen() under its posix
name, instead of pg_strnlen(). Fix stupid configure bug, executing the
test only when compiled with threading support.

Author: Andres Freund
Discussion: https://postgr.es/m/E1e1gR2-0005fB-SI@gemulon.postgresql.org

Files

PathChange+/−
configure modified +24 −1
configure.in modified +3 −3
src/backend/utils/mmgr/mcxt.c modified +1 −2
src/common/string.c modified +0 −20
src/include/common/string.h modified +0 −15
src/include/pg_config.h.in modified +4 −0
src/include/pg_config.h.win32 modified +7 −3
src/include/port.h modified +4 −0
src/port/snprintf.c modified +1 −3
src/port/strnlen.c added +33 −0

Discussion

Cited messages not in the archive: E1e1gR2-0005fB-SI@gemulon.postgresql.org