Add pg_strnlen() a portable implementation of strlen.
Andres Freund <andres@anarazel.de>
Add pg_strnlen() a portable implementation of strlen. As the OS version is likely going to be more optimized, fall back to it if available, as detected by configure.
Files
| Path | Change | +/− |
|---|---|---|
| configure | modified | +1 −1 |
| configure.in | modified | +1 −1 |
| src/common/string.c | modified | +20 −0 |
| src/include/common/string.h | modified | +15 −0 |
| src/include/pg_config.h.in | modified | +3 −0 |
| src/include/pg_config.h.win32 | modified | +3 −0 |
| src/port/snprintf.c | modified | +2 −10 |