X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl.h;h=68750fe426745b02885c106f7338e222ae3c477e;hb=0934c9d92d03b9af0e4cebeaa0942ad89e7cc04b;hp=0f6557250cf5c83757cb9943ba1269a58c24f760;hpb=288b8c02c5ee89a2978a1b9e56ed255c53beb793;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perl.h b/perl.h index 0f65572..68750fe 100644 --- a/perl.h +++ b/perl.h @@ -41,6 +41,24 @@ # endif #endif +/* This logic needs to come after reading config.h, but before including + proto.h */ +#ifdef IAMSUID +# ifndef DOSUID +# define DOSUID +# endif +#endif + +#ifdef SETUID_SCRIPTS_ARE_SECURE_NOW +# ifdef DOSUID +# undef DOSUID +# endif +# ifdef IAMSUID +# undef IAMSUID +# define SETUID_SCRIPTS_ARE_SECURE_NOW_AND_IAMSUID +# endif +#endif + /* See L for detailed notes on * PERL_IMPLICIT_CONTEXT and PERL_IMPLICIT_SYS */ @@ -209,10 +227,6 @@ #define CALLREG_INTUIT_STRING(prog) \ CALL_FPTR(RX_ENGINE(prog)->checkstr)(aTHX_ (prog)) -#define CALLREG_AS_STR(mg,lp,flags,haseval) \ - Perl_reg_stringify(aTHX_ (mg), (lp), (flags), (haseval)) -#define CALLREG_STRINGIFY(mg,lp,flags) CALLREG_AS_STR(mg,lp,flags,0) - #define CALLREGFREE(prog) \ Perl_pregfree(aTHX_ (prog)) @@ -434,8 +448,12 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER)); /* gcc (-ansi) -pedantic doesn't allow gcc statement expressions, * g++ allows them but seems to have problems with them - * (insane errors ensue). */ -#if defined(PERL_GCC_PEDANTIC) || (defined(__GNUC__) && defined(__cplusplus)) + * (insane errors ensue). + * g++ does not give insane errors now (RMB 2008-01-30, gcc 4.2.2). + */ +#if defined(PERL_GCC_PEDANTIC) || \ + (defined(__GNUC__) && defined(__cplusplus) && \ + ((__GNUC__ < 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ < 2)))) # ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN # define PERL_GCC_BRACE_GROUPS_FORBIDDEN # endif @@ -510,11 +528,7 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER)); #endif #if defined(HASVOLATILE) || defined(STANDARD_C) -# ifdef __cplusplus -# define VOL /* to temporarily suppress warnings */ -# else # define VOL volatile -# endif #else # define VOL #endif @@ -923,6 +937,11 @@ EXTERN_C int usleep(unsigned int); #define PERL_ARENA_SIZE 4080 #endif +/* Maximum level of recursion */ +#ifndef PERL_SUB_DEPTH_WARN +#define PERL_SUB_DEPTH_WARN 100 +#endif + #endif /* PERL_CORE */ /* We no longer default to creating a new SV for GvSV. @@ -2353,7 +2372,7 @@ typedef struct av AV; typedef struct hv HV; typedef struct cv CV; typedef struct regexp ORANGE; /* This is the body structure. */ -typedef SV REGEXP; +typedef struct p5rx REGEXP; typedef struct gp GP; typedef struct gv GV; typedef struct io IO; @@ -3309,6 +3328,17 @@ struct nexttoken { }; #endif +/* macros to define bit-fields in structs. */ +#ifndef PERL_BITFIELD8 +# define PERL_BITFIELD8 unsigned +#endif +#ifndef PERL_BITFIELD16 +# define PERL_BITFIELD16 unsigned +#endif +#ifndef PERL_BITFIELD32 +# define PERL_BITFIELD32 unsigned +#endif + #include "sv.h" #include "regexp.h" #include "util.h" @@ -3980,7 +4010,7 @@ typedef Sighandler_t Sigsave_t; #endif #ifdef USE_PERLIO -EXTERN_C void PerlIO_teardown(); +EXTERN_C void PerlIO_teardown(void); # ifdef USE_ITHREADS # define PERLIO_INIT MUTEX_INIT(&PL_perlio_mutex) # define PERLIO_TERM \ @@ -4344,14 +4374,17 @@ EXTCONST unsigned char PL_freq[]; #ifdef DOINIT EXTCONST char* const PL_block_type[] = { "NULL", - "SUB", - "EVAL", - "LOOP", - "SUBST", + "WHEN", "BLOCK", - "FORMAT", "GIVEN", - "WHEN" + "LOOP_FOR", + "LOOP_PLAIN", + "LOOP_LAZYSV", + "LOOP_LAZYIV", + "SUB", + "FORMAT", + "EVAL", + "SUBST" }; #else EXTCONST char* PL_block_type[]; @@ -4604,7 +4637,7 @@ typedef regexp*(CPERLscope(*regdupe_t)) (pTHX_ const regexp* r, CLONE_PARAMS *pa typedef void (*DESTRUCTORFUNC_NOCONTEXT_t) (void*); typedef void (*DESTRUCTORFUNC_t) (pTHX_ void*); -typedef void (*SVFUNC_t) (pTHX_ SV*); +typedef void (*SVFUNC_t) (pTHX_ SV* const); typedef I32 (*SVCOMPARE_t) (pTHX_ SV*, SV*); typedef void (*XSINIT_t) (pTHX); typedef void (*ATEXIT_t) (pTHX_ void*); @@ -4907,7 +4940,7 @@ MGVTBL_SET( 0, MEMBER_TO_FPTR(Perl_magic_setisa), 0, - MEMBER_TO_FPTR(Perl_magic_setisa), + MEMBER_TO_FPTR(Perl_magic_clearisa), 0, 0, 0,