#ifdef DJGPP
# define BIT_BUCKET "nul"
# define OP_BINARY O_BINARY
-# define PERL_SYS_INIT(c,v) \
+# define PERL_SYS_INIT_BODY(c,v) \
MALLOC_CHECK_TAINT2(*c,*v) Perl_DJGPP_init(c,v); PERLIO_INIT
# define init_os_extras Perl_init_os_extras
# define HAS_UTIME
# define PERL_FS_VER_FMT "%d_%d_%d"
#else /* DJGPP */
# ifdef WIN32
-# define PERL_SYS_INIT(c,v) \
+# define PERL_SYS_INIT_BODY(c,v) \
MALLOC_CHECK_TAINT2(*c,*v) Perl_win32_init(c,v); PERLIO_INIT
-# define PERL_SYS_TERM() Perl_win32_term()
+# define PERL_SYS_TERM_BODY() Perl_win32_term()
# define BIT_BUCKET "nul"
# else
# ifdef NETWARE
-# define PERL_SYS_INIT(c,v) \
+# define PERL_SYS_INIT_BODY(c,v) \
MALLOC_CHECK_TAINT2(*c,*v) Perl_nw5_init(c,v); PERLIO_INIT
# define BIT_BUCKET "nwnul"
# else
-# define PERL_SYS_INIT(c,v) \
+# define PERL_SYS_INIT_BODY(c,v) \
MALLOC_CHECK_TAINT2(*c,*v); PERLIO_INIT
# define BIT_BUCKET "\\dev\\nul" /* "wanna be like, umm, Newlined, or somethin?" */
# endif /* NETWARE */
# endif
#endif /* DJGPP */
-#ifndef PERL_SYS_TERM
-# define PERL_SYS_TERM() HINTS_REFCNT_TERM; OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM
+#ifndef PERL_SYS_TERM_BODY
+# define PERL_SYS_TERM_BODY() HINTS_REFCNT_TERM; OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM
#endif
#define dXSUB_SYS
pd |void |mro_isa_changed_in|NN HV* stash
Apd |void |mro_method_changed_in |NN HV* stash
p |void |boot_core_mro
+Apon |void |sys_init |NN int* argc|NN char*** argv
+Apon |void |sys_init3 |NN int* argc|NN char*** argv|NN char*** env
+Apo |void |sys_term
+
END_EXTERN_C
/*
/* epocemx setenv bug workaround */
-#ifndef PERL_SYS_INIT
-# define PERL_SYS_INIT(c,v) \
+#ifndef PERL_SYS_INIT_BODY
+# define PERL_SYS_INIT_BODY(c,v) \
MALLOC_CHECK_TAINT2(*c,*v) putenv(".dummy=foo"); putenv(".dummy"); \
PERLIO_INIT; MALLOC_INIT
#endif
-#ifndef PERL_SYS_TERM
-#define PERL_SYS_TERM() PERLIO_TERM; MALLOC_TERM
+#ifndef PERL_SYS_TERM_BODY
+#define PERL_SYS_TERM_BODY() PERLIO_TERM; MALLOC_TERM
#endif
#define BIT_BUCKET "/dev/null"
Perl_get_re_arg
Perl_mro_get_linear_isa
Perl_mro_method_changed_in
+Perl_sys_init
+Perl_sys_init3
+Perl_sys_term
# ex: set ro:
#define Fflush(fp) fflush(fp)
#define Mkdir(path,mode) mkdir((path),(mode))
-#ifndef PERL_SYS_INIT
-# define PERL_SYS_INIT(c,v) PERL_FPU_INIT; PERLIO_INIT; MALLOC_INIT
+#ifndef PERL_SYS_INIT_BODY
+# define PERL_SYS_INIT_BODY(c,v) PERL_FPU_INIT; PERLIO_INIT; MALLOC_INIT
#endif
-#ifndef PERL_SYS_TERM
-#define PERL_SYS_TERM() PERLIO_TERM; MALLOC_TERM
+#ifndef PERL_SYS_TERM_BODY
+#define PERL_SYS_TERM_BODY() PERLIO_TERM; MALLOC_TERM
#endif
#define BIT_BUCKET "/dev/null"
/* These ones should be in the same block as PERL_SYS_TERM() */
#ifdef PERL_CORE
-# define PERL_SYS_INIT3(argcp, argvp, envp) \
+# define PERL_SYS_INIT3_BODY(argcp, argvp, envp) \
{ void *xreg[2]; \
MALLOC_CHECK_TAINT(*argcp, *argvp, *envp) \
_response(argcp, argvp); \
Perl_OS2_init3(*envp, xreg, 0); \
PERLIO_INIT
-# define PERL_SYS_INIT(argcp, argvp) { \
+# define PERL_SYS_INIT_BODY(argcp, argvp) { \
{ void *xreg[2]; \
_response(argcp, argvp); \
_wildcard(argcp, argvp); \
#else /* Compiling embedded Perl or Perl extension */
-# define PERL_SYS_INIT3(argcp, argvp, envp) \
+# define PERL_SYS_INIT3_BODY(argcp, argvp, envp) \
{ void *xreg[2]; \
Perl_OS2_init3(*envp, xreg, 0); \
PERLIO_INIT
-# define PERL_SYS_INIT(argcp, argvp) { \
+# define PERL_SYS_INIT_BODY(argcp, argvp) { \
{ void *xreg[2]; \
Perl_OS2_init3(NULL, xreg, 0); \
PERLIO_INIT
#define PERL_SYS_TERM1(xreg) \
Perl_OS2_term(xreg, 0, FORCE_EMX_DEINIT_RUN_ATEXIT)
-/* This one should come in pair with PERL_SYS_INIT() and in the same block */
-#define PERL_SYS_TERM() \
+/* This one should come in pair with PERL_SYS_INIT_BODY() and in the same block */
+#define PERL_SYS_TERM_BODY() \
PERL_SYS_TERM1(xreg); \
}
# define PERL_CALLCONV _System
#endif
-/* #define PERL_SYS_TERM() STMT_START { \
+/* #define PERL_SYS_TERM_BODY() STMT_START { \
if (Perl_HAB_set) WinTerminate(Perl_hab); } STMT_END */
#define dXSUB_SYS OS2_XS_init()
}
}
+
+/* these implement the PERL_SYS_INIT, PERL_SYS_INIT3, PERL_SYS_TERM macros */
+
+void
+Perl_sys_init(int* argc, char*** argv)
+{
+ PERL_UNUSED_ARG(argc); /* may not be used depending on _BODY macro */
+ PERL_UNUSED_ARG(argv);
+ PERL_SYS_INIT_BODY(argc, argv);
+}
+
+void
+Perl_sys_init3(int* argc, char*** argv, char*** env)
+{
+ PERL_UNUSED_ARG(argc); /* may not be used depending on _BODY macro */
+ PERL_UNUSED_ARG(argv);
+ PERL_UNUSED_ARG(env);
+ PERL_SYS_INIT3_BODY(argc, argv, env);
+}
+
+void
+Perl_sys_term(pTHX)
+{
+ PERL_SYS_TERM_BODY();
+}
+
+
#ifdef PERL_IMPLICIT_SYS
PerlInterpreter *
perl_alloc_using(struct IPerlMem* ipM, struct IPerlMem* ipMS,
# define PERL_FPU_POST_EXEC }
#endif
-#ifndef PERL_SYS_INIT3
-# define PERL_SYS_INIT3(argvp,argcp,envp) PERL_SYS_INIT(argvp,argcp)
+#ifndef PERL_SYS_INIT3_BODY
+# define PERL_SYS_INIT3_BODY(argvp,argcp,envp) PERL_SYS_INIT_BODY(argvp,argcp)
#endif
+#define PERL_SYS_INIT(argc, argv) Perl_sys_init(argc, argv)
+#define PERL_SYS_INIT3(argc, argv, env) Perl_sys_init3(argc, argv, env)
+#define PERL_SYS_TERM() Perl_sys_term(aTHX)
+
#ifndef PERL_WRITE_MSG_TO_CONSOLE
# define PERL_WRITE_MSG_TO_CONSOLE(io, msg, len) PerlIO_write(io, msg, len)
#endif
#define ABORT() kill(PerlProc_getpid(),SIGABRT);
#define BIT_BUCKET "/dev/null"
-#define PERL_SYS_INIT(c,v) \
+#define PERL_SYS_INIT_BODY(c,v) \
MALLOC_CHECK_TAINT2(*c,*v) PERLIO_INIT; MALLOC_INIT
#define dXSUB_SYS
-#define PERL_SYS_TERM() PERLIO_TERM; MALLOC_TERM
+#define PERL_SYS_TERM_BODY() PERLIO_TERM; MALLOC_TERM
/*
* fwrite1() should be a routine with the same calling sequence as fwrite(),
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV void Perl_boot_core_mro(pTHX);
+PERL_CALLCONV void Perl_sys_init(int* argc, char*** argv)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PERL_CALLCONV void Perl_sys_init3(int* argc, char*** argv, char*** env)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+PERL_CALLCONV void Perl_sys_term(pTHX);
+
END_EXTERN_C
/*
#define Fflush(fp) fflush(fp)
#define Mkdir(path,mode) mkdir((path),(mode))
-#ifndef PERL_SYS_TERM
-#define PERL_SYS_TERM() HINTS_REFCNT_TERM; OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM; CloseSTDLIB();
+#ifndef PERL_SYS_TERM_BODY
+#define PERL_SYS_TERM_BODY() HINTS_REFCNT_TERM; OP_REFCNT_TERM; \
+ PERLIO_TERM; MALLOC_TERM; CloseSTDLIB();
#endif
#define BIT_BUCKET "NUL:"
#define times(b) symbian_times(b)
#define usleep(u) symbian_usleep(u)
-#define PERL_SYS_INIT(c, v) symbian_sys_init(c, v)
+#define PERL_SYS_INIT_BODY(c, v) symbian_sys_init(c, v)
#ifdef __SERIES60_1X__
# error "Unfortunately Perl does not work in S60 1.2 (see FAQ-0929)"
#define Fflush(fp) fflush(fp)
#define Mkdir(path,mode) mkdir((path),(mode))
-#ifndef PERL_SYS_INIT
-# define PERL_SYS_INIT(c,v) \
+#ifndef PERL_SYS_INIT_BODY
+# define PERL_SYS_INIT_BODY(c,v) \
MALLOC_CHECK_TAINT2(*c,*v) PERL_FPU_INIT; PERLIO_INIT; MALLOC_INIT
#endif
-#ifndef PERL_SYS_TERM
-# define PERL_SYS_TERM() \
+#ifndef PERL_SYS_TERM_BODY
+# define PERL_SYS_TERM_BODY() \
if (!PL_veto_cleanup) { \
HINTS_REFCNT_TERM; OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM; \
}
#else
#define BIT_BUCKET "/dev/null"
#endif
-#define PERL_SYS_INIT(c,v) MALLOC_CHECK_TAINT2(*c,*v) vms_image_init((c),(v)); PERLIO_INIT; MALLOC_INIT
-#define PERL_SYS_TERM() HINTS_REFCNT_TERM; OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM
+#define PERL_SYS_INIT_BODY(c,v) MALLOC_CHECK_TAINT2(*c,*v) vms_image_init((c),(v)); PERLIO_INIT; MALLOC_INIT
+#define PERL_SYS_TERM_BODY() HINTS_REFCNT_TERM; OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM
#define dXSUB_SYS
#define HAS_KILL
#define HAS_WAIT