integrate mainline to get tr.t
[p5sagit/p5-mst-13.2.git] / perl.h
diff --git a/perl.h b/perl.h
index 180d989..2871d80 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -75,11 +75,11 @@ pointer to the PERL_OBJECT. This pointer type is CPerlObj*. This is
 made transparent to extension developers by the following macros:
        #define var pPerl->Perl_var
        #define func pPerl->Perl_func
-       * these are done in ObjXSub.h
+       * these are done in objXSUB.h
 This requires that the extension be compiled as C++, which means
 that the code must be ANSI C and not K&R C. For K&R extensions,
 please see the C API notes located in Win32/GenCAPI.pl. This script
-creates a PerlCAPI.lib that provides a K & R compatible C interface
+creates a perlCAPI.lib that provides a K & R compatible C interface
 to the PERL_OBJECT.
 2. Local variables and functions cannot have the same name as perl's
 variables or functions since the macros will redefine these. Look for
@@ -111,9 +111,9 @@ class CPerlObj;
 #define PERL_OBJECT_THIS this
 #define _PERL_OBJECT_THIS ,this
 #define PERL_OBJECT_THIS_ this,
-#define CALLRUNOPS (this->*runops)
-#define CALLREGCOMP (this->*regcompp)
-#define CALLREGEXEC (this->*regexecp)
+#define CALLRUNOPS (this->*PL_runops)
+#define CALLREGCOMP (this->*PL_regcompp)
+#define CALLREGEXEC (this->*PL_regexecp)
 
 #else /* !PERL_OBJECT */
 
@@ -209,6 +209,12 @@ register struct op *op asm(stringify(OP_IN_REGISTER));
 #   define LIBERAL 1
 #endif
 
+#if 'A' == 65 && 'I' == 73 && 'J' == 74 && 'Z' == 90
+#define ASCIIish
+#else
+#undef  ASCIIish
+#endif
+
 /*
  * The following contortions are brought to you on behalf of all the
  * standards, semi-standards, de facto standards, not-so-de-facto standards
@@ -296,6 +302,19 @@ register struct op *op asm(stringify(OP_IN_REGISTER));
 #  endif
 #endif
 
+/* HP-UX 10.X CMA (Common Multithreaded Architecure) insists that
+   pthread.h must be included before all other header files.
+*/
+#if defined(USE_THREADS) && defined(PTHREAD_H_FIRST)
+#  include <pthread.h>
+#endif
+
+/* HP-UX 10.X CMA (Common Multithreaded Architecure) insists that
+   pthread.h must be included before all other header files.
+*/
+#if defined(USE_THREADS) && defined(PTHREAD_H_FIRST)
+#  include <pthread.h>
+#endif
 #ifndef _TYPES_                /* If types.h defines this it's easy. */
 #   ifndef major               /* Does everyone's types.h define this? */
 #      include <sys/types.h>
@@ -585,7 +604,7 @@ Free_t   Perl_free _((Malloc_t where));
            set_vaxc_errno(vmserrcode); \
        } STMT_END
 #else
-#   define SETERRNO(errcode,vmserrcode) errno = (errcode)
+#   define SETERRNO(errcode,vmserrcode) (errno = (errcode))
 #endif
 
 #ifdef USE_THREADS
@@ -601,7 +620,11 @@ Free_t   Perl_free _((Malloc_t where));
 #endif /* USE_THREADS */
 
 #ifndef errno
-       extern int errno;     /* ANSI allows errno to be an lvalue expr */
+       extern int errno;     /* ANSI allows errno to be an lvalue expr.
+                              * For example in multithreaded environments
+                              * something like this might happen:
+                              * extern int *_errno(void);
+                              * #define errno (*_errno()) */
 #endif
 
 #ifdef HAS_STRERROR
@@ -788,6 +811,10 @@ Free_t   Perl_free _((Malloc_t where));
 #undef UV
 #endif
 
