[5.004_61 PATCH] Make incompatible changes to RE engine NOW
[p5sagit/p5-mst-13.2.git] / perl.h
diff --git a/perl.h b/perl.h
index 686752c..0f9b22d 100644 (file)
--- a/perl.h
+++ b/perl.h
 #  ifdef __GNUC__
 #    define stringify_immed(s) #s
 #    define stringify(s) stringify_immed(s)
+#ifdef EMBED
+register struct op *Perl_op asm(stringify(OP_IN_REGISTER));
+#else
 register struct op *op asm(stringify(OP_IN_REGISTER));
+#endif
 #  endif
 #endif
 
@@ -118,10 +122,6 @@ register struct op *op asm(stringify(OP_IN_REGISTER));
 # define DONT_DECLARE_STD 1
 #endif
 
-#if defined(NeXT) && !defined(_POSIX_SOURCE)
-#   define MISSING_PID_T
-#endif
-
 #if defined(HASVOLATILE) || defined(STANDARD_C)
 #   ifdef __cplusplus
 #      define VOL              // to temporarily suppress warnings
@@ -138,10 +138,6 @@ register struct op *op asm(stringify(OP_IN_REGISTER));
 #define TAINT_ENV()    if (tainting) { taint_env(); }
 #define TAINT_PROPER(s)        if (tainting) { taint_proper(no_security, s); }
 
-#ifdef MISSING_PID_T
-typedef int pid_t;
-#endif
-
 /* XXX All process group stuff is handled in pp_sys.c.  Should these 
    defines move there?  If so, I could simplify this a lot. --AD  9/96.
 */
@@ -792,7 +788,11 @@ Free_t   Perl_free _((Malloc_t where));
 #  ifdef MAXUSHORT
 #    define PERL_USHORT_MAX ((unsigned short)MAXUSHORT)
 #  else
-#    define PERL_USHORT_MAX       ((unsigned short)~(unsigned)0)
+#    ifdef USHRT_MAX
+#      define PERL_USHORT_MAX ((unsigned short)USHRT_MAX)
+#    else
+#      define PERL_USHORT_MAX       ((unsigned short)~(unsigned)0)
+#    endif
 #  endif
 #endif
 
@@ -802,7 +802,11 @@ Free_t   Perl_free _((Malloc_t where));
 #  ifdef MAXSHORT    /* Often used in <values.h> */
 #    define PERL_SHORT_MAX ((short)MAXSHORT)
 #  else
-#    define PERL_SHORT_MAX      ((short) (PERL_USHORT_MAX >> 1))
+#    ifdef SHRT_MAX
+#      define PERL_SHORT_MAX ((short)SHRT_MAX)
+#    else
+#      define PERL_SHORT_MAX      ((short) (PERL_USHORT_MAX >> 1))
+#    endif
 #  endif
 #endif
 
@@ -812,7 +816,11 @@ Free_t   Perl_free _((Malloc_t where));
 #  ifdef MINSHORT
 #    define PERL_SHORT_MIN ((short)MINSHORT)
 #  else
-#    define PERL_SHORT_MIN        (-PERL_SHORT_MAX - ((3 & -1) == 3))
+#    ifdef SHRT_MIN
+#      define PERL_SHORT_MIN ((short)SHRT_MIN)
+#    else
+#      define PERL_SHORT_MIN        (-PERL_SHORT_MAX - ((3 & -1) == 3))
+#    endif
 #  endif
 #endif
 
@@ -1108,6 +1116,8 @@ union any {
 #include "hv.h"
 #include "mg.h"
 #include "scope.h"
+#include "bytecode.h"
+#include "byterun.h"
 
 /* work around some libPW problems */
 #ifdef DOINIT