This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
The fchdir() proto is supposed to live in <unistd.h>.
[perl5.git] / embed.pl
index 7c251bb..4a9176f 100755 (executable)
--- a/embed.pl
+++ b/embed.pl
@@ -1348,8 +1348,7 @@ Ajnod     |int    |perl_run       |PerlInterpreter* interp
 Ajnod  |int    |perl_parse     |PerlInterpreter* interp|XSINIT_t xsinit \
                                |int argc|char** argv|char** env
 #if defined(USE_ITHREADS)
-: XXX: perl_clone needs docs
-Ajno   |PerlInterpreter*|perl_clone|PerlInterpreter* interp, UV flags
+Ajnod  |PerlInterpreter*|perl_clone|PerlInterpreter* interp, UV flags
 #  if defined(PERL_IMPLICIT_SYS)
 Ajno   |PerlInterpreter*|perl_clone_using|PerlInterpreter *interp|UV flags \
                                |struct IPerlMem* m|struct IPerlMem* ms \
@@ -1427,6 +1426,7 @@ p |OP*    |block_end      |I32 floor|OP* seq
 Ap     |I32    |block_gimme
 p      |int    |block_start    |int full
 p      |void   |boot_core_UNIVERSAL
+p      |void   |boot_core_PerlIO
 Ap     |void   |call_list      |I32 oldscope|AV* av_list
 p      |bool   |cando          |Mode_t mode|Uid_t effective|Stat_t* statbufp
 Ap     |U32    |cast_ulong     |NV f
@@ -1673,7 +1673,7 @@ p |I32    |keyword        |char* d|I32 len
 Ap     |void   |leave_scope    |I32 base
 p      |void   |lex_end
 p      |void   |lex_start      |SV* line
-p      |void   |op_null        |OP* o
+Ap |void   |op_null    |OP* o
 p      |void   |op_clear       |OP* o
 p      |OP*    |linklist       |OP* o
 p      |OP*    |list           |OP* o
@@ -1682,6 +1682,8 @@ Apd       |void   |load_module|U32 flags|SV* name|SV* ver|...
 Ap     |void   |vload_module|U32 flags|SV* name|SV* ver|va_list* args
 p      |OP*    |localize       |OP* arg|I32 lexical
 Apd    |I32    |looks_like_number|SV* sv
+Apd    |int    |grok_number    |const char *pv|STRLEN len|UV *valuep
+Apd    |bool   |grok_numeric_radix|const char **sp|const char *send
 p      |int    |magic_clearenv |SV* sv|MAGIC* mg
 p      |int    |magic_clear_all_env|SV* sv|MAGIC* mg
 p      |int    |magic_clearpack|SV* sv|MAGIC* mg
@@ -1757,7 +1759,7 @@ p |int    |mode_from_discipline|SV* discp
 Ap     |char*  |moreswitches   |char* s
 p      |OP*    |my             |OP* o
 Ap     |NV     |my_atof        |const char *s
-#if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
+#if (!defined(HAS_MEMCPY) && !defined(HAS_BCOPY)) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY) && !defined(HAS_SAFE_BCOPY))
 Anp    |char*  |my_bcopy       |const char* from|char* to|I32 len
 #endif
 #if !defined(HAS_BZERO) && !defined(HAS_MEMSET)
@@ -1824,7 +1826,7 @@ Ap        |OP*    |newPMOP        |I32 type|I32 flags
 Ap     |OP*    |newPVOP        |I32 type|I32 flags|char* pv
 Ap     |SV*    |newRV          |SV* pref
 Apd    |SV*    |newRV_noinc    |SV *sv
-Ap     |SV*    |newSV          |STRLEN len
+Apd    |SV*    |newSV          |STRLEN len
 Ap     |OP*    |newSVREF       |OP* o
 Ap     |OP*    |newSVOP        |I32 type|I32 flags|SV* sv
 Apd    |SV*    |newSViv        |IV i
@@ -1994,25 +1996,25 @@ np      |Signal_t |sighandler   |int sig
 Ap     |SV**   |stack_grow     |SV** sp|SV**p|int n
 Ap     |I32    |start_subparse |I32 is_format|U32 flags
 p      |void   |sub_crush_depth|CV* cv