+#ifdef I_INTTYPES
+#include <inttypes.h>
+#endif
+
 /*  XXX QUAD stuff is not currently supported on most systems.
     Specifically, perl internals don't support long long.  Among
     the many problems is that some compilers support long long,
@@ -801,42 +828,93 @@ Free_t   Perl_free _((Malloc_t where));
     --Andy Dougherty   August 1996
 */
 
-#ifdef cray
-#   define Quad_t int
-#else
-#   ifdef convex
-#      define Quad_t long long
-#   else
-#      if LONGSIZE == 8
-#          define Quad_t long
-#      endif
+/*  Much more 64-bit probing added.  Now we should get Quad_t
+    in most systems: int64_t, long long, long, int, will do.
+
+    Beware of LP32 systems (ILP32, ILP32LL64).  Such systems have been
+    used to sizeof(long) == sizeof(foo*).  This is a bad assumption
+    because then IV/UV have been 32 bits, too.  Which, in turn means
+    that even if the system has quads (e.g. long long), IV cannot be a
+    quad.  Introducing a 64-bit IV (because of long long existing)
+    will introduce binary incompatibility.
+
+    Summary: a long long system needs to add -DUSE_LONG_LONG to $ccflags
+    to get quads -- and if its pointers are still 32 bits, this will break
+    binary compatibility.  Casting an IV (a long long) to a pointer will
+    truncate half of the IV away.
+
+    --jhi              September 1998 */
+
+#if INTSIZE == 4 && LONGSIZE == 4 && PTRSIZE == 4
+#   define PERL_ILP32
+#   if defined(HAS_LONG_LONG) && LONGLONGSIZE == 8
+#       define PERL_ILP32LL64
 #   endif
 #endif
 
-/* XXX Experimental set-up for long long.  Just add -DUSE_LONG_LONG
-   to your ccflags.  --Andy Dougherty   4/1998
-*/
-#ifdef USE_LONG_LONG
-#  if defined(HAS_LONG_LONG) && LONGLONGSIZE == 8
-#    define Quad_t long long
-#  endif
+#if LONGSIZE == 8 && PTRSIZE == 8
+#   define PERL_LP64
+#   if INTSIZE == 8
+#        define PERL_ILP64
+#   endif
+#endif
+
+#ifdef HAS_INT64_T
+#   define Quad_t int64_t
+#   define PERL_QUAD_IS_INT64_T
+#else
+#   if LONGSIZE == 8
+#       define Quad_t long
+#       define PERL_QUAD_IS_LONG
+#   else
+#       ifdef USE_LONG_LONG /* See above note about LP32. --jhi */
+#           if defined(HAS_LONG_LONG) && LONGLONGSIZE == 8
+#               define Quad_t long long
+#                define PERL_QUAD_IS_LONG_LONG
+#           endif
+#       endif
+#       ifndef Quad_t
+#          if INTSIZE == 8
+#              define Quad_t int
+#               define PERL_QUAD_IS_INT
+#          endif
+#       endif
+#   endif
 #endif
 
 #ifdef Quad_t
 #   define HAS_QUAD
-    typedef Quad_t IV;
-    typedef unsigned Quad_t UV;
-#   define IV_MAX PERL_QUAD_MAX
-#   define IV_MIN PERL_QUAD_MIN
-#   define UV_MAX PERL_UQUAD_MAX
-#   define UV_MIN PERL_UQUAD_MIN
+#endif
+
+/* See above note on LP32 about the PTRSIZE test. --jhi */
+#if defined(HAS_QUAD) && (PTRSIZE > 4 || defined(USE_LONG_LONG))
+   typedef          Quad_t IV;
+   typedef unsigned Quad_t UV;
+#  if defined(PERL_QUAD_IS_INT64_T) && defined(INT64_MAX)
+#    define IV_MAX INT64_MAX
+#    define IV_MIN INT64_MIN
+#    define UV_MAX UINT64_MAX
+#    define UV_MIN UINT64_MIN
+#  else
+#    define IV_MAX PERL_QUAD_MAX
+#    define IV_MIN PERL_QUAD_MIN
+#    define UV_MAX PERL_UQUAD_MAX
+#    define UV_MIN PERL_UQUAD_MIN
+#  endif
 #else
