mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Rewrite strnlen replacement implementation from 8a241792f9
.
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
This commit is contained in:
@@ -406,6 +406,10 @@ extern size_t strlcat(char *dst, const char *src, size_t siz);
|
||||
extern size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||
#endif
|
||||
|
||||
#if !HAVE_DECL_STRNLEN
|
||||
extern size_t strnlen(const char *str, size_t maxlen);
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_RANDOM)
|
||||
extern long random(void);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user