X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl.h;h=73a67f4f2a601160cc4367f28f24584a22208bc8;hb=49c10eea37fecdc3f701b564ab530e9176f545c4;hp=36a7cce62efd7079be34f305abfc16ab34222fea;hpb=101e46016804bc9075e660c95b8f086039f29428;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perl.h b/perl.h index 36a7cce..73a67f4 100644 --- a/perl.h +++ b/perl.h @@ -1,6 +1,6 @@ /* perl.h * - * Copyright (c) 1987-1997, Larry Wall + * Copyright (c) 1987-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -215,7 +215,10 @@ struct perl_thread; #define CALLREG_INTUIT_START CALL_FPTR(PL_regint_start) #define CALLREG_INTUIT_STRING CALL_FPTR(PL_regint_string) #define CALLREGFREE CALL_FPTR(PL_regfree) -#define CALLPROTECT CALL_FPTR(PL_protect) + +#ifdef PERL_FLEXIBLE_EXCEPTIONS +# define CALLPROTECT CALL_FPTR(PL_protect) +#endif #define NOOP (void)0 #define dNOOP extern int Perl___notused @@ -489,6 +492,10 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER)); # include #endif +#ifdef PERL_MICRO /* Last chance to export Perl_my_swap */ +# define MYSWAP +#endif + #if !defined(PERL_FOR_X2P) && !defined(WIN32) # include "embed.h" #endif @@ -529,6 +536,19 @@ Malloc_t Perl_realloc (Malloc_t where, MEM_SIZE nbytes); * that causes clashes with case-insensitive linkers */ Free_t Perl_mfree (Malloc_t where); +typedef struct perl_mstats perl_mstats_t; + +struct perl_mstats { + unsigned long *nfree; + unsigned long *ntotal; + long topbucket, topbucket_ev, topbucket_odd, totfree, total, total_chain; + long total_sbrk, sbrks, sbrk_good, sbrk_slack, start_slack, sbrked_remains; + long minbucket; + /* Level 1 info */ + unsigned long *bucket_mem_size; + unsigned long *bucket_available_size; +}; + # define safemalloc Perl_malloc # define safecalloc Perl_calloc # define saferealloc Perl_realloc @@ -804,6 +824,10 @@ Free_t Perl_mfree (Malloc_t where); * in the face of half-implementations.) */ +#ifdef I_SYSMODE +#include +#endif + #ifndef S_IFMT # ifdef _S_IFMT # define S_IFMT _S_IFMT @@ -882,12 +906,30 @@ Free_t Perl_mfree (Malloc_t where); # define S_IWUSR 0200 # define S_IXUSR 0100 # endif -# define S_IRGRP (S_IRUSR>>3) -# define S_IWGRP (S_IWUSR>>3) -# define S_IXGRP (S_IXUSR>>3) -# define S_IROTH (S_IRUSR>>6) -# define S_IWOTH (S_IWUSR>>6) -# define S_IXOTH (S_IXUSR>>6) +#endif + +#ifndef S_IRGRP +# ifdef S_IRUSR +# define S_IRGRP (S_IRUSR>>3) +# define S_IWGRP (S_IWUSR>>3) +# define S_IXGRP (S_IXUSR>>3) +# else +# define S_IRGRP 0040 +# define S_IWGRP 0020 +# define S_IXGRP 0010 +# endif +#endif + +#ifndef S_IROTH +# ifdef S_IRUSR +# define S_IROTH (S_IRUSR>>6) +# define S_IWOTH (S_IWUSR>>6) +# define S_IXOTH (S_IXUSR>>6) +# else +# define S_IROTH 0040 +# define S_IWOTH 0020 +# define S_IXOTH 0010 +# endif #endif #ifndef S_ISUID @@ -898,6 +940,30 @@ Free_t Perl_mfree (Malloc_t where); # define S_ISGID 02000 #endif +#ifndef S_IRWXU +# define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR) +#endif + +#ifndef S_IRWXG +# define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP) +#endif + +#ifndef S_IRWXO +# define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH) +#endif + +#ifndef S_IREAD +# define S_IREAD S_IRUSR +#endif + +#ifndef S_IWRITE +# define S_IWRITE S_IWUSR +#endif + +#ifndef S_IEXEC +# define S_IEXEC S_IXUSR +#endif + #ifdef ff_next # undef ff_next #endif @@ -1712,7 +1778,7 @@ typedef pthread_key_t perl_key; # endif #endif -#if defined(CYGWIN) +#if defined(__CYGWIN__) /* USEMYBINMODE * This symbol, if defined, indicates that the program should * use the routine my_binmode(FILE *fp, char iotype) to insure @@ -2042,9 +2108,9 @@ 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) +# if !defined(EPOC) && !(defined(__hpux) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) && !defined(HAS_LSEEK_PROTO) Off_t lseek (int,Off_t,int); -#endif +# endif # endif /* !DONT_DECLARE_STD */ char *getlogin (void); #endif /* !__cplusplus */ @@ -3012,24 +3078,26 @@ typedef struct am_table_short AMTS; #endif /* !USE_LOCALE_NUMERIC */ -#if !defined(Atol) && defined(HAS_LONG_LONG) +#if !defined(Atol) && defined(IV_IS_QUAD) && QUADKIND == QUAD_IS_LONG_LONG # if !defined(Atol) && defined(HAS_STRTOLL) # define Atol(s) strtoll(s, (char**)NULL, 10) # endif # if !defined(Atol) && defined(HAS_ATOLL) # define Atol atoll # endif -#endif /* is there atoq() anywhere? */ +#endif #if !defined(Atol) # define Atol atol /* we assume atol being available anywhere */ #endif -#if !defined(Strtoul) && defined(HAS_LONG_LONG) && defined(HAS_STRTOULL) -# define Strtoul strtoull +#if !defined(Strtoul) && defined(UV_IS_QUAD) && QUADKIND == QUAD_IS_LONG_LONG +# if !defined(Strtoul) && defined(HAS_STRTOULL) +# define Strtoul strtoull +# endif #endif /* is there atouq() anywhere? */ -#if !defined(Strtoul) && defined(USE_64_BITS) && defined(HAS_STRTOUQ) +#if !defined(Strtoul) && defined(HAS_STRTOUQ) # define Strtoul strtouq #endif #if !defined(Strtoul) @@ -3121,6 +3189,22 @@ typedef struct am_table_short AMTS; # endif #endif +#ifdef I_FCNTL +# include +#endif + +#ifdef I_SYS_FILE +# include +#endif + +#ifndef O_RDONLY +/* Assume UNIX defaults */ +# define O_RDONLY 0000 +# define O_WRONLY 0001 +# define O_RDWR 0002 +# define O_CREAT 0100 +#endif + #ifdef IAMSUID #ifdef I_SYS_STATVFS @@ -3171,9 +3255,24 @@ typedef struct am_table_short AMTS; /* Mention NV_PRESERVES_UV + HAS_ICONV I_ICONV + HAS_MKSTEMP + HAS_MKSTEMPS + HAS_MKDTEMP + + HAS_GETCWD + + HAS_MMAP + HAS_MPROTECT + HAS_MSYNC + HAS_MADVSISE + HAS_MUNMAP + I_SYSMMAN + Mmap_t + so that Configure picks them up. */ #endif /* Include guard */