-    typedef long IV;
-    typedef unsigned long UV;
-#   define IV_MAX PERL_LONG_MAX
-#   define IV_MIN PERL_LONG_MIN
-#   define UV_MAX PERL_ULONG_MAX
-#   define UV_MIN PERL_ULONG_MIN
+   typedef          long IV;
+   typedef unsigned long UV;
+#  if defined(INT32_MAX) && LONGSIZE == 4
+#    define IV_MAX INT32_MAX
+#    define IV_MIN INT32_MIN
+#    define UV_MAX UINT32_MAX
+#    define UV_MIN UINT32_MIN
+#  else
+#    define IV_MAX PERL_LONG_MAX
+#    define IV_MIN PERL_LONG_MIN
+#    define UV_MAX PERL_ULONG_MAX
+#    define UV_MIN PERL_ULONG_MIN
+#  endif
 #endif
 
 /* Previously these definitions used hardcoded figures. 
@@ -1083,6 +1161,123 @@ typedef union any ANY;
 
 #include "handy.h"
 
+#ifdef USE_64_BITS
+#   ifdef USE_64_BIT_FILES
+#       ifndef USE_64_BIT_IO
+#          define USE_64_BIT_IO
+#       endif
+#       ifndef USE_64_BIT_STDIO
+#           define USE_64_BIT_STDIO
+#       endif
+#       ifndef USE_64_BIT_DBM
+#           define USE_64_BIT_DBM
+#       endif
+#   endif
+#   ifdef USE_64_BIT_IO
+#       ifdef HAS_FSTAT64
+#           define fstat fstat64
+#       endif
+#       ifdef HAS_FTRUNCATE64
+#           define ftruncate ftruncate64
+#       endif
+#       ifdef HAS_LSEEK64
+#           define lseek lseek64
+#           ifdef HAS_OFF64_T
+#               undef Off_t
+#               define Off_t off64_t
+#           endif
+#       endif
+#       ifdef HAS_LSTAT64
+#           define lstat lstat64
+#       endif
+       /* Some systems have open64() in libc but use that only
+        * for true LP64 mode, in mixed mode (ILP32LL64, for example)
+        * they use the vanilla open().  Such systems should undefine
+        * d_open64 in their hints files. --jhi */
+#       if defined(HAS_OPEN64)
+#           define open open64
+#       endif
+#       ifdef HAS_OPENDIR64
+#           define opendir opendir64
+#       endif
+#       ifdef HAS_READDIR64
+#           define readdir readdir64
+#          ifdef HAS_STRUCT_DIRENT64
+#               define dirent dirent64
+#           endif
+#       endif
+#       ifdef HAS_SEEKDIR64
+#           define seekdir seekdir64
+#       endif
+#       ifdef HAS_STAT64
+#           define stat stat64 /* Affects also struct stat, hopefully okay. */
+#       endif
+#       ifdef HAS_TELLDIR64
+#           define telldir telldir64
+#       endif
+#       ifdef HAS_TRUNCATE64
+#           define truncate truncate64
+#       endif
+        /* flock is not #defined here to be flock64 because it seems
+          that a system may have struct flock64 but still use flock()
+          and not flock64().  The actual flocking code in pp_sys.c
+          must be changed.  Also lockf and lockf64 must be dealt
+          with in pp_sys.c. --jhi */
+#   endif
+#   ifdef USE_64_BIT_STDIO
+#       ifdef HAS_FGETPOS64
+#           define fgetpos fgetpos64
+#       endif
+#       ifdef HAS_FOPEN64
+#           define fopen fopen64
+#       endif
+#       ifdef HAS_FREOPEN64
+#           define freopen freopen64
+#       endif
+#       ifdef HAS_FSEEK64
+#           define fseek fseek64
+#       endif
+#       ifdef HAS_FSEEKO64
+#           define fseeko fseeko64
+#       endif
+#       ifdef HAS_FSETPOS64
+#           define fsetpos fsetpos64
+#       endif
+#       ifdef HAS_FTELL64
+#           define ftell ftell64
+#       endif
+#       ifdef HAS_FTELLO64
+#           define ftello ftello64
+#       endif
+#       ifdef HAS_TMPFILE64
+#           define tmpfile tmpfile64
+#       endif
+#   endif
+#   ifdef USE_64_BIT_DBM
+#       ifdef HAS_DBMINIT64
+#           define dbminit dbminit64
+#       endif
+#       ifdef HAS_DBMCLOSE64
+#           define dbmclose dbmclose64
+#       endif
+#       ifdef HAS_FETCH64
+#           define fetch fetch64
+#       endif
+#       ifdef HAS_DELETE64
+#           define delete delete64
+#       endif
+#       ifdef HAS_STORE64
+#           define store store64
+#       endif
+#       ifdef HAS_FIRSTKEY64
+#           define firstkey firstkey64
+#       endif
+#       ifdef HAS_NEXTKEY64
+#           define nextkey nextkey64
+#       endif
+#   endif
+#endif
+
 #ifdef PERL_OBJECT
 typedef I32 (*filter_t) _((CPerlObj*, int, SV *, int));
 #else
