These functions were added in glibc 2.38, in anticipation of POSIX
adopting them too.
Closes: #26
need_fpurge=yes
need_funopen=yes
AS_CASE([$host_os],
+ [*-gnu*], [
+ # On glibc >= 2.38, strlcpy() and strlcat() got added,
+ # so these could then be dropped on the next SOVERSION bump.
+ #need_strl=no
+ ],
[*-musl*], [
# On musl >= 0.5.0, strlcpy() and strlcat() were already implemented,
# so these can then be dropped on the next SOVERSION bump.
#include <sys/types.h>
__BEGIN_DECLS
-#ifndef __APPLE__
+#if !defined(__APPLE__) && \
+ (!defined(__GLIBC__) || !__GLIBC_PREREQ(2, 38) || !defined(_DEFAULT_SOURCE))
size_t strlcpy(char *dst, const char *src, size_t siz);
size_t strlcat(char *dst, const char *src, size_t siz);
#endif
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: January 7 2024 $
.Dt strlcpy 3bsd
.Os
.Sh NAME
functions first appeared in
.Ox 2.4 ,
and made their appearance in
-.Nx 1.4.3
+.Nx 1.4.3 ,
+.Fx 3.3
and
-.Fx 3.3 .
+glibc 2.38.