Make Power MachTen use vfork and perl's malloc
[p5sagit/p5-mst-13.2.git] / cop.h
diff --git a/cop.h b/cop.h
index 5eebaba..478bfd4 100644 (file)
--- a/cop.h
+++ b/cop.h
@@ -114,7 +114,8 @@ struct block_loop {
     SV *       itersave;
     SV *       iterlval;
     AV *       iterary;
-    I32                iterix;
+    IV         iterix;
+    IV         itermax;
 };
 
 #define PUSHLOOP(cx, ivar, s)                                          \
@@ -285,11 +286,13 @@ struct context {
 #define G_EVAL         4       /* Assume eval {} around subroutine call. */
 #define G_NOARGS       8       /* Don't construct a @_ array. */
 #define G_KEEPERR      16      /* Append errors to $@, don't overwrite it */
+#define G_NODEBUG      32      /* Disable debugging at toplevel.  */
 
 /* Support for switching (stack and block) contexts.
  * This ensures magic doesn't invalidate local stack and cx pointers.
  */
 
+#define SI_UNKNOWN     -1
 #define SI_UNDEF       0
 #define SI_MAIN                1
 #define SI_MAGIC       2
@@ -299,6 +302,7 @@ struct context {
 #define SI_DESTROY     6
 #define SI_WARNHOOK    7
 #define SI_DIEHOOK     8
+#define SI_REQUIRE     9
 
 struct stackinfo {
     AV *               si_stack;       /* stack for current runlevel */
@@ -325,7 +329,7 @@ typedef struct stackinfo PERL_SI;
 #  define      SET_MARKBASE NOOP
 #endif
 
-#define PUSHSTACK(type) \
+#define PUSHSTACKi(type) \
     STMT_START {                                                       \
        PERL_SI *next = curstackinfo->si_next;                          \
        if (!next) {                                                    \
@@ -341,7 +345,9 @@ typedef struct stackinfo PERL_SI;
        SET_MARKBASE;                                                   \
     } STMT_END
 
-#define POPSTACK() \
+#define PUSHSTACK PUSHSTACKi(SI_UNKNOWN)
+
+#define POPSTACK \
     STMT_START {                                                       \
        PERL_SI *prev = curstackinfo->si_prev;                          \
        if (!prev) {                                                    \
@@ -357,6 +363,6 @@ typedef struct stackinfo PERL_SI;
     STMT_START {                                                       \
        while (curstack != s) {                                         \
            dounwind(-1);                                               \
-           POPSTACK();                                                 \
+           POPSTACK;                                                   \
        }                                                               \
     } STMT_END