/* 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.
/* See L<perlguts/"The Perl API"> for detailed notes on
* PERL_IMPLICIT_CONTEXT and PERL_IMPLICIT_SYS */
+#ifdef USE_ITHREADS
+# if !defined(MULTIPLICITY) && !defined(PERL_OBJECT)
+# define MULTIPLICITY
+# endif
+#endif
+
#ifdef USE_THREADS
# ifndef PERL_IMPLICIT_CONTEXT
# define PERL_IMPLICIT_CONTEXT
# endif
#endif
-#if defined(USE_ITHREADS) && !defined(MULTIPLICITY) && !defined(PERL_OBJECT)
-# include "error: USE_ITHREADS must be built with MULTIPLICITY"
-#endif
-
#ifdef PERL_OBJECT
/* PERL_OBJECT explained - DickH and DougL @ ActiveState.com
# define dTHX dTHXa(PERL_GET_THX)
# define pTHX_ pTHX,
# define aTHX_ aTHX,
+# define pTHX_1 2
+# define pTHX_2 3
+# define pTHX_3 4
+# define pTHX_4 5
#endif
#define STATIC static
# define aTHX_
# define dTHXa(a) dNOOP
# define dTHX dNOOP
+# define pTHX_1 1
+# define pTHX_2 2
+# define pTHX_3 3
+# define pTHX_4 4
#endif
#ifndef pTHXo
# define Perl_fmod fmod
#endif
-#if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
+#if !defined(Perl_atof) && defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
# if !defined(Perl_atof) && defined(HAS_STRTOLD)
-# define Perl_atof(s) strtold(s, (char*)0)
+# define Perl_atof(s) strtold(s, (char**)NULL)
# endif
# if !defined(Perl_atof) && defined(HAS_ATOLF)
# define Perl_atof atolf
# endif
-#else
-# if !defined(Perl_atof) && defined(HAS_STRTOD)
-# define Perl_atof(s) strtod(s, (char*)0)
-# endif
-# if !defined(Perl_atof)
-# define Perl_atof atof /* we assume atof being available anywhere */
-# endif
+#endif
+#if !defined(Perl_atof)
+# define Perl_atof atof /* we assume atof being available anywhere */
#endif
/* Previously these definitions used hardcoded figures.
# endif
#endif
+#ifndef SVf
+# ifdef CHECK_FORMAT
+# define SVf "p"
+# else
+# define SVf "_"
+# endif
+#endif
+
/* Some unistd.h's give a prototype for pause() even though
HAS_PAUSE ends up undefined. This causes the #define
below to be rejected by the compmiler. Sigh.
# 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
# ifndef getenv
char *getenv (const char*);
# endif /* !getenv */
-#ifndef EPOC
+#if !defined(EPOC) && !(defined(__hpux) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
Off_t lseek (int,Off_t,int);
#endif
# endif /* !DONT_DECLARE_STD */
#define HINT_INTEGER 0x00000001
#define HINT_STRICT_REFS 0x00000002
/* #define HINT_notused4 0x00000004 */
-#define HINT_UTF8 0x00000008
-#define HINT_BYTE 0x00000010
+#define HINT_BYTE 0x00000008
+/* #define HINT_notused10 0x00000010 */
/* Note: 20,40,80 used for NATIVE_HINTS */
#define HINT_BLOCK_SCOPE 0x00000100
#define HINT_RE_EVAL 0x00200000
#define HINT_FILETEST_ACCESS 0x00400000
+#define HINT_UTF8 0x00800000
/* Various states of an input record separator SV (rs, nrs) */
#define RsSNARF(sv) (! SvOK(sv))
# endif
#endif /* _FASTMATH */
-#define PERLDB_ALL 0x3f /* No _NONAME, _GOTO */
-#define PERLDBf_SUB 0x01 /* Debug sub enter/exit. */
-#define PERLDBf_LINE 0x02 /* Keep line #. */
-#define PERLDBf_NOOPT 0x04 /* Switch off optimizations. */
-#define PERLDBf_INTER 0x08 /* Preserve more data for
- later inspections. */
-#define PERLDBf_SUBLINE 0x10 /* Keep subr source lines. */
-#define PERLDBf_SINGLE 0x20 /* Start with single-step on. */
-#define PERLDBf_NONAME 0x40 /* For _SUB: no name of the subr. */
-#define PERLDBf_GOTO 0x80 /* Report goto: call DB::goto. */
+#define PERLDB_ALL (PERLDBf_SUB | PERLDBf_LINE | \
+ PERLDBf_NOOPT | PERLDBf_INTER | \
+ PERLDBf_SUBLINE| PERLDBf_SINGLE| \
+ PERLDBf_NAMEEVAL| PERLDBf_NAMEANON)
+ /* No _NONAME, _GOTO */
+#define PERLDBf_SUB 0x01 /* Debug sub enter/exit */
+#define PERLDBf_LINE 0x02 /* Keep line # */
+#define PERLDBf_NOOPT 0x04 /* Switch off optimizations */
+#define PERLDBf_INTER 0x08 /* Preserve more data for
+ later inspections */
+#define PERLDBf_SUBLINE 0x10 /* Keep subr source lines */
+#define PERLDBf_SINGLE 0x20 /* Start with single-step on */
+#define PERLDBf_NONAME 0x40 /* For _SUB: no name of the subr */
+#define PERLDBf_GOTO 0x80 /* Report goto: call DB::goto */
+#define PERLDBf_NAMEEVAL 0x100 /* Informative names for evals */
+#define PERLDBf_NAMEANON 0x200 /* Informative names for anon subs */
#define PERLDB_SUB (PL_perldb && (PL_perldb & PERLDBf_SUB))
#define PERLDB_LINE (PL_perldb && (PL_perldb & PERLDBf_LINE))
#define PERLDB_SINGLE (PL_perldb && (PL_perldb & PERLDBf_SINGLE))
#define PERLDB_SUB_NN (PL_perldb && (PL_perldb & (PERLDBf_NONAME)))
#define PERLDB_GOTO (PL_perldb && (PL_perldb & PERLDBf_GOTO))
+#define PERLDB_NAMEEVAL (PL_perldb && (PL_perldb & PERLDBf_NAMEEVAL))
+#define PERLDB_NAMEANON (PL_perldb && (PL_perldb & PERLDBf_NAMEANON))
#ifdef USE_LOCALE_NUMERIC
#endif /* !USE_LOCALE_NUMERIC */
-#if defined(USE_LONG_LONG) && defined(HAS_LONG_LONG)
+#if !defined(Atol) && defined(HAS_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
+# define Atol atoll
# endif
- /* is there atoq() anywhere? */
-#else
+#endif
+/* is there atoq() anywhere? */
+#if !defined(Atol)
# define Atol atol /* we assume atol being available anywhere */
#endif
-#if defined(USE_LONG_LONG) && defined(HAS_LONG_LONG)
-# if !defined(Strtoul) && defined(HAS_STRTOULL)
-# define Strtoul strtoull
-# endif
-# if !defined(Strtoul) && defined(HAS_STRTOUQ)
-# define Strtoul strtouq
-# endif
-#else
-# define Strtoul strtoul
+#if !defined(Strtoul) && defined(HAS_LONG_LONG) && defined(HAS_STRTOULL)
+# define Strtoul strtoull
+#endif
+/* is there atouq() anywhere? */
+#if !defined(Strtoul) && defined(USE_64_BITS) && defined(HAS_STRTOUQ)
+# define Strtoul strtouq
+#endif
+#if !defined(Strtoul)
+# define Strtoul strtoul /* we assume strtoul being available anywhere */
#endif
#if !defined(PERLIO_IS_STDIO) && defined(HASATTRIBUTE)
#include "patchlevel.h"
#undef PERL_PATCHLEVEL_H_IMPLICIT
+/* 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 */