-Ap     |bool   |sv_2bool       |SV* sv
-Ap     |CV*    |sv_2cv         |SV* sv|HV** st|GV** gvp|I32 lref
-Ap     |IO*    |sv_2io         |SV* sv
-Ap     |IV     |sv_2iv         |SV* sv
+Apd    |bool   |sv_2bool       |SV* sv
+Apd    |CV*    |sv_2cv         |SV* sv|HV** st|GV** gvp|I32 lref
+Apd    |IO*    |sv_2io         |SV* sv
+Apd    |IV     |sv_2iv         |SV* sv
 Apd    |SV*    |sv_2mortal     |SV* sv
-Ap     |NV     |sv_2nv         |SV* sv
+Apd    |NV     |sv_2nv         |SV* sv
 Aop    |char*  |sv_2pv         |SV* sv|STRLEN* lp
-Ap     |char*  |sv_2pvutf8     |SV* sv|STRLEN* lp
-Ap     |char*  |sv_2pvbyte     |SV* sv|STRLEN* lp
-Ap     |UV     |sv_2uv         |SV* sv
-Ap     |IV     |sv_iv          |SV* sv
-Ap     |UV     |sv_uv          |SV* sv
-Ap     |NV     |sv_nv          |SV* sv
-Ap     |char*  |sv_pvn         |SV *sv|STRLEN *len
-Ap     |char*  |sv_pvutf8n     |SV *sv|STRLEN *len
-Ap     |char*  |sv_pvbyten     |SV *sv|STRLEN *len
+Apd    |char*  |sv_2pvutf8     |SV* sv|STRLEN* lp
+Apd    |char*  |sv_2pvbyte     |SV* sv|STRLEN* lp
+Apd    |UV     |sv_2uv         |SV* sv
+Apd    |IV     |sv_iv          |SV* sv
+Apd    |UV     |sv_uv          |SV* sv
+Apd    |NV     |sv_nv          |SV* sv
+Apd    |char*  |sv_pvn         |SV *sv|STRLEN *len
+Apd    |char*  |sv_pvutf8n     |SV *sv|STRLEN *len
+Apd    |char*  |sv_pvbyten     |SV *sv|STRLEN *len
 Apd    |I32    |sv_true        |SV *sv
-p      |void   |sv_add_arena   |char* ptr|U32 size|U32 flags
-Ap     |int    |sv_backoff     |SV* sv
+pd     |void   |sv_add_arena   |char* ptr|U32 size|U32 flags
+Apd    |int    |sv_backoff     |SV* sv
 Apd    |SV*    |sv_bless       |SV* sv|HV* stash
 Afpd   |void   |sv_catpvf      |SV* sv|const char* pat|...
 Ap     |void   |sv_vcatpvf     |SV* sv|const char* pat|va_list* args
@@ -2020,13 +2022,13 @@ Apd     |void   |sv_catpv       |SV* sv|const char* ptr
 Aopd   |void   |sv_catpvn      |SV* sv|const char* ptr|STRLEN len
 Aopd   |void   |sv_catsv       |SV* dsv|SV* ssv
 Apd    |void   |sv_chop        |SV* sv|char* ptr
-p      |I32    |sv_clean_all
-p      |void   |sv_clean_objs
+pd     |I32    |sv_clean_all
+pd     |void   |sv_clean_objs
 Apd    |void   |sv_clear       |SV* sv
 Apd    |I32    |sv_cmp         |SV* sv1|SV* sv2
 Apd    |I32    |sv_cmp_locale  |SV* sv1|SV* sv2
 #if defined(USE_LOCALE_COLLATE)
-Ap     |char*  |sv_collxfrm    |SV* sv|STRLEN* nxp
+Apd    |char*  |sv_collxfrm    |SV* sv|STRLEN* nxp
 #endif
 Ap     |OP*    |sv_compile_2op |SV* sv|OP** startp|char* code|AV** avp
 Apd    |int    |sv_getcwd      |SV* sv
@@ -2035,7 +2037,7 @@ Ap        |void   |sv_dump        |SV* sv
 Apd    |bool   |sv_derived_from|SV* sv|const char* name
 Apd    |I32    |sv_eq          |SV* sv1|SV* sv2
 Apd    |void   |sv_free        |SV* sv