@@ -1109,7 +1304,11 @@ typedef I32 (*filter_t) _((int, SV *, int));
 #     if defined(MPE)
 #       include "mpeix/mpeixish.h"
 #     else
-#       include "unixish.h"
+#       if defined(__VOS__)
+#         include "vosish.h"
+#       else
+#         include "unixish.h"
+#       endif
 #     endif
 #   endif
 # endif
@@ -1153,20 +1352,20 @@ typedef pthread_key_t perl_key;
 
   
 #ifdef VMS
-#   define STATUS_NATIVE       statusvalue_vms
+#   define STATUS_NATIVE       PL_statusvalue_vms
 #   define STATUS_NATIVE_EXPORT \
-       ((I32)statusvalue_vms == -1 ? 44 : statusvalue_vms)
+       ((I32)PL_statusvalue_vms == -1 ? 44 : PL_statusvalue_vms)
 #   define STATUS_NATIVE_SET(n)                                                \
        STMT_START {                                                    \
-           statusvalue_vms = (n);                                      \
-           if ((I32)statusvalue_vms == -1)                             \
+           PL_statusvalue_vms = (n);                                   \
+           if ((I32)PL_statusvalue_vms == -1)                          \
                PL_statusvalue = -1;                                    \
-           else if (statusvalue_vms & STS$M_SUCCESS)                   \
+           else if (PL_statusvalue_vms & STS$M_SUCCESS)                \
                PL_statusvalue = 0;                                     \
-           else if ((statusvalue_vms & STS$M_SEVERITY) == 0)           \
-               PL_statusvalue = 1 << 8;                                        \
+           else if ((PL_statusvalue_vms & STS$M_SEVERITY) == 0)        \
+               PL_statusvalue = 1 << 8;                                \
            else                                                        \
-               PL_statusvalue = (statusvalue_vms & STS$M_SEVERITY) << 8;       \
+               PL_statusvalue = (PL_statusvalue_vms & STS$M_SEVERITY) << 8;    \
        } STMT_END
 #   define STATUS_POSIX        PL_statusvalue
 #   ifdef VMSISH_STATUS
@@ -1179,12 +1378,12 @@ typedef pthread_key_t perl_key;
            PL_statusvalue = (n);                               \
            if (PL_statusvalue != -1) {                 \
                PL_statusvalue &= 0xFFFF;                       \
-               statusvalue_vms = PL_statusvalue ? 44 : 1;      \
+               PL_statusvalue_vms = PL_statusvalue ? 44 : 1;   \
            }                                           \
-           else statusvalue_vms = -1;                  \
+           else PL_statusvalue_vms = -1;                       \
        } STMT_END
