From: Karl Williamson Date: Wed, 29 May 2019 20:49:57 +0000 (-0600) Subject: Let embed.fnc define the my_str_foo() fcns X-Git-Tag: v5.31.1~95^2~10 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/fb49ac4495a8cff9430c5c4313ae8f9d6665650e Let embed.fnc define the my_str_foo() fcns We don't always define a Perl_ form for these, expecting all calls to be made through the macro, which will use the native form on the systems that have one. Removing these extra #defines helps future commits --- diff --git a/embed.fnc b/embed.fnc index 47d9587..cc088b5 100644 --- a/embed.fnc +++ b/embed.fnc @@ -3157,15 +3157,15 @@ XpoT |I32 |xs_handshake |const U32 key|NN void * v_my_perl\ |NN const char * file| ... Xp |void |xs_boot_epilog |const I32 ax #ifndef HAS_STRLCAT -ApTod |Size_t |my_strlcat |NULLOK char *dst|NULLOK const char *src|Size_t size +ApTd |Size_t |my_strlcat |NULLOK char *dst|NULLOK const char *src|Size_t size #endif #ifndef HAS_STRLCPY -ApTod |Size_t |my_strlcpy |NULLOK char *dst|NULLOK const char *src|Size_t size +ApTd |Size_t |my_strlcpy |NULLOK char *dst|NULLOK const char *src|Size_t size #endif #ifndef HAS_STRNLEN -ApTod |Size_t |my_strnlen |NN const char *str|Size_t maxlen +ApTd |Size_t |my_strnlen |NN const char *str|Size_t maxlen #endif #ifndef HAS_MKOSTEMP diff --git a/embed.h b/embed.h index aa1b2c2..e59b519 100644 --- a/embed.h +++ b/embed.h @@ -944,6 +944,15 @@ #if !defined(EBCDIC) #define _variant_byte_number S__variant_byte_number #endif +#if !defined(HAS_STRLCAT) +#define my_strlcat Perl_my_strlcat +#endif +#if !defined(HAS_STRLCPY) +#define my_strlcpy Perl_my_strlcpy +#endif +#if !defined(HAS_STRNLEN) +#define my_strnlen Perl_my_strnlen +#endif #if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) && defined(F_FREESP) #define my_chsize(a,b) Perl_my_chsize(aTHX_ a,b) #endif diff --git a/perl.h b/perl.h index 06f62b1..04ff997 100644 --- a/perl.h +++ b/perl.h @@ -1675,8 +1675,6 @@ EXTERN_C char *crypt(const char *, const char *); #ifdef HAS_STRLCAT # define my_strlcat strlcat -#else -# define my_strlcat Perl_my_strlcat #endif #if defined(PERL_CORE) || defined(PERL_EXT) @@ -1689,14 +1687,10 @@ EXTERN_C char *crypt(const char *, const char *); #ifdef HAS_STRLCPY # define my_strlcpy strlcpy -#else -# define my_strlcpy Perl_my_strlcpy #endif #ifdef HAS_STRNLEN # define my_strnlen strnlen -#else -# define my_strnlen Perl_my_strnlen #endif /*