- make creating Makefile.micro automatic (by pumpkin)
-- clean up compilation warnings as much as possible:
- most of them seem to stem from not including enough headers (as planned)
- to have enough prototypes, these may be correctible with some simple casts
-
-- do away with signals? (not very portable outside UNIX lands)
- (missing signal API prototypes cause the majority of the compilation
- warnings anyway)
-
- do away with fork/exec/wait? (system, popen should be enough?)
- some of the uconfig.sh really needs to be probed (using cc) in buildtime:
#define PERL_IN_DOOP_C
#include "perl.h"
+#ifndef PERL_MICRO
#if !defined(NSIG) || defined(M_UNIX) || defined(M_XENIX)
#include <signal.h>
#endif
+#endif
STATIC I32
S_do_trans_CC_simple(pTHX_ SV *sv)
return 0;
}
+#ifndef PERL_MICRO
int
Perl_magic_getsig(pTHX_ SV *sv, MAGIC *mg)
{
}
return 0;
}
+#endif /* !PERL_MICRO */
int
Perl_magic_setisa(pTHX_ SV *sv, MAGIC *mg)
validate_suid(validarg, scriptname,fdscript);
+#ifndef PERL_MICRO
#if defined(SIGCHLD) || defined(SIGCLD)
{
#ifndef SIGCHLD
}
}
#endif
+#endif
#ifdef MACOS_TRADITIONAL
if (PL_doextract || gMacPerl_AlwaysExtract) {
if (xsinit)
(*xsinit)(aTHXo); /* in case linked C routines want magical variables */
+#ifndef PERL_MICRO
#if defined(VMS) || defined(WIN32) || defined(DJGPP) || defined(__CYGWIN__)
init_os_extras();
#endif
+#endif
#ifdef USE_SOCKS
SOCKSinit(argv[0]);
0, MEMBER_TO_FPTR(Perl_magic_clearenv),
0};
EXT MGVTBL PL_vtbl_sig = {0, 0, 0, 0, 0};
+#ifdef PERL_MICRO
+EXT MGVTBL PL_vtbl_sigelem = {0, 0, 0, 0, 0};
+#else
EXT MGVTBL PL_vtbl_sigelem = {MEMBER_TO_FPTR(Perl_magic_getsig),
MEMBER_TO_FPTR(Perl_magic_setsig),
0, MEMBER_TO_FPTR(Perl_magic_clearsig),
0};
+#endif
EXT MGVTBL PL_vtbl_pack = {0, 0, MEMBER_TO_FPTR(Perl_magic_sizepack), MEMBER_TO_FPTR(Perl_magic_wipepack),
0};
EXT MGVTBL PL_vtbl_packelem = {MEMBER_TO_FPTR(Perl_magic_getpack),
}
}
PERL_FLUSHALL_FOR_CHILD;
-#if (defined(HAS_FORK) || defined(AMIGAOS)) && !defined(VMS) && !defined(OS2) && !defined(__CYGWIN__)
+#if (defined(HAS_FORK) || defined(AMIGAOS)) && !defined(VMS) && !defined(OS2) && !defined(__CYGWIN__) || defined(PERL_MICRO)
if (PerlProc_pipe(pp) >= 0)
did_pipes = 1;
while ((childpid = vfork()) == -1) {
if (childpid > 0) {
if (did_pipes)
PerlLIO_close(pp[1]);
+#ifndef PERL_MICRO
rsignal_save(SIGINT, SIG_IGN, &ihand);
rsignal_save(SIGQUIT, SIG_IGN, &qhand);
+#endif
do {
result = wait4pid(childpid, &status, 0);
} while (result == -1 && errno == EINTR);
+#ifndef PERL_MICRO
(void)rsignal_restore(SIGINT, &ihand);
(void)rsignal_restore(SIGQUIT, &qhand);
+#endif
STATUS_NATIVE_SET(result == -1 ? -1 : status);
do_execfree(); /* free any memory child malloced on vfork */
SP = ORIGMARK;
#define PERL_IN_UTIL_C
#include "perl.h"
+#ifndef PERL_MICRO
#if !defined(NSIG) || defined(M_UNIX) || defined(M_XENIX)
#include <signal.h>
#endif
#ifndef SIG_ERR
# define SIG_ERR ((Sighandler_t) -1)
#endif
+#endif
/* XXX If this causes problems, set i_unistd=undef in the hint file. */
#ifdef I_UNISTD
}
#endif
-
+#ifndef PERL_MICRO
#ifdef HAS_SIGACTION
Sighandler_t
}
#endif /* !HAS_SIGACTION */
+#endif /* !PERL_MICRO */
/* VMS' my_pclose() is in VMS.c; same with OS/2 */
#if (!defined(DOSISH) || defined(HAS_FORK) || defined(AMIGAOS)) && !defined(VMS) && !defined(__OPEN_VM) && !defined(EPOC) && !defined(MACOS_TRADITIONAL)
#ifdef UTS
if(PerlProc_kill(pid, 0) < 0) { return(pid); } /* HOM 12/23/91 */
#endif
+#ifndef PERL_MICRO
rsignal_save(SIGHUP, SIG_IGN, &hstat);
rsignal_save(SIGINT, SIG_IGN, &istat);
rsignal_save(SIGQUIT, SIG_IGN, &qstat);
+#endif
do {
pid2 = wait4pid(pid, &status, 0);
} while (pid2 == -1 && errno == EINTR);
+#ifndef PERL_MICRO
rsignal_restore(SIGHUP, &hstat);
rsignal_restore(SIGINT, &istat);
rsignal_restore(SIGQUIT, &qstat);
+#endif
if (close_failed) {
SETERRNO(saved_errno, saved_vaxc_errno);
return -1;