X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl.h;h=7e66b56c65a3c5771813c5a7553d4eee096f6967;hb=e27835eefa408ae52d4ae22eec67eea282a87949;hp=65b3a722bcf3c908c735915c554acddbbaf96529;hpb=d8fca4022b56f335fb492e336b5d155376eb1bf7;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perl.h b/perl.h index 65b3a72..7e66b56 100644 --- a/perl.h +++ b/perl.h @@ -2651,7 +2651,11 @@ typedef struct clone_params CLONE_PARAMS; # if HAS_FLOATINGPOINT_H # include # endif -# define PERL_FPU_INIT fpsetmask(0) +/* Some operating systems have this as a macro, which in turn expands to a comma + expression, and the last sub-expression is something that gets calculated, + and then they have the gall to warn that a value computed is not used. Hence + cast to void. */ +# define PERL_FPU_INIT (void)fpsetmask(0) # else # if defined(SIGFPE) && defined(SIG_IGN) && !defined(PERL_MICRO) # define PERL_FPU_INIT PL_sigfpe_saved = (Sighandler_t) signal(SIGFPE, SIG_IGN) @@ -4073,20 +4077,33 @@ struct perl_memory_debug_header { # define INIT_TRACK_MEMPOOL(header, interp) #endif +#ifdef I_MALLOCMALLOC +/* Needed for malloc_size(), malloc_good_size() on some systems */ +# include +#endif + #ifdef MYMALLOC # define Perl_safesysmalloc_size(where) Perl_malloced_size(where) #else -# ifdef HAS_MALLOC_SIZE +# ifdef HAS_MALLOC_SIZE +# ifdef PERL_TRACK_MEMPOOL # define Perl_safesysmalloc_size(where) \ (malloc_size(((char *)(where)) - sTHX) - sTHX) -# endif -# ifdef HAS_MALLOC_GOOD_SIZE +# else +# define Perl_safesysmalloc_size(where) malloc_size(where) +# endif +# endif +# ifdef HAS_MALLOC_GOOD_SIZE +# ifdef PERL_TRACK_MEMPOOL # define Perl_malloc_good_size(how_much) \ (malloc_good_size((how_much) + sTHX) - sTHX) -# else +# else +# define Perl_malloc_good_size(how_much) malloc_good_size(how_much) +# endif +# else /* Having this as the identity operation makes some code simpler. */ # define Perl_malloc_good_size(how_much) (how_much) -# endif +# endif #endif typedef int (CPERLscope(*runops_proc_t)) (pTHX); @@ -4649,7 +4666,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* const); -typedef I32 (*SVCOMPARE_t) (pTHX_ SV*, SV*); +typedef I32 (*SVCOMPARE_t) (pTHX_ SV* const, SV* const); typedef void (*XSINIT_t) (pTHX); typedef void (*ATEXIT_t) (pTHX_ void*); typedef void (*XSUBADDR_t) (pTHX_ CV *); @@ -5991,6 +6008,8 @@ extern void moncontrol(int); #endif /* Include guard */ +#define CLEAR_ERRSV() STMT_START { sv_setpvn(ERRSV,"",0); if (SvMAGICAL(ERRSV)) { mg_free(ERRSV); } SvPOK_only(ERRSV); } STMT_END + /* * Local variables: * c-indentation-style: bsd