perl/add-Perl_my_strlcpy-and-Perl_my_strlcat.patch

49 lines
1.2 KiB
Diff

From b6d41cba9e1a9150710f729b6108bf1adafdc4fb Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Thu, 27 Jul 2023 15:58:52 +0800
Subject: [PATCH] add Perl_my_strlcpy and Perl_my_strlcat
---
util.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/util.c b/util.c
index 8103260..a193d63 100644
--- a/util.c
+++ b/util.c
@@ -5745,7 +5745,6 @@ C<src>. If C<size> is smaller than the return, the excess was not appended.
Description stolen from http://man.openbsd.org/strlcat.3
*/
-#ifndef HAS_STRLCAT
Size_t
Perl_my_strlcat(char *dst, const char *src, Size_t size)
{
@@ -5760,7 +5759,6 @@ Perl_my_strlcat(char *dst, const char *src, Size_t size)
}
return used + length;
}
-#endif
/*
@@ -5779,7 +5777,6 @@ succeeded. If it is larger than C<size>, the excess was not copied.
Description stolen from http://man.openbsd.org/strlcpy.3
*/
-#ifndef HAS_STRLCPY
Size_t
Perl_my_strlcpy(char *dst, const char *src, Size_t size)
{
@@ -5793,7 +5790,6 @@ Perl_my_strlcpy(char *dst, const char *src, Size_t size)
}
return length;
}
-#endif
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && (_MSC_VER < 1400) && (WINVER < 0x0500)
/* VC7 or 7.1, building with pre-VC7 runtime libraries. */
--
2.33.0