X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl.h;h=a55ebefc6e0d1639d5cc00f9013ef5fb8b18315d;hb=3168554e5939cff15d64726add52097929d2f256;hp=1ae1bcf21d6856b464ea95c30b00d336dad2bff2;hpb=880b20b67e23950959b9017ea50a2f9fe4e915a4;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perl.h b/perl.h index 1ae1bcf..a55ebef 100644 --- a/perl.h +++ b/perl.h @@ -183,7 +183,7 @@ class CPerlObj; struct perl_thread; # define pTHX register struct perl_thread *thr # define aTHX thr -# define dTHR dNOOP +# define dTHR dNOOP /* only backward compatibility */ # define dTHXa(a) pTHX = (struct perl_thread*)a # else # ifndef MULTIPLICITY @@ -303,7 +303,7 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER)); #endif #define WITH_THX(s) STMT_START { dTHX; s; } STMT_END -#define WITH_THR(s) STMT_START { dTHR; s; } STMT_END +#define WITH_THR(s) WITH_THX(s) /* * SOFT_CAST can be used for args to prototyped functions to retain some @@ -496,12 +496,16 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER)); # include #endif - /* Use all the "standard" definitions? */ #if defined(STANDARD_C) && defined(I_STDLIB) # include #endif +/* If this causes problems, set i_unistd=undef in the hint file. */ +#ifdef I_UNISTD +# include +#endif + #ifdef PERL_MICRO /* Last chance to export Perl_my_swap */ # define MYSWAP #endif @@ -709,10 +713,47 @@ typedef struct perl_mstats perl_mstats_t; #endif #include -#ifdef HAS_SOCKET -# ifdef I_NET_ERRNO -# include + +#if defined(WIN32) && (defined(PERL_OBJECT) || defined(PERL_IMPLICIT_SYS) || defined(PERL_CAPI)) +# define WIN32SCK_IS_STDSCK /* don't pull in custom wsock layer */ +#endif + +#if defined(HAS_SOCKET) && !defined(VMS) /* VMS handles sockets via vmsish.h */ +# include +# if defined(USE_SOCKS) && defined(I_SOCKS) +# if !defined(INCLUDE_PROTOTYPES) +# define INCLUDE_PROTOTYPES /* for */ +# define PERL_SOCKS_NEED_PROTOTYPES # endif +# ifdef USE_THREADS +# define PERL_USE_THREADS /* store our value */ +# undef USE_THREADS +# endif +# include +# ifdef USE_THREADS +# undef USE_THREADS /* socks.h does this on its own */ +# endif +# ifdef PERL_USE_THREADS +# define USE_THREADS /* restore our value */ +# undef PERL_USE_THREADS +# endif +# ifdef PERL_SOCKS_NEED_PROTOTYPES /* keep cpp space clean */ +# undef INCLUDE_PROTOTYPES +# undef PERL_SOCKS_NEED_PROTOTYPES +# endif +# endif +# ifdef I_NETDB +# include +# endif +# ifndef ENOTSOCK +# ifdef I_NET_ERRNO +# include +# endif +# endif +#endif + +#ifdef SETERRNO +# undef SETERRNO /* SOCKS might have defined this */ #endif #ifdef VMS @@ -1075,6 +1116,9 @@ typedef UVTYPE UV; #endif #ifdef USE_LONG_DOUBLE +# if defined(HAS_LONG_DOUBLE) && LONG_DOUBLESIZE == DOUBLESIZE +# define LONG_DOUBLE_EQUALS_DOUBLE +# endif # if !(defined(HAS_LONG_DOUBLE) && (LONG_DOUBLESIZE > DOUBLESIZE)) # undef USE_LONG_DOUBLE /* Ouch! */ # endif @@ -1440,6 +1484,7 @@ struct perl_mstats { UV *bucket_available_size; UV nbuckets; }; +struct RExC_state_t; typedef MEM_SIZE STRLEN; @@ -1456,7 +1501,12 @@ typedef struct pvop PVOP; typedef struct loop LOOP; typedef struct interpreter PerlInterpreter; -typedef struct sv SV; +#ifdef UTS +# define STRUCT_SV perl_sv /* Amdahl's has struct sv */ +#else +# define STRUCT_SV sv +#endif +typedef struct STRUCT_SV SV; typedef struct av AV; typedef struct hv HV; typedef struct cv CV; @@ -1621,6 +1671,9 @@ typedef struct ptr_tbl PTR_TBL_t; # else # if defined(MACOS_TRADITIONAL) # include "macos/macish.h" +# ifndef NO_ENVIRON_ARRAY +# define NO_ENVIRON_ARRAY +# endif # else # include "unixish.h" # endif @@ -2100,6 +2153,7 @@ Gid_t getegid (void); # else # define DEBUG_S(a) # endif +#define DEBUG_T(a) if (PL_debug & (1<<17)) a #else #define DEB(a) #define DEBUG(a) @@ -2120,6 +2174,7 @@ Gid_t getegid (void); #define DEBUG_X(a) #define DEBUG_D(a) #define DEBUG_S(a) +#define DEBUG_T(a) #endif #define YYMAXDEPTH 300 @@ -2190,8 +2245,12 @@ char *crypt (const char*, const char*); # ifndef getenv char *getenv (const char*); # endif /* !getenv */ -# if !defined(EPOC) && !(defined(__hpux) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) && !defined(HAS_LSEEK_PROTO) +# if !defined(HAS_LSEEK_PROTO) && !defined(EPOC) && !defined(__hpux) +# ifdef _FILE_OFFSET_BITS +# if _FILE_OFFSET_BITS == 64 Off_t lseek (int,Off_t,int); +# endif +# endif # endif # endif /* !DONT_DECLARE_STD */ char *getlogin (void); @@ -2653,10 +2712,6 @@ typedef char* (CPERLscope(*re_intuit_start_t)) (pTHX_ regexp *prog, SV *sv, typedef SV* (CPERLscope(*re_intuit_string_t)) (pTHX_ regexp *prog); typedef void (CPERLscope(*regfree_t)) (pTHX_ struct regexp* r); -#ifdef USE_PURE_BISON -int Perl_yylex(pTHX_ YYSTYPE *lvalp, int *lcharp); -#endif - typedef void (*DESTRUCTORFUNC_NOCONTEXT_t) (void*); typedef void (*DESTRUCTORFUNC_t) (pTHXo_ void*); typedef void (*SVFUNC_t) (pTHXo_ SV*); @@ -3135,16 +3190,10 @@ typedef struct am_table_short AMTS; #ifdef USE_LOCALE_NUMERIC #define SET_NUMERIC_STANDARD() \ - STMT_START { \ - if (! PL_numeric_standard) \ - set_numeric_standard(); \ - } STMT_END + set_numeric_standard(); #define SET_NUMERIC_LOCAL() \ - STMT_START { \ - if (! PL_numeric_local) \ - set_numeric_local(); \ - } STMT_END + set_numeric_local(); #define IS_NUMERIC_RADIX(c) \ ((PL_hints & HINT_LOCALE) && \ @@ -3152,11 +3201,11 @@ typedef struct am_table_short AMTS; #define STORE_NUMERIC_LOCAL_SET_STANDARD() \ bool was_local = (PL_hints & HINT_LOCALE) && PL_numeric_local; \ - if (!was_local) SET_NUMERIC_STANDARD(); + if (was_local) SET_NUMERIC_STANDARD(); #define STORE_NUMERIC_STANDARD_SET_LOCAL() \ - bool was_standard = !(PL_hints & HINT_LOCALE) || PL_numeric_standard; \ - if (!was_standard) SET_NUMERIC_LOCAL(); + bool was_standard = (PL_hints & HINT_LOCALE) && PL_numeric_standard; \ + if (was_standard) SET_NUMERIC_LOCAL(); #define RESTORE_NUMERIC_LOCAL() \ if (was_local) SET_NUMERIC_LOCAL(); @@ -3397,6 +3446,10 @@ typedef struct am_table_short AMTS; # include /* setproctitle() in some FreeBSDs */ #endif +#ifndef EXEC_ARGV_CAST +#define EXEC_ARGV_CAST(x) x +#endif + /* and finally... */ #define PERL_PATCHLEVEL_H_IMPLICIT #include "patchlevel.h"