-#   define STATUS_ALL_SUCCESS  (PL_statusvalue = 0, statusvalue_vms = 1)
-#   define STATUS_ALL_FAILURE  (PL_statusvalue = 1, statusvalue_vms = 44)
+#   define STATUS_ALL_SUCCESS  (PL_statusvalue = 0, PL_statusvalue_vms = 1)
+#   define STATUS_ALL_FAILURE  (PL_statusvalue = 1, PL_statusvalue_vms = 44)
 #else
 #   define STATUS_NATIVE       STATUS_POSIX
 #   define STATUS_NATIVE_EXPORT        STATUS_POSIX
@@ -1257,8 +1456,10 @@ union any {
 #include "hv.h"
 #include "mg.h"
 #include "scope.h"
+#include "warning.h"
 #include "bytecode.h"
 #include "byterun.h"
+#include "utf8.h"
 
 /* Current curly descriptor */
 typedef struct curcur CURCUR;
@@ -1281,13 +1482,9 @@ struct _sublex_info {
     OP *sub_op;                /* "lex_op" to use */
 };
 
-#ifdef PERL_OBJECT
-struct magic_state {
-    SV* mgs_sv;
-    U32 mgs_flags;
-};
-typedef struct magic_state MGS;
+typedef struct magic_state MGS;        /* struct magic_state defined in mg.c */
 
+#ifdef PERL_OBJECT
 typedef struct {
     I32 len_min;
     I32 len_delta;
@@ -1423,6 +1620,7 @@ Gid_t getegid _((void));
 #ifndef Perl_debug_log
 #define Perl_debug_log PerlIO_stderr()
 #endif
+#undef  YYDEBUG
 #define YYDEBUG 1
 #define DEB(a)                         a
 #define DEBUG(a)   if (PL_debug)               a
@@ -1442,6 +1640,11 @@ Gid_t getegid _((void));
 #define DEBUG_H(a) if (PL_debug & 8192)        a
 #define DEBUG_X(a) if (PL_debug & 16384)       a
 #define DEBUG_D(a) if (PL_debug & 32768)       a
+#  ifdef USE_THREADS
+#    define DEBUG_S(a) if (PL_debug & (1<<16)) a
+#  else
+#    define DEBUG_S(a)
+#  endif
 #else
 #define DEB(a)
 #define DEBUG(a)
@@ -1457,10 +1660,11 @@ Gid_t getegid _((void));
 #define DEBUG_r(a)
 #define DEBUG_x(a)
 #define DEBUG_u(a)
-#define DEBUG_L(a)
+#define DEBUG_S(a)
 #define DEBUG_H(a)
 #define DEBUG_X(a)
 #define DEBUG_D(a)
+#define DEBUG_S(a)
 #endif
 #define YYMAXDEPTH 300
 
@@ -1489,8 +1693,13 @@ double atof _((const char*));
 /* All of these are in stdlib.h or time.h for ANSI C */
 Time_t time();
 struct tm *gmtime(), *localtime();
+#ifdef OEMVS
+char *(strchr)(), *(strrchr)();
+char *(strcpy)(), *(strcat)();
+#else
 char *strchr(), *strrchr();
 char *strcpy(), *strcat();
+#endif
 #endif /* ! STANDARD_C */
 
 
@@ -1568,7 +1777,7 @@ typedef Sighandler_t Sigsave_t;
 # define PAD_SV(po) pad_sv(po)
 # define RUNOPS_DEFAULT runops_debug
 #else
-# define PAD_SV(po) curpad[po]
+# define PAD_SV(po) PL_curpad[po]
 # define RUNOPS_DEFAULT runops_standard
 #endif
 
@@ -1668,6 +1877,42 @@ EXT SV  * psig_name[];
 /* fast case folding tables */
 
 #ifdef DOINIT
+#ifdef EBCDIC
+EXT unsigned char fold[] = { /* fast EBCDIC case folding table */
+    0,      1,      2,      3,      4,      5,      6,      7,
+    8,      9,      10,     11,     12,     13,     14,     15,
+    16,     17,     18,     19,     20,     21,     22,     23,
+    24,     25,     26,     27,     28,     29,     30,     31,
+    32,     33,     34,     35,     36,     37,     38,     39,
+    40,     41,     42,     43,     44,     45,     46,     47,
+    48,     49,     50,     51,     52,     53,     54,     55,
+    56,     57,     58,     59,     60,     61,     62,     63,
+    64,     65,     66,     67,     68,     69,     70,     71,
+    72,     73,     74,     75,     76,     77,     78,     79,
+    80,     81,     82,     83,     84,     85,     86,     87,
+    88,     89,     90,     91,     92,     93,     94,     95,
+    96,     97,     98,     99,     100,    101,    102,    103,
+    104,    105,    106,    107,    108,    109,    110,    111,
+    112,    113,    114,    115,    116,    117,    118,    119,
+    120,    121,    122,    123,    124,    125,    126,    127,
+    128,    'A',    'B',    'C',    'D',    'E',    'F',    'G',
+    'H',    'I',    138,    139,    140,    141,    142,    143,
+    144,    'J',    'K',    'L',    'M',    'N',    'O',    'P',
+    'Q',    'R',    154,    155,    156,    157,    158,    159,
+    160,    161,    'S',    'T',    'U',    'V',    'W',    'X',
+    'Y',    'Z',    170,    171,    172,    173,    174,    175,
+    176,    177,    178,    179,    180,    181,    182,    183,
+    184,    185,    186,    187,    188,    189,    190,    191,
+    192,    'a',    'b',    'c',    'd',    'e',    'f',    'g',
+    'h',    'i',    202,    203,    204,    205,    206,    207,
+    208,    'j',    'k',    'l',    'm',    'n',    'o',    'p',
+    'q',    'r',    218,    219,    220,    221,    222,    223,
+    224,    225,    's',    't',    'u',    'v',    'w',    'x',
+    'y',    'z',    234,    235,    236,    237,    238,    239,
+    240,    241,    242,    243,    244,    245,    246,    247,
+    248,    249,    250,    251,    252,    253,    254,    255
+};
+#else   /* ascii rather than ebcdic */
 EXTCONST  unsigned char fold[] = {
        0,      1,      2,      3,      4,      5,      6,      7,
        8,      9,      10,     11,     12,     13,     14,     15,
@@ -1702,6 +1947,7 @@ EXTCONST  unsigned char fold[] = {
        240,    241,    242,    243,    244,    245,    246,    247,
        248,    249,    250,    251,    252,    253,    254,    255
 };
+#endif  /* !EBCDIC */
 #else
 EXTCONST unsigned char fold[];
 #endif
@@ -1746,6 +1992,42 @@ EXT unsigned char fold_locale[];
 #endif
 
 #ifdef DOINIT
+#ifdef EBCDIC
+EXT unsigned char freq[] = {/* EBCDIC frequencies for mixed English/C */
+    1,      2,      84,     151,    154,    155,    156,    157,
+    165,    246,    250,    3,      158,    7,      18,     29,
+    40,     51,     62,     73,     85,     96,     107,    118,
+    129,    140,    147,    148,    149,    150,    152,    153,
+    255,      6,      8,      9,     10,     11,     12,     13,
+     14,     15,     24,     25,     26,     27,     28,    226,
+     29,     30,     31,     32,     33,     43,     44,     45,
+     46,     47,     48,     49,     50,     76,     77,     78,
+     79,     80,     81,     82,     83,     84,     85,     86,
+     87,     94,     95,    234,    181,    233,    187,    190,
+    180,     96,     97,     98,     99,    100,    101,    102,
+    104,    112,    182,    174,    236,    232,    229,    103,
+    228,    226,    114,    115,    116,    117,    118,    119,
+    120,    121,    122,    235,    176,    230,    194,    162,
+    130,    131,    132,    133,    134,    135,    136,    137,
+    138,    139,    201,    205,    163,    217,    220,    224,
+    5,      248,    227,    244,    242,    255,    241,    231,
+    240,    253,    16,     197,    19,     20,     21,     187,
+    23,     169,    210,    245,    237,    249,    247,    239,
+    168,    252,    34,     196,    36,     37,     38,     39,
+    41,     42,     251,    254,    238,    223,    221,    213,
+    225,    177,    52,     53,     54,     55,     56,     57,
+    58,     59,     60,     61,     63,     64,     65,     66,
+    67,     68,     69,     70,     71,     72,     74,     75,
+    205,    208,    186,    202,    200,    218,    198,    179,
+    178,    214,    88,     89,     90,     91,     92,     93,
+    217,    166,    170,    207,    199,    209,    206,    204,
+    160,    212,    105,    106,    108,    109,    110,    111,
+    203,    113,    216,    215,    192,    175,    193,    243,
+    172,    161,    123,    124,    125,    126,    127,    128,
+    222,    219,    211,    195,    188,    193,    185,    184,
+    191,    183,    141,    142,    143,    144,    145,    146
+};
+#else  /* ascii rather than ebcdic */
 EXTCONST unsigned char freq[] = {      /* letter frequencies for mixed English/C */
        1,      2,      84,     151,    154,    155,    156,    157,
        165,    246,    250,    3,      158,    7,      18,     29,
@@ -1780,6 +2062,7 @@ EXTCONST unsigned char freq[] = { /* letter frequencies for mixed English/C */
        130,    131,    132,    133,    134,    135,    136,    137,
        138,    139,    141,    142,    143,    144,    145,    146
 };
+#endif
 #else
 EXTCONST unsigned char freq[];
 #endif
@@ -1822,6 +2105,10 @@ typedef enum {
                                   stuffing into op->op_private */
 #define HINT_INTEGER           0x00000001
 #define HINT_STRICT_REFS       0x00000002
+/* #define HINT_notused4       0x00000004 */
+#define HINT_UTF8              0x00000008
+/* #define HINT_notused10      0x00000010 */
+                               /* Note: 20,40,80 used for NATIVE_HINTS */
 
 #define HINT_BLOCK_SCOPE       0x00000100
 #define HINT_STRICT_SUBS       0x00000200
@@ -1838,6 +2125,8 @@ typedef enum {
 #define HINT_RE_TAINT          0x00100000
 #define HINT_RE_EVAL           0x00200000
 
+#define HINT_FILETEST_ACCESS   0x00400000
+
 /* Various states of an input record separator SV (rs, nrs) */
 #define RsSNARF(sv)   (! SvOK(sv))
 #define RsSIMPLE(sv)  (SvOK(sv) && SvCUR(sv))
@@ -1989,6 +2278,12 @@ typedef void *Thread;
 #endif
 
 #ifdef PERL_OBJECT
+/*
+ * The following is a buffer where new variables must
+ * be defined to maintain binary compatibility with PERL_OBJECT
+ * for 5.005
+ */
+PERLVAR(object_compatibility[30],      char)
 };
 
 #include "objpp.h"
@@ -2081,6 +2376,8 @@ EXT MGVTBL vtbl_defelem = {magic_getdefelem,magic_setdefelem,
                                        0,      0,      0};
 
 EXT MGVTBL vtbl_regexp = {0,0,0,0, magic_freeregexp};
+EXT MGVTBL vtbl_regdata = {0, 0, magic_regdata_cnt, 0, 0};
+EXT MGVTBL vtbl_regdatum = {magic_regdatum_get, 0, 0, 0, 0};
 
 #ifdef USE_LOCALE_COLLATE
 EXT MGVTBL vtbl_collxfrm = {0,
@@ -2125,6 +2422,8 @@ EXT MGVTBL vtbl_mutex;
 
 EXT MGVTBL vtbl_defelem;
 EXT MGVTBL vtbl_regexp;
+EXT MGVTBL vtbl_regdata;
+EXT MGVTBL vtbl_regdatum;
 
 #ifdef USE_LOCALE_COLLATE
 EXT MGVTBL vtbl_collxfrm;