X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/545872c5eddf1f00b9826a3d8d682387f1c5049d..5104905ca0e45a6aca96dc9f629e2bdd5058b01b:/perl.h?ds=sidebyside diff --git a/perl.h b/perl.h index 87e7f0f..d2c5568 100644 --- a/perl.h +++ b/perl.h @@ -22,10 +22,6 @@ #define USE_STDIO #endif /* PERL_FOR_X2P */ -#if defined(DGUX) -#include -#endif - #ifdef VOIDUSED # undef VOIDUSED #endif @@ -225,11 +221,11 @@ #define CALLREGCOMP(sv, flags) Perl_pregcomp(aTHX_ (sv),(flags)) #define CALLREGCOMP_ENG(prog, sv, flags) (prog)->comp(aTHX_ sv, flags) -#define CALLREGEXEC(prog,stringarg,strend,strbeg,minend,screamer,data,flags) \ +#define CALLREGEXEC(prog,stringarg,strend,strbeg,minend,sv,data,flags) \ RX_ENGINE(prog)->exec(aTHX_ (prog),(stringarg),(strend), \ - (strbeg),(minend),(screamer),(data),(flags)) -#define CALLREG_INTUIT_START(prog,sv,strpos,strend,flags,data) \ - RX_ENGINE(prog)->intuit(aTHX_ (prog), (sv), (strpos), \ + (strbeg),(minend),(sv),(data),(flags)) +#define CALLREG_INTUIT_START(prog,sv,strbeg,strpos,strend,flags,data) \ + RX_ENGINE(prog)->intuit(aTHX_ (prog), (sv), (strbeg), (strpos), \ (strend),(flags),(data)) #define CALLREG_INTUIT_STRING(prog) \ RX_ENGINE(prog)->checkstr(aTHX_ (prog)) @@ -520,7 +516,7 @@ struct op *Perl_op asm(stringify(OP_IN_REGISTER)); # define STANDARD_C 1 #endif -#if defined(__cplusplus) || defined(WIN32) || defined(__sgi) || defined(__EMX__) || defined(__DGUX) || defined(__QNX__) || defined(NETWARE) || defined(PERL_MICRO) +#if defined(__cplusplus) || defined(WIN32) || defined(__sgi) || defined(__EMX__) || defined(__QNX__) || defined(NETWARE) || defined(PERL_MICRO) # define DONT_DECLARE_STD 1 #endif @@ -695,6 +691,8 @@ struct op *Perl_op asm(stringify(OP_IN_REGISTER)); #if !defined(NO_LOCALE) && defined(HAS_SETLOCALE) # define USE_LOCALE +# define HAS_SKIP_LOCALE_INIT /* Solely for XS code to test for this + capability */ # if !defined(NO_LOCALE_COLLATE) && defined(LC_COLLATE) \ && defined(HAS_STRXFRM) # define USE_LOCALE_COLLATE @@ -705,6 +703,12 @@ struct op *Perl_op asm(stringify(OP_IN_REGISTER)); # if !defined(NO_LOCALE_NUMERIC) && defined(LC_NUMERIC) # define USE_LOCALE_NUMERIC # endif +# if !defined(NO_LOCALE_MESSAGES) && defined(LC_MESSAGES) +# define USE_LOCALE_MESSAGES +# endif +# if !defined(NO_LOCALE_MONETARY) && defined(LC_MONETARY) +# define USE_LOCALE_MONETARY +# endif #endif /* !NO_LOCALE && HAS_SETLOCALE */ #include @@ -1231,16 +1235,16 @@ EXTERN_C char *crypt(const char *, const char *); #endif #ifdef HAS_STRERROR -#ifndef DONT_DECLARE_STD +# ifndef DONT_DECLARE_STD # ifdef VMS char *strerror (int,...); # else char *strerror (int); # endif -#endif -# ifndef Strerror -# define Strerror strerror -# endif +# endif +# ifndef Strerror +# define Strerror strerror +# endif #else # ifdef HAS_SYS_ERRLIST extern int sys_nerr; @@ -1597,6 +1601,8 @@ typedef UVTYPE UV; # endif #endif +#define SSize_t_MAX (SSize_t)(~(size_t)0 >> 1) + #ifndef HAS_QUAD # undef PERL_NEED_MY_HTOLE64 # undef PERL_NEED_MY_LETOH64 @@ -2282,6 +2288,7 @@ typedef struct xpvuv XPVUV; typedef struct xpvnv XPVNV; typedef struct xpvmg XPVMG; typedef struct xpvlv XPVLV; +typedef struct xpvinvlist XINVLIST; typedef struct xpvav XPVAV; typedef struct xpvhv XPVHV; typedef struct xpvgv XPVGV; @@ -2302,11 +2309,10 @@ typedef AV PAD; typedef AV PADNAMELIST; typedef SV PADNAME; -/* XXX for 5.18, disable the COW by default - * #if !defined(PERL_OLD_COPY_ON_WRITE) && !defined(PERL_NEW_COPY_ON_WRITE) && !defined(PERL_NO_COW) - * # define PERL_NEW_COPY_ON_WRITE - * #endif - */ +/* enable PERL_NEW_COPY_ON_WRITE by default */ +#if !defined(PERL_OLD_COPY_ON_WRITE) && !defined(PERL_NEW_COPY_ON_WRITE) && !defined(PERL_NO_COW) +# define PERL_NEW_COPY_ON_WRITE +#endif #if defined(PERL_OLD_COPY_ON_WRITE) || defined(PERL_NEW_COPY_ON_WRITE) # if defined(PERL_OLD_COPY_ON_WRITE) && defined(PERL_NEW_COPY_ON_WRITE) @@ -2670,9 +2676,6 @@ freeing any remaining Perl interpreters. # ifdef NETWARE # include # else -# ifdef FAKE_THREADS -# include "fakethr.h" -# else # ifdef WIN32 # include # else @@ -2699,8 +2702,7 @@ typedef pthread_key_t perl_key; # endif /* I_MACH_CTHREADS */ # endif /* OS2 */ # endif /* WIN32 */ -# endif /* FAKE_THREADS */ -#endif /* NETWARE */ +# endif /* NETWARE */ #endif /* USE_ITHREADS */ #if defined(WIN32) @@ -2953,6 +2955,8 @@ typedef pthread_key_t perl_key; /* flags in PL_exit_flags for nature of exit() */ #define PERL_EXIT_EXPECTED 0x01 #define PERL_EXIT_DESTRUCT_END 0x02 /* Run END in perl_destruct */ +#define PERL_EXIT_WARN 0x04 /* Warn if Perl_my_exit() or Perl_my_failure_exit() called */ +#define PERL_EXIT_ABORT 0x08 /* Call abort() if Perl_my_exit() or Perl_my_failure_exit() called */ #ifndef PERL_CORE /* format to use for version numbers in file/directory names */ @@ -3047,6 +3051,12 @@ typedef pthread_key_t perl_key; #define HEKfARG(p) ((void*)(p)) +/* Takes three arguments: is_utf8, length, str */ +#ifndef UTF8f +# define UTF8f "d%"UVuf"%4p" +#endif +#define UTF8fARG(u,l,p) (int)cBOOL(u), (UV)(l), (void*)(p) + #ifdef PERL_CORE /* not used; but needed for backward compatibility with XS code? - RMB */ # undef VDf @@ -4068,8 +4078,7 @@ EXT char *** environ_pointer; # ifdef USE_ENVIRON_ARRAY # if !defined(DONT_DECLARE_STD) || \ (defined(__svr4__) && defined(__GNUC__) && defined(sun)) || \ - defined(__sgi) || \ - defined(__DGUX) + defined(__sgi) extern char ** environ; /* environment variables supplied via exec */ # endif # endif @@ -4513,9 +4522,6 @@ EXTCONST char PL_bincompat_options[] = # ifdef DEBUG_LEAKING_SCALARS_FORK_DUMP " DEBUG_LEAKING_SCALARS_FORK_DUMP" # endif -# ifdef FAKE_THREADS - " FAKE_THREADS" -# endif # ifdef FCRYPT " FCRYPT" # endif @@ -4561,9 +4567,6 @@ EXTCONST char PL_bincompat_options[] = # ifdef PERL_OLD_COPY_ON_WRITE " PERL_OLD_COPY_ON_WRITE" # endif -# ifdef PERL_NEW_COPY_ON_WRITE - " PERL_NEW_COPY_ON_WRITE" -# endif # ifdef PERL_POISON " PERL_POISON" # endif @@ -4667,6 +4670,8 @@ EXTCONST char *const PL_phase_names[]; # define PL_amagic_generation PL_na #endif /* !PERL_CORE */ +#define PL_hints PL_compiling.cop_hints + END_EXTERN_C /*****************************************************************************/ @@ -5053,19 +5058,19 @@ EXTCONST U8 PL_magic_data[256]; #endif #ifdef DOINIT - /* NL BD IV NV PV PI PN MG RX GV LV AV HV CV FM IO */ + /* NL IV NV PV INV PI PN MG RX GV LV AV HV CV FM IO */ EXTCONST bool -PL_valid_types_IVX[] = { 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0 }; +PL_valid_types_IVX[] = { 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0 }; EXTCONST bool -PL_valid_types_NVX[] = { 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0 }; +PL_valid_types_NVX[] = { 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0 }; EXTCONST bool -PL_valid_types_PVX[] = { 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1 }; +PL_valid_types_PVX[] = { 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1 }; EXTCONST bool -PL_valid_types_RV[] = { 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1 }; +PL_valid_types_RV[] = { 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1 }; EXTCONST bool -PL_valid_types_IV_set[] = { 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1 }; +PL_valid_types_IV_set[] = { 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1 }; EXTCONST bool -PL_valid_types_NV_set[] = { 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; +PL_valid_types_NV_set[] = { 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; #else