2 * "The Road goes ever on and on, down from the door where it began."
7 /* sbrk is limited to first heap segement so make it big */
8 #pragma runopts(HEAP(8M,500K,ANYWHERE,KEEP,8K,4K) STACK(,,ANY,) ALL31(ON))
10 #pragma runopts(HEAP(2M,500K,ANYWHERE,KEEP,8K,4K) STACK(,,ANY,) ALL31(ON))
16 #define PERL_IN_MINIPERLMAIN_C
19 static void xs_init (pTHX);
20 static PerlInterpreter *my_perl;
22 #if defined (__MINT__) || defined (atarist)
23 /* The Atari operating system doesn't have a dynamic stack. The
24 stack size is determined from this value. */
25 long _stksize = 64 * 1024;
29 main(int argc, char **argv, char **env)
33 #ifdef PERL_GLOBAL_STRUCT
34 #define PERLVAR(var,type) /**/
35 #define PERLVARA(var,type) /**/
36 #define PERLVARI(var,type,init) PL_Vars.var = init;
37 #define PERLVARIC(var,type,init) PL_Vars.var = init;
45 /* if user wants control of gprof profiling off by default */
46 /* noop unless Configure is given -Accflags=-DPERL_GPROF_CONTROL */
47 PERL_GPROF_MONCONTROL(0);
49 PERL_SYS_INIT3(&argc,&argv,&env);
51 #if defined(USE_5005THREADS) || defined(USE_ITHREADS)
52 /* XXX Ideally, this should really be happening in perl_alloc() or
53 * perl_construct() to keep libperl.a transparently fork()-safe.
54 * It is currently done here only because Apache/mod_perl have
55 * problems due to lack of a call to cancel pthread_atfork()
56 * handlers when shared objects that contain the handlers may
57 * be dlclose()d. This forces applications that embed perl to
58 * call PTHREAD_ATFORK() explicitly, but if and only if it hasn't
59 * been called at least once before in the current process.
60 * --GSAR 2001-07-20 */
61 PTHREAD_ATFORK(Perl_atfork_lock,
67 my_perl = perl_alloc();
70 perl_construct(my_perl);
71 PL_perl_destruct_level = 0;
73 PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
74 exitstatus = perl_parse(my_perl, xs_init, argc, argv, (char **)NULL);
77 exitstatus = perl_destruct(my_perl);
79 perl_destruct(my_perl);
90 /* Register any extra external extensions */
92 /* Do not delete this line--writemain depends on it */