This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
ext/XS-APItest/t/utf8_warn_base.pl: Fix for EBCDIC
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index c3cd7c8..649b6d3 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -701,6 +701,10 @@ PERL_CALLCONV_NO_RET void  Perl_croak_xs_usage(const CV *const cv, const char *co
 #define PERL_ARGS_ASSERT_CROAK_XS_USAGE        \
        assert(cv); assert(params)
 
+PERL_CALLCONV Signal_t Perl_csighandler1(int sig);
+#define PERL_ARGS_ASSERT_CSIGHANDLER1
+PERL_CALLCONV Signal_t Perl_csighandler3(int sig, Siginfo_t *info, void *uap);
+#define PERL_ARGS_ASSERT_CSIGHANDLER3
 PERL_CALLCONV regexp_engine const *    Perl_current_re_engine(pTHX);
 #define PERL_ARGS_ASSERT_CURRENT_RE_ENGINE
 #ifndef NO_MATHOMS
@@ -2647,6 +2651,8 @@ PERL_CALLCONV int perl_parse(PerlInterpreter *my_perl, XSINIT_t xsinit, int argc
 PERL_CALLCONV int      perl_run(PerlInterpreter *my_perl);
 #define PERL_ARGS_ASSERT_PERL_RUN      \
        assert(my_perl)
+PERL_CALLCONV Signal_t Perl_perly_sighandler(int sig, Siginfo_t *info, void *uap, bool safe);
+#define PERL_ARGS_ASSERT_PERLY_SIGHANDLER
 PERL_CALLCONV void     Perl_pmop_dump(pTHX_ PMOP* pm);
 #define PERL_ARGS_ASSERT_PMOP_DUMP
 PERL_CALLCONV OP*      Perl_pmruntime(pTHX_ OP *o, OP *expr, OP *repl, UV flags, I32 floor);
@@ -3114,6 +3120,10 @@ PERL_CALLCONV void       Perl_setfd_inhexec_for_sysfd(pTHX_ int fd);
 PERL_CALLCONV HEK*     Perl_share_hek(pTHX_ const char* str, SSize_t len, U32 hash);
 #define PERL_ARGS_ASSERT_SHARE_HEK     \
        assert(str)
+PERL_CALLCONV Signal_t Perl_sighandler1(int sig);
+#define PERL_ARGS_ASSERT_SIGHANDLER1
+PERL_CALLCONV Signal_t Perl_sighandler3(int sig, Siginfo_t *info, void *uap);
+#define PERL_ARGS_ASSERT_SIGHANDLER3
 PERL_CALLCONV char*    Perl_skipspace_flags(pTHX_ char *s, U32 flags)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_SKIPSPACE_FLAGS       \
@@ -4094,12 +4104,6 @@ STATIC const char*       S_my_nl_langinfo(const int item, bool toggle);
 #define PERL_ARGS_ASSERT_MY_NL_LANGINFO
 #  endif
 #endif
-#if !(defined(HAS_SIGACTION) && defined(SA_SIGINFO))
-PERL_CALLCONV Signal_t Perl_csighandler(int sig);
-#define PERL_ARGS_ASSERT_CSIGHANDLER
-PERL_CALLCONV Signal_t Perl_sighandler(int sig);
-#define PERL_ARGS_ASSERT_SIGHANDLER
-#endif
 #if !(defined(PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION))
 PERL_CALLCONV bool     Perl_do_exec(pTHX_ const char* cmd);
 #define PERL_ARGS_ASSERT_DO_EXEC       \
@@ -4112,6 +4116,12 @@ PERL_CALLCONV void*      Perl_my_cxt_init(pTHX_ int *indexp, size_t size);
        assert(indexp)
 #  endif
 #endif
+#if !(defined(PERL_USE_3ARG_SIGHANDLER))
+PERL_CALLCONV Signal_t Perl_csighandler(int sig);
+#define PERL_ARGS_ASSERT_CSIGHANDLER
+PERL_CALLCONV Signal_t Perl_sighandler(int sig);
+#define PERL_ARGS_ASSERT_SIGHANDLER
+#endif
 #if !(defined(_MSC_VER))
 PERL_CALLCONV_NO_RET int       Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
                        __attribute__noreturn__;
@@ -4564,12 +4574,6 @@ PERL_CALLCONV int        Perl_PerlProc_pipe_cloexec(pTHX_ int *pipefd)
        assert(pipefd)
 
 #endif
-#if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
-PERL_CALLCONV Signal_t Perl_csighandler(int sig, Siginfo_t *info, void *uap);
-#define PERL_ARGS_ASSERT_CSIGHANDLER
-PERL_CALLCONV Signal_t Perl_sighandler(int sig, Siginfo_t *info, void *uap);
-#define PERL_ARGS_ASSERT_SIGHANDLER
-#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__;
@@ -5555,6 +5559,11 @@ STATIC int       S_edit_distance(const UV *src, const UV *tgt, const STRLEN x, const S
 #define PERL_ARGS_ASSERT_EDIT_DISTANCE \
        assert(src); assert(tgt)
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE Size_t      S_find_first_differing_byte_pos(const U8 * s1, const U8 * s2, const Size_t max);
+#define PERL_ARGS_ASSERT_FIND_FIRST_DIFFERING_BYTE_POS \
+       assert(s1); assert(s2)
+#endif
 STATIC SV *    S_get_ANYOFM_contents(pTHX_ const regnode * n)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_GET_ANYOFM_CONTENTS   \
@@ -5594,6 +5603,13 @@ PERL_STATIC_INLINE bool  S_invlist_is_iterating(SV* const invlist)
        assert(invlist)
 #endif
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE UV  S_invlist_lowest(SV* const invlist)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_INVLIST_LOWEST        \
+       assert(invlist)
+#endif
+
 STATIC bool    S_is_ssc_worth_it(const RExC_state_t * pRExC_state, const regnode_ssc * ssc);
 #define PERL_ARGS_ASSERT_IS_SSC_WORTH_IT       \
        assert(pRExC_state); assert(ssc)
@@ -5751,13 +5767,7 @@ PERL_CALLCONV void       Perl__invlist_dump(pTHX_ PerlIO *file, I32 level, const char*
 #define PERL_ARGS_ASSERT__INVLIST_DUMP \
        assert(file); assert(indent); assert(invlist)
 #endif
-#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_OP_C) || defined(PERL_IN_DOOP_C)
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE SV* S_add_cp_to_invlist(pTHX_ SV* invlist, const UV cp)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_ADD_CP_TO_INVLIST
-#endif
-
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_OP_C)
 #ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE STRLEN*     S_get_invlist_iter_addr(SV* invlist)
                        __attribute__warn_unused_result__;
@@ -5766,18 +5776,6 @@ PERL_STATIC_INLINE STRLEN*       S_get_invlist_iter_addr(SV* invlist)
 #endif
 
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE void        S_invlist_extend(pTHX_ SV* const invlist, const UV len);
-#define PERL_ARGS_ASSERT_INVLIST_EXTEND        \
-       assert(invlist)
-#endif
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE UV  S_invlist_highest(SV* const invlist)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_INVLIST_HIGHEST       \
-       assert(invlist)
-#endif
-
-#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_invlist_iterfinish(SV* invlist);
 #define PERL_ARGS_ASSERT_INVLIST_ITERFINISH    \
        assert(invlist)
@@ -5794,6 +5792,26 @@ PERL_STATIC_INLINE bool  S_invlist_iternext(SV* invlist, UV* start, UV* end)
        assert(invlist); assert(start); assert(end)
 #endif
 
+#endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_OP_C) || defined(PERL_IN_DOOP_C)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE SV* S_add_cp_to_invlist(pTHX_ SV* invlist, const UV cp)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_ADD_CP_TO_INVLIST
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE void        S_invlist_extend(pTHX_ SV* const invlist, const UV len);
+#define PERL_ARGS_ASSERT_INVLIST_EXTEND        \
+       assert(invlist)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE UV  S_invlist_highest(SV* const invlist)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_INVLIST_HIGHEST       \
+       assert(invlist)
+#endif
+
 #ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_invlist_set_len(pTHX_ SV* const invlist, const UV len, const bool offset);
 #define PERL_ARGS_ASSERT_INVLIST_SET_LEN       \
@@ -6441,6 +6459,12 @@ PERL_CALLCONV Malloc_t   Perl_mem_log_realloc(const UV n, const UV typesize, const
 STATIC void    S_pidgone(pTHX_ Pid_t pid, int status);
 #define PERL_ARGS_ASSERT_PIDGONE
 #endif
+#if defined(PERL_USE_3ARG_SIGHANDLER)
+PERL_CALLCONV Signal_t Perl_csighandler(int sig, Siginfo_t *info, void *uap);
+#define PERL_ARGS_ASSERT_CSIGHANDLER
+PERL_CALLCONV Signal_t Perl_sighandler(int sig, Siginfo_t *info, void *uap);
+#define PERL_ARGS_ASSERT_SIGHANDLER
+#endif
 #if defined(UNLINK_ALL_VERSIONS)
 PERL_CALLCONV I32      Perl_unlnk(pTHX_ const char* f);
 #define PERL_ARGS_ASSERT_UNLNK \