X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl.h;h=9f135b109c41b4add56e04bfbdd07c4e18c2a7dc;hb=c0393c90932dfbd5778207b0f3f2e6f99dc7fdb2;hp=7e5d994bd46808c004fd0421e3310b5812592f5f;hpb=daf0f78e031c718c75590ef9ef573756f805776e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perl.h b/perl.h index 7e5d994..9f135b1 100644 --- a/perl.h +++ b/perl.h @@ -718,6 +718,11 @@ typedef struct perl_mstats perl_mstats_t; # define WIN32SCK_IS_STDSCK /* don't pull in custom wsock layer */ #endif +/* In Tru64 use the 4.4BSD struct msghdr, not the 4.3 one */ +#if defined(__osf__) && defined(__alpha) && !defined(_SOCKADDR_LEN) +# define _SOCKADDR_LEN +#endif + #if defined(HAS_SOCKET) && !defined(VMS) /* VMS handles sockets via vmsish.h */ # include # if defined(USE_SOCKS) && defined(I_SOCKS) @@ -1023,6 +1028,13 @@ typedef struct perl_mstats perl_mstats_t; #undef UV #endif +/* Configure gets this right but the UTS compiler gets it wrong. + -- Hal Morris */ +#ifdef UTS +# undef UVTYPE +# define UVTYPE unsigned +#endif + /* The IV type is supposed to be long enough to hold any integral value or a pointer. @@ -1081,6 +1093,25 @@ typedef UVTYPE UV; # endif #endif +/* + I've tracked down a weird bug in Perl5.6.1 to the UTS compiler's + mishandling of MY_UV_MAX in util.c. It is defined as + #ifndef MY_UV_MAX + # define MY_UV_MAX ((UV)IV_MAX * (UV)2 + (UV)1) + #endif + The compiler handles {double floating point value} >= MY_UV_MAX as if + MY_UV_MAX were the signed integer -1. In fact it will do the same + thing with (UV)(0xffffffff), in place of MY_UV_MAX, though 0xffffffff + *without* the typecast to UV works fine. + + hom00@utsglobal.com (Hal Morris) 2001-05-02 + + */ + +#ifdef UTS +# define MY_UV_MAX 0xffffffff +#endif + #define IV_DIG (BIT_DIGITS(IVSIZE * 8)) #define UV_DIG (BIT_DIGITS(UVSIZE * 8)) @@ -1837,10 +1868,12 @@ typedef pthread_key_t perl_key; #endif /* This defines a way to flush all output buffers. This may be a - * performance issue, so we allow people to disable it. + * performance issue, so we allow people to disable it. Also, if + * we are using stdio, there are broken implementations of fflush(NULL) + * out there, Solaris being the most prominent. */ #ifndef PERL_FLUSHALL_FOR_CHILD -# if defined(FFLUSH_NULL) || defined(USE_SFIO) +# if defined(USE_PERLIO) || defined(FFLUSH_NULL) || defined(USE_SFIO) # define PERL_FLUSHALL_FOR_CHILD PerlIO_flush((PerlIO*)NULL) # else # ifdef FFLUSH_ALL @@ -2350,7 +2383,7 @@ END_EXTERN_C # if defined(NeXT) || defined(__NeXT__) /* or whatever catches all NeXTs */ char *crypt (); /* Maybe more hosts will need the unprototyped version */ # else -# if !defined(WIN32) +# if !defined(WIN32) && !defined(VMS) char *crypt (const char*, const char*); # endif /* !WIN32 */ # endif /* !NeXT && !__NeXT__ */ @@ -2807,7 +2840,6 @@ enum { /* pass one of these to get_vtbl */ #define HINT_FILETEST_ACCESS 0x00400000 #define HINT_UTF8 0x00800000 #define HINT_UTF8_DISTINCT 0x01000000 -#define HINT_RE_ASCIIR 0x02000000 /* Various states of an input record separator SV (rs, nrs) */ #define RsSNARF(sv) (! SvOK(sv)) @@ -3329,7 +3361,7 @@ typedef struct am_table_short AMTS; #define IS_NUMERIC_RADIX(s) \ ((PL_hints & HINT_LOCALE) && \ - PL_numeric_radix && memEQ(s, SvPVX(PL_numeric_radix), SvCUR(PL_numeric_radix))) + PL_numeric_radix_sv && memEQ(s, SvPVX(PL_numeric_radix_sv), SvCUR(PL_numeric_radix_sv))) #define STORE_NUMERIC_LOCAL_SET_STANDARD() \ bool was_local = (PL_hints & HINT_LOCALE) && PL_numeric_local; \ @@ -3478,17 +3510,21 @@ typedef struct am_table_short AMTS; * nice_chunk and nice_chunk size need to be set * and queried under the protection of sv_mutex */ -#define offer_nice_chunk(chunk, chunk_size) do { \ - LOCK_SV_MUTEX; \ - if (!PL_nice_chunk) { \ - PL_nice_chunk = (char*)(chunk); \ - PL_nice_chunk_size = (chunk_size); \ - } \ - else { \ - Safefree(chunk); \ - } \ - UNLOCK_SV_MUTEX; \ - } while (0) +#define offer_nice_chunk(chunk, chunk_size) STMT_START { \ + void *new_chunk; \ + U32 new_chunk_size; \ + LOCK_SV_MUTEX; \ + new_chunk = (void *)(chunk); \ + new_chunk_size = (chunk_size); \ + if (new_chunk_size > PL_nice_chunk_size) { \ + if (PL_nice_chunk) Safefree(PL_nice_chunk); \ + PL_nice_chunk = new_chunk; \ + PL_nice_chunk_size = new_chunk_size; \ + } else { \ + Safefree(chunk); \ + } \ + UNLOCK_SV_MUTEX; \ + } STMT_END #ifdef HAS_SEM # include @@ -3549,6 +3585,9 @@ typedef struct am_table_short AMTS; #ifdef IAMSUID #ifdef I_SYS_STATVFS +# if defined(PERL_SCO) && !defined(_SVID3) +# define _SVID3 +# endif # include /* for f?statvfs() */ #endif #ifdef I_SYS_MOUNT @@ -3626,6 +3665,20 @@ typedef struct am_table_short AMTS; NVff NVgf + HAS_USLEEP + HAS_UALARM + + HAS_SETITIMER + HAS_GETITIMER + + HAS_SENDMSG + HAS_RECVMSG + HAS_READV + HAS_WRITEV + I_SYSUIO + HAS_STRUCT_MSGHDR + HAS_STRUCT_CMSGHDR + so that Configure picks them up. */ #endif /* Include guard */