-p      |void   |sv_free_arenas
+pd     |void   |sv_free_arenas
 Apd    |char*  |sv_gets        |SV* sv|PerlIO* fp|I32 append
 Apd    |char*  |sv_grow        |SV* sv|STRLEN newlen
 Apd    |void   |sv_inc         |SV* sv
@@ -2049,18 +2051,17 @@ Apd     |void   |sv_magic       |SV* sv|SV* obj|int how|const char* name \
                                |I32 namlen
 Apd    |SV*    |sv_mortalcopy  |SV* oldsv
 Apd    |SV*    |sv_newmortal
-Ap     |SV*    |sv_newref      |SV* sv
+Apd    |SV*    |sv_newref      |SV* sv
 Ap     |char*  |sv_peek        |SV* sv
-Ap     |void   |sv_pos_u2b     |SV* sv|I32* offsetp|I32* lenp
-Ap     |void   |sv_pos_b2u     |SV* sv|I32* offsetp
+Apd    |void   |sv_pos_u2b     |SV* sv|I32* offsetp|I32* lenp
+Apd    |void   |sv_pos_b2u     |SV* sv|I32* offsetp
 Aopd   |char*  |sv_pvn_force   |SV* sv|STRLEN* lp
 Apd    |char*  |sv_pvutf8n_force|SV* sv|STRLEN* lp
-Ap     |char*  |sv_pvbyten_force|SV* sv|STRLEN* lp
-Apd    |int    |sv_realpath    |SV* sv|char *path|STRLEN len
+Apd    |char*  |sv_pvbyten_force|SV* sv|STRLEN* lp
 Apd    |char*  |sv_reftype     |SV* sv|int ob
 Apd    |void   |sv_replace     |SV* sv|SV* nsv
-Ap     |void   |sv_report_used
-Ap     |void   |sv_reset       |char* s|HV* stash
+Apd    |void   |sv_report_used
+Apd    |void   |sv_reset       |char* s|HV* stash
 Afpd   |void   |sv_setpvf      |SV* sv|const char* pat|...
 Ap     |void   |sv_vsetpvf     |SV* sv|const char* pat|va_list* args
 Apd    |void   |sv_setiv       |SV* sv|IV num
@@ -2076,12 +2077,12 @@ Apd     |SV*    |sv_setref_pvn  |SV* rv|const char* classname|char* pv \
 Apd    |void   |sv_setpv       |SV* sv|const char* ptr
 Apd    |void   |sv_setpvn      |SV* sv|const char* ptr|STRLEN len
 Aopd   |void   |sv_setsv       |SV* dsv|SV* ssv
-Ap     |void   |sv_taint       |SV* sv
-Ap     |bool   |sv_tainted     |SV* sv
+Apd    |void   |sv_taint       |SV* sv
+Apd    |bool   |sv_tainted     |SV* sv
 Apd    |int    |sv_unmagic     |SV* sv|int type
 Apd    |void   |sv_unref       |SV* sv
 Apd    |void   |sv_unref_flags |SV* sv|U32 flags
-Ap     |void   |sv_untaint     |SV* sv
+Apd    |void   |sv_untaint     |SV* sv
 Apd    |bool   |sv_upgrade     |SV* sv|U32 mt
 Apd    |void   |sv_usepvn      |SV* sv|char* ptr|STRLEN len
 Apd    |void   |sv_vcatpvfn    |SV* sv|const char* pat|STRLEN patlen \
@@ -2126,7 +2127,7 @@ p |void   |vivify_defelem |SV* sv
 p      |void   |vivify_ref     |SV* sv|U32 to_what
 p      |I32    |wait4pid       |Pid_t pid|int* statusp|int flags
 p      |void   |report_evil_fh |GV *gv|IO *io|I32 op
-p      |void   |report_uninit
+pd     |void   |report_uninit
 Afpd   |void   |warn           |const char* pat|...
 Ap     |void   |vwarn          |const char* pat|va_list* args
 Afp    |void   |warner         |U32 err|const char* pat|...
