#endif
PERL_CALLCONV const char * Perl_PerlIO_context_layers(pTHX_ const char *mode);
+PERL_CALLCONV int Perl_PerlLIO_dup2_cloexec(pTHX_ int oldfd, int newfd);
+PERL_CALLCONV int Perl_PerlLIO_dup_cloexec(pTHX_ int oldfd)
+ __attribute__warn_unused_result__;
+
+PERL_CALLCONV int Perl_PerlLIO_open3_cloexec(pTHX_ const char *file, int flag, int perm)
+ __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_PERLLIO_OPEN3_CLOEXEC \
+ assert(file)
+
+PERL_CALLCONV int Perl_PerlLIO_open_cloexec(pTHX_ const char *file, int flag)
+ __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_PERLLIO_OPEN_CLOEXEC \
+ assert(file)
+
PERL_CALLCONV void* Perl_Slab_Alloc(pTHX_ size_t sz)
__attribute__warn_unused_result__;
PERL_CALLCONV bool Perl_do_eof(pTHX_ GV* gv);
#define PERL_ARGS_ASSERT_DO_EOF \
assert(gv)
-PERL_CALLCONV void Perl_do_execfree(pTHX);
PERL_CALLCONV void Perl_do_gv_dump(pTHX_ I32 level, PerlIO *file, const char *name, GV *sv);
#define PERL_ARGS_ASSERT_DO_GV_DUMP \
assert(file); assert(name)
#define PERL_ARGS_ASSERT_ISIDFIRST_LAZY \
assert(p)
-/* PERL_CALLCONV bool Perl_is_ascii_string(const U8* const s, const STRLEN len)
+PERL_CALLCONV bool Perl_isSCRIPT_RUN(pTHX_ const U8 *s, const U8 *send, const bool utf8_target)
+ __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_ISSCRIPT_RUN \
+ assert(s); assert(send)
+
+/* PERL_CALLCONV bool Perl_is_ascii_string(const U8* const s, STRLEN len)
__attribute__warn_unused_result__
__attribute__pure__; */
/* PERL_CALLCONV bool Perl_is_c9strict_utf8_string(const U8 *s, STRLEN len)
__attribute__warn_unused_result__; */
-/* PERL_CALLCONV bool is_c9strict_utf8_string_loc(const U8 *s, const STRLEN len, const U8 **ep); */
+/* PERL_CALLCONV bool is_c9strict_utf8_string_loc(const U8 *s, STRLEN len, const U8 **ep); */
#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE bool S_is_c9strict_utf8_string_loclen(const U8 *s, const STRLEN len, const U8 **ep, STRLEN *el);
+PERL_STATIC_INLINE bool S_is_c9strict_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el);
#define PERL_ARGS_ASSERT_IS_C9STRICT_UTF8_STRING_LOCLEN \
assert(s)
#endif
-/* PERL_CALLCONV bool Perl_is_invariant_string(const U8* const s, const STRLEN len)
+/* PERL_CALLCONV bool Perl_is_invariant_string(const U8* const s, STRLEN len)
__attribute__warn_unused_result__
__attribute__pure__; */
/* PERL_CALLCONV bool Perl_is_strict_utf8_string(const U8 *s, STRLEN len)
__attribute__warn_unused_result__; */
-/* PERL_CALLCONV bool is_strict_utf8_string_loc(const U8 *s, const STRLEN len, const U8 **ep); */
+/* PERL_CALLCONV bool is_strict_utf8_string_loc(const U8 *s, STRLEN len, const U8 **ep); */
#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE bool S_is_strict_utf8_string_loclen(const U8 *s, const STRLEN len, const U8 **ep, STRLEN *el);
+PERL_STATIC_INLINE bool S_is_strict_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el);
#define PERL_ARGS_ASSERT_IS_STRICT_UTF8_STRING_LOCLEN \
assert(s)
#endif
#define PERL_ARGS_ASSERT_IS_UTF8_DIGIT \
assert(p)
-/* PERL_CALLCONV bool is_utf8_fixed_width_buf_flags(const U8 * const s, const STRLEN len, const U32 flags); */
-/* PERL_CALLCONV bool is_utf8_fixed_width_buf_loc_flags(const U8 * const s, const STRLEN len, const U8 **ep, const U32 flags); */
+/* PERL_CALLCONV bool is_utf8_fixed_width_buf_flags(const U8 * const s, STRLEN len, const U32 flags); */
+/* PERL_CALLCONV bool is_utf8_fixed_width_buf_loc_flags(const U8 * const s, STRLEN len, const U8 **ep, const U32 flags); */
#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE bool S_is_utf8_fixed_width_buf_loclen_flags(const U8 * const s, const STRLEN len, const U8 **ep, STRLEN *el, const U32 flags);
+PERL_STATIC_INLINE bool S_is_utf8_fixed_width_buf_loclen_flags(const U8 * const s, STRLEN len, const U8 **ep, STRLEN *el, const U32 flags);
#define PERL_ARGS_ASSERT_IS_UTF8_FIXED_WIDTH_BUF_LOCLEN_FLAGS \
assert(s)
#endif
#endif
#ifndef NO_MATHOMS
-PERL_CALLCONV bool Perl_is_utf8_string_loc(const U8 *s, const STRLEN len, const U8 **ep);
+PERL_CALLCONV bool Perl_is_utf8_string_loc(const U8 *s, STRLEN len, const U8 **ep);
#define PERL_ARGS_ASSERT_IS_UTF8_STRING_LOC \
assert(s); assert(ep)
#endif
PERL_CALLCONV I32 Perl_my_lstat(pTHX);
#endif
PERL_CALLCONV I32 Perl_my_lstat_flags(pTHX_ const U32 flags);
+PERL_CALLCONV int Perl_my_mkstemp_cloexec(char *templte)
+ __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_MY_MKSTEMP_CLOEXEC \
+ assert(templte)
+
PERL_CALLCONV PerlIO* Perl_my_popen_list(pTHX_ const char* mode, int n, SV ** args);
#define PERL_ARGS_ASSERT_MY_POPEN_LIST \
assert(mode); assert(args)
PERL_CALLCONV void Perl_setdefout(pTHX_ GV* gv);
#define PERL_ARGS_ASSERT_SETDEFOUT \
assert(gv)
+PERL_CALLCONV void Perl_setfd_cloexec(int fd);
+PERL_CALLCONV void Perl_setfd_cloexec_for_nonsysfd(pTHX_ int fd);
+PERL_CALLCONV void Perl_setfd_cloexec_or_inhexec_by_sysfdness(pTHX_ int fd);
+PERL_CALLCONV void Perl_setfd_inhexec(int fd);
+PERL_CALLCONV void Perl_setfd_inhexec_for_sysfd(pTHX_ int fd);
PERL_CALLCONV char* Perl_setlocale(int category, const char* locale);
PERL_CALLCONV HEK* Perl_share_hek(pTHX_ const char* str, SSize_t len, U32 hash);
#define PERL_ARGS_ASSERT_SHARE_HEK \
PERL_CALLCONV bool Perl_try_amagic_bin(pTHX_ int method, int flags);
PERL_CALLCONV bool Perl_try_amagic_un(pTHX_ int method, int flags);
-PERL_CALLCONV I32 Perl_unpack_str(pTHX_ const char *pat, const char *patend, const char *s, const char *strbeg, const char *strend, char **new_s, I32 ocnt, U32 flags);
+PERL_CALLCONV SSize_t Perl_unpack_str(pTHX_ const char *pat, const char *patend, const char *s, const char *strbeg, const char *strend, char **new_s, I32 ocnt, U32 flags);
#define PERL_ARGS_ASSERT_UNPACK_STR \
assert(pat); assert(patend); assert(s); assert(strend)
-PERL_CALLCONV I32 Perl_unpackstring(pTHX_ const char *pat, const char *patend, const char *s, const char *strend, U32 flags);
+PERL_CALLCONV SSize_t Perl_unpackstring(pTHX_ const char *pat, const char *patend, const char *s, const char *strend, U32 flags);
#define PERL_ARGS_ASSERT_UNPACKSTRING \
assert(pat); assert(patend); assert(s); assert(strend)
PERL_CALLCONV void Perl_unshare_hek(pTHX_ HEK* hek);
#endif
PERL_CALLCONV STRLEN Perl_utf8_length(pTHX_ const U8* s, const U8 *e)
- __attribute__warn_unused_result__
- __attribute__pure__;
+ __attribute__warn_unused_result__;
#define PERL_ARGS_ASSERT_UTF8_LENGTH \
assert(s); assert(e)
assert(sv); assert(mg)
#endif
+#if !defined(EBCDIC)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE unsigned int S__variant_byte_number(PERL_UINTMAX_T word)
+ __attribute__warn_unused_result__;
+#endif
+
+#endif
#if !defined(HAS_GETENV_LEN)
PERL_CALLCONV char* Perl_getenv_len(pTHX_ const char *env_elem, unsigned long *len);
#define PERL_ARGS_ASSERT_GETENV_LEN \
# endif
#endif
+#if !defined(HAS_MKOSTEMP)
+PERL_CALLCONV int Perl_my_mkostemp(char *templte, int flags);
+#define PERL_ARGS_ASSERT_MY_MKOSTEMP \
+ assert(templte)
+#endif
#if !defined(HAS_MKSTEMP)
PERL_CALLCONV int Perl_my_mkstemp(char *templte);
#define PERL_ARGS_ASSERT_MY_MKSTEMP \
#define PERL_ARGS_ASSERT_DO_EXEC3 \
assert(incmd)
#endif
+#if defined (HAS_SOCKETPAIR) || (defined (HAS_SOCKET) && defined(SOCK_DGRAM) && defined(AF_INET) && defined(PF_INET))
+PERL_CALLCONV int Perl_PerlSock_socketpair_cloexec(pTHX_ int domain, int type, int protocol, int *pairfd)
+ __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_PERLSOCK_SOCKETPAIR_CLOEXEC \
+ assert(pairfd)
+
+#endif
#if defined(DEBUGGING)
PERL_CALLCONV int Perl_get_debug_opts(pTHX_ const char **s, bool givehelp)
__attribute__warn_unused_result__;
#if defined(HAS_NL_LANGINFO) && defined(PERL_LANGINFO_H)
PERL_CALLCONV const char* Perl_langinfo(const nl_item item);
#endif
+#if defined(HAS_PIPE)
+PERL_CALLCONV int Perl_PerlProc_pipe_cloexec(pTHX_ int *pipefd)
+ __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_PERLPROC_PIPE_CLOEXEC \
+ assert(pipefd)
+
+#endif
#if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
PERL_CALLCONV Signal_t Perl_csighandler(int sig, siginfo_t *info, void *uap);
PERL_CALLCONV Signal_t Perl_sighandler(int sig, siginfo_t *info, void *uap);
#endif
+#if defined(HAS_SOCKET)
+PERL_CALLCONV int Perl_PerlSock_accept_cloexec(pTHX_ int listenfd, struct sockaddr *addr, Sock_size_t *addrlen)
+ __attribute__warn_unused_result__;
+
+PERL_CALLCONV int Perl_PerlSock_socket_cloexec(pTHX_ int domain, int type, int protocol)
+ __attribute__warn_unused_result__;
+
+#endif
#if defined(HAVE_INTERP_INTERN)
PERL_CALLCONV void Perl_sys_intern_clear(pTHX);
PERL_CALLCONV void Perl_sys_intern_init(pTHX);
assert(sv); assert(pv)
#endif
#endif
+#if defined(PERL_CORE) || defined(PERL_EXT)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE Size_t S_variant_under_utf8_count(const U8* const s, const U8* const e)
+ __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_VARIANT_UNDER_UTF8_COUNT \
+ assert(s); assert(e)
+#endif
+
+#endif
#if defined(PERL_CR_FILTER)
# if defined(PERL_IN_TOKE_C)
STATIC I32 S_cr_textfilter(pTHX_ int idx, SV *sv, int maxlen);
assert(hv); assert(indexp)
#endif
#if defined(PERL_IN_LOCALE_C)
+STATIC const char* S_category_name(const int category);
#ifndef PERL_NO_INLINE_FUNCTIONS
PERL_STATIC_INLINE const char * S_save_to_buffer(const char * string, char **buf, Size_t *buf_size, const Size_t offset);
#define PERL_ARGS_ASSERT_SAVE_TO_BUFFER \
STATIC char S_first_symbol(const char *pat, const char *patend);
#define PERL_ARGS_ASSERT_FIRST_SYMBOL \
assert(pat); assert(patend)
-STATIC const char * S_get_num(pTHX_ const char *patptr, I32 *lenptr)
+STATIC const char * S_get_num(pTHX_ const char *patptr, SSize_t *lenptr)
__attribute__warn_unused_result__;
#define PERL_ARGS_ASSERT_GET_NUM \
assert(patptr); assert(lenptr)
#define PERL_ARGS_ASSERT_IS_AN_INT \
assert(s)
-STATIC I32 S_measure_struct(pTHX_ struct tempsym* symptr);
+STATIC SSize_t S_measure_struct(pTHX_ struct tempsym* symptr);
#define PERL_ARGS_ASSERT_MEASURE_STRUCT \
assert(symptr)
STATIC SV* S_mul128(pTHX_ SV *sv, U8 m);
#define PERL_ARGS_ASSERT_SV_EXP_GROW \
assert(sv)
-STATIC I32 S_unpack_rec(pTHX_ struct tempsym* symptr, const char *s, const char *strbeg, const char *strend, const char **new_s);
+STATIC SSize_t S_unpack_rec(pTHX_ struct tempsym* symptr, const char *s, const char *strbeg, const char *strend, const char **new_s);
#define PERL_ARGS_ASSERT_UNPACK_REC \
assert(symptr); assert(s); assert(strbeg); assert(strend)
#endif
#define PERL_ARGS_ASSERT_FIND_BYCLASS \
assert(prog); assert(c); assert(s); assert(strend)
+STATIC char * S_find_next_ascii(char* s, const char * send, const bool is_utf8)
+ __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_FIND_NEXT_ASCII \
+ assert(s); assert(send)
+
+STATIC char * S_find_next_non_ascii(char* s, const char * send, const bool is_utf8)
+ __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_FIND_NEXT_NON_ASCII \
+ assert(s); assert(send)
+
STATIC bool S_isFOO_utf8_lc(pTHX_ const U8 classnum, const U8* character)
__attribute__warn_unused_result__;
#define PERL_ARGS_ASSERT_ISFOO_UTF8_LC \
STATIC void S_no_op(pTHX_ const char *const what, char *s);
#define PERL_ARGS_ASSERT_NO_OP \
assert(what)
-STATIC void S_parse_ident(pTHX_ char **s, char **d, char * const e, int allow_package, bool is_utf8, bool check_dollar);
+STATIC void S_parse_ident(pTHX_ char **s, char **d, char * const e, int allow_package, bool is_utf8, bool check_dollar, bool tick_warn);
#define PERL_ARGS_ASSERT_PARSE_IDENT \
assert(s); assert(d); assert(e)
STATIC int S_pending_ident(pTHX);