#define my_puts(a) if(puts(a) < 0) exit(666)
-static char *cmds[] = { "perl","-e", "$|=1; print qq[ok 5\\n]", NULL };
+static const char * cmds [] = { "perl", "-e", "$|=1; print qq[ok 5\\n]", NULL };
#ifdef PERL_GLOBAL_STRUCT_PRIVATE
static struct perl_vars *my_plvarsp;
#endif
#ifdef NO_ENV_ARRAY_IN_MAIN
-extern char **environ;
-int main(int argc, char **argv)
+int main(int argc, char **argv) {
+ char **env;
#else
-int main(int argc, char **argv, char **env)
+int main(int argc, char **argv, char **env) {
#endif
-{
PerlInterpreter *my_perl;
#ifdef PERL_GLOBAL_STRUCT
dVAR;
(void)argc; /* PERL_SYS_INIT3 may #define away their use */
(void)argv;
-#ifdef NO_ENV_ARRAY_IN_MAIN
- PERL_SYS_INIT3(&argc,&argv,&environ);
-#else
- PERL_SYS_INIT3(&argc,&argv,&env);
-#endif
+ PERL_SYS_INIT3(&argc, &argv, &env);
my_perl = perl_alloc();
my_puts("ok 3");
-#ifdef NO_ENV_ARRAY_IN_MAIN
- perl_parse(my_perl, NULL, (sizeof(cmds)/sizeof(char *))-1, cmds, environ);
-#else
- perl_parse(my_perl, NULL, (sizeof(cmds)/sizeof(char *))-1, cmds, env);
-#endif
+ perl_parse(my_perl, NULL, (sizeof(cmds)/sizeof(char *))-1, (char **)cmds, env);
my_puts("ok 4");