# define tTHX PerlInterpreter*
# define pTHX register tTHX my_perl PERL_UNUSED_DECL
# define aTHX my_perl
+# define aTHXa(a) aTHX = (tTHX)a
# ifdef PERL_GLOBAL_STRUCT
# define dTHXa(a) dVAR; pTHX = (tTHX)a
# else
# define pTHX_
# define aTHX
# define aTHX_
+# define aTHXa(a) NOOP
# define dTHXa(a) dNOOP
# define dTHX dNOOP
# define pTHX_1 1
# define VOL
#endif
-#define TAINT (PL_tainted = TRUE)
-#define TAINT_NOT (PL_tainted = FALSE)
-#define TAINT_IF(c) if (c) { PL_tainted = TRUE; }
-#define TAINT_ENV() if (PL_tainting) { taint_env(); }
-#define TAINT_PROPER(s) if (PL_tainting) { taint_proper(NULL, s); }
+/* By compiling a perl with -DNO_TAINT_SUPPORT or -DSILENT_NO_TAINT_SUPPORT,
+ * you get a perl without taint support, but doubtlessly with a lesser
+ * degree of support. Do not do so unless you know exactly what it means
+ * technically, have a good reason to do so, and know exactly how the
+ * perl will be used. perls with -DSILENT_NO_TAINT_SUPPORT are considered
+ * a potential security risk due to flat out ignoring the security-relevant
+ * taint flags. This being said, a perl without taint support compiled in
+ * has marginal run-time performance benefits.
+ * SILENT_NO_TAINT_SUPPORT implies NO_TAINT_SUPPORT.
+ * SILENT_NO_TAINT_SUPPORT is the same as NO_TAINT_SUPPORT except it
+ * silently ignores -t/-T instead of throwing an exception.
+ *
+ * DANGER! Using NO_TAINT_SUPPORT or SILENT_NO_TAINT_SUPPORT
+ * voids your nonexistent warranty!
+ */
+#if SILENT_NO_TAINT_SUPPORT && !defined(NO_TAINT_SUPPORT)
+# define NO_TAINT_SUPPORT 1
+#endif
+
+/* NO_TAINT_SUPPORT can be set to transform virtually all taint-related
+ * operations into no-ops for a very modest speed-up. Enable only if you
+ * know what you're doing: tests and CPAN modules' tests are bound to fail.
+ */
+#if NO_TAINT_SUPPORT
+# define TAINT NOOP
+# define TAINT_NOT NOOP
+# define TAINT_IF(c) NOOP
+# define TAINT_ENV() NOOP
+# define TAINT_PROPER(s) NOOP
+# define TAINT_set(s) NOOP
+# define TAINT_get 0
+# define TAINTING_get 0
+# define TAINTING_set(s) NOOP
+# define TAINT_WARN_get 0
+# define TAINT_WARN_set(s) NOOP
+#else
+# define TAINT (PL_tainted = TRUE)
+# define TAINT_NOT (PL_tainted = FALSE)
+# define TAINT_IF(c) if (c) { PL_tainted = TRUE; }
+# define TAINT_ENV() if (PL_tainting) { taint_env(); }
+# define TAINT_PROPER(s) if (PL_tainting) { taint_proper(NULL, s); }
+# define TAINT_set(s) (PL_tainted = (s))
+# define TAINT_get (PL_tainted)
+# define TAINTING_get (PL_tainting)
+# define TAINTING_set(s) (PL_tainting = (s))
+# define TAINT_WARN_get (PL_taint_warn)
+# define TAINT_WARN_set(s) (PL_taint_warn = (s))
+#endif
/* flags used internally only within pp_subst and pp_substcont */
#ifdef PERL_CORE
# define ISHISH "plan9"
#endif
-#if defined(MPE)
-# include "mpeix/mpeixish.h"
-# define ISHISH "mpeix"
-#endif
-
#if defined(__VOS__)
# ifdef __GNUC__
# include "./vos/vosish.h"
#endif
#ifndef __cplusplus
-#if !(defined(UNDER_CE) || defined(SYMBIAN))
+#if !(defined(WIN32) || defined(UNDER_CE) || defined(SYMBIAN))
Uid_t getuid (void);
Uid_t geteuid (void);
Gid_t getgid (void);
# endif
# endif
# endif /* !DONT_DECLARE_STD */
-#ifndef getlogin
+# ifndef WIN32
+# ifndef getlogin
char *getlogin (void);
-#endif
+# endif
+# endif /* !WIN32 */
#endif /* !__cplusplus */
/* Fixme on VMS. This needs to be a run-time, not build time options */
#define HINT_SORT_MERGESORT 0x00000002
#define HINT_SORT_STABLE 0x00000100 /* sort styles (currently one) */
+/* flags for PL_sawampersand */
+
+#define SAWAMPERSAND_LEFT 1 /* saw $` */
+#define SAWAMPERSAND_MIDDLE 2 /* saw $& */
+#define SAWAMPERSAND_RIGHT 4 /* saw $' */
+
/* Various states of the input record separator SV (rs) */
#define RsSNARF(sv) (! SvOK(sv))
#define RsSIMPLE(sv) (SvOK(sv) && (! SvPOK(sv) || SvCUR(sv)))
# define PERL_CALLCONV_NO_RET PERL_CALLCONV
#endif
+/* PERL_STATIC_NO_RET is supposed to be equivalent to STATIC on builds that
+ dont have a noreturn as a declaration specifier
+*/
+#ifndef PERL_STATIC_NO_RET
+# define PERL_STATIC_NO_RET STATIC
+#endif
+/* PERL_STATIC_NO_RET is supposed to be equivalent to PERL_STATIC_INLINE on
+ builds that dont have a noreturn as a declaration specifier
+*/
+#ifndef PERL_STATIC_INLINE_NO_RET
+# define PERL_STATIC_INLINE_NO_RET PERL_STATIC_INLINE
+#endif
+
+
#undef PERL_CKDEF
#undef PERL_PPDEF
#define PERL_CKDEF(s) PERL_CALLCONV OP *s (pTHX_ OP *o);
EXTCONST bool
PL_valid_types_NVX[] = { 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0 };
EXTCONST bool
-PL_valid_types_PVX[] = { 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1 };
+PL_valid_types_PVX[] = { 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1 };
EXTCONST bool
PL_valid_types_RV[] = { 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1 };
EXTCONST bool
/* ISO 6429 NEL - C1 control NExt Line */
/* See http://www.unicode.org/unicode/reports/tr13/ */
-#ifdef EBCDIC /* In EBCDIC NEL is just an alias for LF */
-# if '^' == 95 /* CP 1047: MVS OpenEdition - OS/390 - z/OS */
-# define NEXT_LINE_CHAR 0x15
-# else /* CDRA */
-# define NEXT_LINE_CHAR 0x25
-# endif
-#else
-# define NEXT_LINE_CHAR 0x85
-#endif
+#define NEXT_LINE_CHAR NEXT_LINE_NATIVE
/* The UTF-8 bytes of the Unicode LS and PS, U+2028 and U+2029 */
#define UNICODE_LINE_SEPA_0 0xE2