Re: [perl #20920] Segmentation fault ("Safe Signal" queue problem?)
[p5sagit/p5-mst-13.2.git] / perl.h
diff --git a/perl.h b/perl.h
index 614d570..ccc82da 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -2617,6 +2617,7 @@ Gid_t getegid (void);
 #define PERL_MAGIC_uvar_elem     'u' /* Reserved for use by extensions */
 #define PERL_MAGIC_vec           'v' /* vec() lvalue */
 #define PERL_MAGIC_vstring       'V' /* SV was vstring literal */
+#define PERL_MAGIC_utf8                  'w' /* Cached UTF-8 information */
 #define PERL_MAGIC_substr        'x' /* substr() lvalue */
 #define PERL_MAGIC_defelem       'y' /* Shadow "foreach" iterator variable /
                                        smart parameter vivification */
@@ -3205,7 +3206,8 @@ enum {            /* pass one of these to get_vtbl */
     want_vtbl_amagicelem,
     want_vtbl_regdata,
     want_vtbl_regdatum,
-    want_vtbl_backref
+    want_vtbl_backref,
+    want_vtbl_utf8
 };
 
                                /* Note: the lowest 8 bits are reserved for
@@ -3237,6 +3239,8 @@ enum {            /* pass one of these to get_vtbl */
 #define HINT_FILETEST_ACCESS   0x00400000 /* filetest pragma */
 #define HINT_UTF8              0x00800000 /* utf8 pragma */
 
+#define HINT_ASSERTING          0x01000000
+
 /* The following are stored in $sort::hints, not in PL_hints */
 #define HINT_SORT_SORT_BITS    0x000000FF /* allow 256 different ones */
 #define HINT_SORT_QUICKSORT    0x00000001
@@ -3503,6 +3507,10 @@ EXT MGVTBL PL_vtbl_backref =       {0,   0,
 EXT MGVTBL PL_vtbl_ovrld   =     {0,   0,
                                        0,      0,      MEMBER_TO_FPTR(Perl_magic_freeovrld)};
 
+EXT MGVTBL PL_vtbl_utf8 = {0,
+                               MEMBER_TO_FPTR(Perl_magic_setutf8),
+                                       0,      0,      0};
+
 #else /* !DOINIT */
 
 EXT MGVTBL PL_vtbl_sv;
@@ -3541,6 +3549,7 @@ EXT MGVTBL PL_vtbl_amagic;
 EXT MGVTBL PL_vtbl_amagicelem;
 
 EXT MGVTBL PL_vtbl_backref;
+EXT MGVTBL PL_vtbl_utf8;
 
 #endif /* !DOINIT */
 
@@ -3696,8 +3705,8 @@ typedef struct am_table_short AMTS;
 #define PERLDB_ALL             (PERLDBf_SUB    | PERLDBf_LINE  |       \
                                 PERLDBf_NOOPT  | PERLDBf_INTER |       \
                                 PERLDBf_SUBLINE| PERLDBf_SINGLE|       \
-                                PERLDBf_NAMEEVAL| PERLDBf_NAMEANON)
-                                       /* No _NONAME, _GOTO */
+                                PERLDBf_NAMEEVAL| PERLDBf_NAMEANON )
+                                       /* No _NONAME, _GOTO, _ASSERTION */
 #define PERLDBf_SUB            0x01    /* Debug sub enter/exit */
 #define PERLDBf_LINE           0x02    /* Keep line # */
 #define PERLDBf_NOOPT          0x04    /* Switch off optimizations */
@@ -3709,6 +3718,7 @@ typedef struct am_table_short AMTS;
 #define PERLDBf_GOTO           0x80    /* Report goto: call DB::goto */
 #define PERLDBf_NAMEEVAL       0x100   /* Informative names for evals */
 #define PERLDBf_NAMEANON       0x200   /* Informative names for anon subs */
+#define PERLDBf_ASSERTION       0x400   /* Debug assertion subs enter/exit */
 
 #define PERLDB_SUB     (PL_perldb && (PL_perldb & PERLDBf_SUB))
 #define PERLDB_LINE    (PL_perldb && (PL_perldb & PERLDBf_LINE))
@@ -3720,7 +3730,7 @@ typedef struct am_table_short AMTS;
 #define PERLDB_GOTO    (PL_perldb && (PL_perldb & PERLDBf_GOTO))
 #define PERLDB_NAMEEVAL        (PL_perldb && (PL_perldb & PERLDBf_NAMEEVAL))
 #define PERLDB_NAMEANON        (PL_perldb && (PL_perldb & PERLDBf_NAMEANON))
-
+#define PERLDB_ASSERTION (PL_perldb && (PL_perldb & PERLDBf_ASSERTION))
 
 #ifdef USE_LOCALE_NUMERIC
 
@@ -3820,17 +3830,6 @@ typedef struct am_table_short AMTS;
 #   define Atoul(s)    Strtoul(s, (char **)NULL, 10)
 #endif
 
-#if !defined(PERLIO_IS_STDIO)
-/*
- * Remap printf
- */
-#undef printf
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && !defined(PERL_GCC_PEDANTIC)
-#define printf(fmt,args...) PerlIO_stdoutf(fmt,##args)
-#else
-#define printf PerlIO_stdoutf
-#endif
-#endif
 
 /* if these never got defined, they need defaults */
 #ifndef PERL_SET_CONTEXT
@@ -4171,6 +4170,37 @@ extern void moncontrol(int);
 #  define PIPESOCK_MODE
 #endif
 
+#define PERL_MAGIC_UTF8_CACHESIZE      2
+
+#define PERL_UNICODE_STDIN_FLAG                        0x0001
+#define PERL_UNICODE_STDOUT_FLAG               0x0002
+#define PERL_UNICODE_STDERR_FLAG               0x0004
+#define PERL_UNICODE_STD_FLAG                  0x0007
+#define PERL_UNICODE_IN_FLAG                   0x0008
+#define PERL_UNICODE_OUT_FLAG                  0x0010
+#define PERL_UNICODE_INOUT_FLAG                        0x0018
+#define PERL_UNICODE_ARGV_FLAG                 0x0020 /* For @ARGV? */
+#define PERL_UNICODE_LOCALE_FLAG               0x0040
+#define PERL_UNICODE_WIDESYSCALLS_FLAG         0x0080 /* for Sarathy */
+
+#define PERL_UNICODE_DEFAULT_FLAGS \
+       (PERL_UNICODE_STD_FLAG          | \
+        PERL_UNICODE_INOUT_FLAG        | \
+        PERL_UNICODE_LOCALE_FLAG)
+
+#define PERL_UNICODE_ALL_FLAGS                 0x00ff
+
+#define PERL_UNICODE_STDIN                     'I'
+#define PERL_UNICODE_STDOUT                    'O'
+#define PERL_UNICODE_STDERR                    'E'
+#define PERL_UNICODE_STD                       'S'
+#define PERL_UNICODE_IN                                'i'
+#define PERL_UNICODE_OUT                       'o'
+#define PERL_UNICODE_INOUT                     'D'
+#define PERL_UNICODE_ARGV                      'A'
+#define PERL_UNICODE_LOCALE                    'L'
+#define PERL_UNICODE_WIDESYSCALLS              'W'
+
 /* and finally... */
 #define PERL_PATCHLEVEL_H_IMPLICIT
 #include "patchlevel.h"