@@ -2200,18 +2201,18 @@ Ap      |void*  |vdefault_protect|volatile JMPENV *je|int *excpt \
                                |protect_body_t body|va_list *args
 #endif
 Ap     |void   |reginitcolors
-Ap     |char*  |sv_2pv_nolen   |SV* sv
-Ap     |char*  |sv_2pvutf8_nolen|SV* sv
-Ap     |char*  |sv_2pvbyte_nolen|SV* sv
-Ap     |char*  |sv_pv          |SV *sv
-Ap     |char*  |sv_pvutf8      |SV *sv
-Ap     |char*  |sv_pvbyte      |SV *sv
+Apd    |char*  |sv_2pv_nolen   |SV* sv
+Apd    |char*  |sv_2pvutf8_nolen|SV* sv
+Apd    |char*  |sv_2pvbyte_nolen|SV* sv
+Apd    |char*  |sv_pv          |SV *sv
+Apd    |char*  |sv_pvutf8      |SV *sv
+Apd    |char*  |sv_pvbyte      |SV *sv
 Aopd   |STRLEN |sv_utf8_upgrade|SV *sv
 ApdM   |bool   |sv_utf8_downgrade|SV *sv|bool fail_ok
 Apd    |void   |sv_utf8_encode |SV *sv
 ApdM   |bool   |sv_utf8_decode |SV *sv
-Ap     |void   |sv_force_normal|SV *sv
-Ap     |void   |sv_force_normal_flags|SV *sv|U32 flags
+Apd    |void   |sv_force_normal|SV *sv
+Apd    |void   |sv_force_normal_flags|SV *sv|U32 flags
 Ap     |void   |tmps_grow      |I32 n
 Apd    |SV*    |sv_rvweaken    |SV *sv
 p      |int    |magic_killbackrefs|SV *sv|MAGIC *mg
@@ -2221,17 +2222,17 @@ Ap      |void   |newMYSUB       |I32 floor|OP *o|OP *proto|OP *attrs|OP *block
 p      |OP *   |my_attrs       |OP *o|OP *attrs
 p      |void   |boot_core_xsutils
 #if defined(USE_ITHREADS)
-Ap     |PERL_CONTEXT*|cx_dup   |PERL_CONTEXT* cx|I32 ix|I32 max
-Ap     |PERL_SI*|si_dup        |PERL_SI* si
-Ap     |ANY*   |ss_dup         |PerlInterpreter* proto_perl
+Ap     |PERL_CONTEXT*|cx_dup   |PERL_CONTEXT* cx|I32 ix|I32 max|clone_params* param
+Ap     |PERL_SI*|si_dup        |PERL_SI* si|clone_params* param
+Ap     |ANY*   |ss_dup         |PerlInterpreter* proto_perl|clone_params* param
 Ap     |void*  |any_dup        |void* v|PerlInterpreter* proto_perl
-Ap     |HE*    |he_dup         |HE* e|bool shared
+Ap     |HE*    |he_dup         |HE* e|bool shared|clone_params* param
 Ap     |REGEXP*|re_dup         |REGEXP* r
 Ap     |PerlIO*|fp_dup         |PerlIO* fp|char type
 Ap     |DIR*   |dirp_dup       |DIR* dp
-Ap     |GP*    |gp_dup         |GP* gp
-Ap     |MAGIC* |mg_dup         |MAGIC* mg
-Ap     |SV*    |sv_dup         |SV* sstr
+Ap     |GP*    |gp_dup         |GP* gp|clone_params* param
+Ap     |MAGIC* |mg_dup         |MAGIC* mg|clone_params* param
+Ap     |SV*    |sv_dup         |SV* sstr|clone_params* param
 #if defined(HAVE_INTERP_INTERN)
 Ap     |void   |sys_intern_dup |struct interp_intern* src \
                                |struct interp_intern* dst
@@ -2356,9 +2357,12 @@ s        |struct perl_thread *   |init_main_thread
 #endif
 
 #if defined(PERL_IN_PP_C) || defined(PERL_DECL_PROT)
-s      |void   |doencodes      |SV* sv|char* s|I32 len
 s      |SV*    |refto          |SV* sv
 s      |U32    |seed
+#endif
+
+#if defined(PERL_IN_PP_PACK_C) || defined(PERL_DECL_PROT)
+s      |void   |doencodes      |SV* sv|char* s|I32 len
 s      |SV*    |mul128         |SV *sv|U8 m
 s      |SV*    |is_an_int      |char *s|STRLEN l
 s      |int    |div128         |SV *pnum|bool *done
@@ -2414,9 +2418,11 @@ s        |void   |regoptail      |struct RExC_state_t*|regnode *|regnode *
 s      |void   |regtail        |struct RExC_state_t*|regnode *|regnode *
 s      |char*|regwhite |char *|char *
 s      |char*|nextchar |struct RExC_state_t*
+#  ifdef DEBUGGING
 s      |regnode*|dumpuntil     |regnode *start|regnode *node \
                                |regnode *last|SV* sv|I32 l
 s      |void   |put_byte       |SV* sv|int c
+#  endif
 s      |void   |scan_commit    |struct RExC_state_t*|struct scan_data_t *data
 s      |void   |cl_anything    |struct RExC_state_t*|struct regnode_charclass_class *cl
 s      |int    |cl_is_anything |struct regnode_charclass_class *cl
@@ -2453,8 +2459,10 @@ s        |char*  |find_byclass   |regexp * prog|regnode *c|char *s|char *strend|char *star
 #endif
 
 #if defined(PERL_IN_RUN_C) || defined(PERL_DECL_PROT)
+#   ifdef DEBUGGING
 s      |CV*    |deb_curcv      |I32 ix
 s      |void   |debprof        |OP *o
+#   endif
 #endif
 
 #if defined(PERL_IN_SCOPE_C) || defined(PERL_DECL_PROT)
@@ -2506,11 +2514,10 @@ s       |void   |not_a_number   |SV *sv
 s      |I32    |visit          |SVFUNC_t f
 s      |void   |sv_add_backref |SV *tsv|SV *sv
 s      |void   |sv_del_backref |SV *sv
-#  if defined(DEBUGGING)
+#  ifdef DEBUGGING
 s      |void   |del_sv |SV *p
 #  endif
 #  if !defined(NV_PRESERVES_UV)
-s      |int    |sv_2inuv_non_preserve  |SV *sv|I32 numtype
 s      |int    |sv_2iuv_non_preserve   |SV *sv|I32 numtype
 #  endif
 s      |I32    |expect_number  |char** pattern
@@ -2557,7 +2564,9 @@ s |char * |filter_gets    |SV *sv|PerlIO *fp|STRLEN append
 s      |HV *   |find_in_my_stash|char *pkgname|I32 len
 s      |SV*    |new_constant   |char *s|STRLEN len|const char *key|SV *sv \
                                |SV *pv|const char *type
+#  if defined(DEBUGGING)
 s      |void   |tokereport     |char *thing|char *s|I32 rv
+#  endif
 s      |int    |ao             |int toketype
 s      |void   |depcom
 s      |char*  |incl_perldb
@@ -2577,8 +2586,11 @@ s        |I32    |cr_textfilter  |int idx|SV *sv|int maxlen
 s      |SV*|isa_lookup |HV *stash|const char *name|int len|int level
 #endif
 
-#if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT)
+#if defined(PERL_IN_LOCALE_C) || defined(PERL_DECL_PROT)
 s      |char*  |stdize_locale  |char* locs
+#endif
+
+#if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT)
 s      |SV*    |mess_alloc
 #  if defined(LEAKTEST)
 s      |void   |xstat          |int
@@ -2593,5 +2605,5 @@ Apd       |void   |sv_catpvn_flags|SV* sv|const char* ptr|STRLEN len|I32 flags
 Apd    |void   |sv_catsv_flags |SV* dsv|SV* ssv|I32 flags
 Apd    |STRLEN |sv_utf8_upgrade_flags|SV *sv|I32 flags
 Apd    |char*  |sv_pvn_force_flags|SV* sv|STRLEN* lp|I32 flags
-Ap     |char*  |sv_2pv_flags   |SV* sv|STRLEN* lp|I32 flags
+Apd    |char*  |sv_2pv_flags   |SV* sv|STRLEN* lp|I32 flags
 Ap     |char*  |my_atof2       |const char *s|NV* value