#endif
#define NOOP /*EMPTY*/(void)0
-#if !defined(HASATTRIBUTE_UNUSED) && defined(__cplusplus)
-#define dNOOP /*EMPTY*/(void)0 /* Older g++ has no __attribute((unused))__ */
-#else
-#define dNOOP extern int /*@unused@*/ Perl___notused PERL_UNUSED_DECL
-#endif
+/* cea2e8a9dd23747f accidentally lost the comment originally from the first
+ check in of thread.h, explaining why we need dNOOP at all: */
+/* Rats: if dTHR is just blank then the subsequent ";" throws an error */
+/* Declaring a *function*, instead of a variable, ensures that we don't rely
+ on being able to suppress "unused" warnings. */
+#define dNOOP extern int Perl___notused(void)
#ifndef pTHX
/* Don't bother defining tTHX and sTHX; using them outside
# endif
#endif
-#define WITH_THX(s) STMT_START { dTHX; s; } STMT_END
-#define WITH_THR(s) WITH_THX(s)
-
#ifndef BYTEORDER /* Should never happen -- byteorder is in config.h */
# define BYTEORDER 0x1234
#endif
# define _SOCKADDR_LEN
#endif
-#if defined(HAS_SOCKET) && !defined(VMS) && !defined(WIN32) /* VMS/WIN32 handle sockets via vmsish.h/win32.h */
+#if defined(HAS_SOCKET) && !defined(WIN32) /* WIN32 handles sockets via win32.h */
# include <sys/socket.h>
# if defined(USE_SOCKS) && defined(I_SOCKS)
# if !defined(INCLUDE_PROTOTYPES)
#define SVfARG(p) ((void*)(p))
+#ifndef HEKf
+# define HEKf "2p"
+#endif
+
+/* Not ideal, but we cannot easily include a number in an already-numeric
+ * format sequence. */
+#ifndef HEKf256
+# define HEKf256 "3p"
+#endif
+
+#define HEKfARG(p) ((void*)(p))
+
#ifdef PERL_CORE
/* not used; but needed for backward compatibility with XS code? - RMB */
# undef VDf
/* handy constants */
EXTCONST char PL_warn_uninit[]
INIT("Use of uninitialized value%s%s%s");
+EXTCONST char PL_warn_uninit_sv[]
+ INIT("Use of uninitialized value%"SVf"%s%s");
EXTCONST char PL_warn_nosemi[]
INIT("Semicolon seems to be missing");
EXTCONST char PL_warn_reserved[]
#ifdef DOINIT
EXTCONST char PL_uudmap[256] =
-#include "uudmap.h"
+# ifdef PERL_MICRO
+# include "uuudmap.h"
+# else
+# include "uudmap.h"
+# endif
;
EXTCONST char PL_bitcount[256] =
-# include "bitcount.h"
+# ifdef PERL_MICRO
+# include "ubitcount.h"
+#else
+# include "bitcount.h"
+# endif
;
EXTCONST char* const PL_sig_name[] = { SIG_NAME };
EXTCONST int PL_sig_num[] = { SIG_NUM };
# ifdef FAKE_THREADS
" FAKE_THREADS"
# endif
+# ifdef FCRYPT
+ " FCRYPT"
+# endif
+# ifdef HAS_TIMES
+ " HAS_TIMES"
+# endif
+# ifdef HAVE_INTERP_INTERN
+ " HAVE_INTERP_INTERN"
+# endif
# ifdef MULTIPLICITY
" MULTIPLICITY"
# endif
# ifdef MYMALLOC
" MYMALLOC"
# endif
+# ifdef PERLIO_LAYERS
+ " PERLIO_LAYERS"
+# endif
# ifdef PERL_DEBUG_READONLY_OPS
" PERL_DEBUG_READONLY_OPS"
# endif
# ifdef PERL_MAD
" PERL_MAD"
# endif
+# ifdef PERL_MICRO
+ " PERL_MICRO"
+# endif
# ifdef PERL_NEED_APPCTX
" PERL_NEED_APPCTX"
# endif
# ifdef USE_LARGE_FILES
" USE_LARGE_FILES"
# endif
+# ifdef USE_LOCALE_COLLATE
+ " USE_LOCALE_COLLATE"
+# endif
+# ifdef USE_LOCALE_NUMERIC
+ " USE_LOCALE_NUMERIC"
+# endif
# ifdef USE_LONG_DOUBLE
" USE_LONG_DOUBLE"
# endif
# ifdef VMS_DO_SOCKETS
" VMS_DO_SOCKETS"
# endif
-# ifdef VMS_WE_ARE_CASE_SENSITIVE
- " VMS_SYMBOL_CASE_AS_IS"
-# endif
# ifdef VMS_SHORTEN_LONG_SYMBOLS
" VMS_SHORTEN_LONG_SYMBOLS"
# endif
+# ifdef VMS_WE_ARE_CASE_SENSITIVE
+ " VMS_SYMBOL_CASE_AS_IS"
+# endif
"";
#else
EXTCONST char PL_bincompat_options[];
#endif
+#ifndef PERL_SET_PHASE
+# define PERL_SET_PHASE(new_phase) \
+ PHASE_CHANGE_PROBE(PL_phase_names[new_phase], PL_phase_names[PL_phase]); \
+ PL_phase = new_phase;
+#endif
+
/* The interpreter phases. If these ever change, PL_phase_names right below will
* need to be updated accordingly. */
enum perl_phase {
#define HINT_STRICT_REFS 0x00000002 /* strict pragma */
#define HINT_LOCALE 0x00000004 /* locale pragma */
#define HINT_BYTES 0x00000008 /* bytes pragma */
-#define HINT_ARYBASE 0x00000010 /* $[ is non-zero */
/* Note: 20,40,80 used for NATIVE_HINTS */
/* currently defined by vms/vmsish.h */
typedef int (*Perl_keyword_plugin_t)(pTHX_ char*, STRLEN, OP**);
typedef void(*Perl_cpeep_t)(pTHX_ OP *, OP *);
+typedef void(*globhook_t)(pTHX);
+
#define KEYWORD_PLUGIN_DECLINE 0
#define KEYWORD_PLUGIN_STMT 1
#define KEYWORD_PLUGIN_EXPR 2
*/
/* Set up PERLVAR macros for populating structs */
-# define PERLVAR(var,type) type var;
-# define PERLVARA(var,n,type) type var[n];
-# define PERLVARI(var,type,init) type var;
-# define PERLVARIC(var,type,init) type var;
+# define PERLVAR(prefix,var,type) type prefix##var;
+# define PERLVARA(prefix,var,n,type) type prefix##var[n];
+# define PERLVARI(prefix,var,type,init) type prefix##var;
+# define PERLVARIC(prefix,var,type,init) type prefix##var;
struct interpreter {
# include "intrpvar.h"
* these include variables that would have been their struct-s
*/
-#define PERLVAR(var,type) EXT type PL_##var;
-#define PERLVARA(var,n,type) EXT type PL_##var[n];
-#define PERLVARI(var,type,init) EXT type PL_##var INIT(init);
-#define PERLVARIC(var,type,init) EXTCONST type PL_##var INIT(init);
+#define PERLVAR(prefix,var,type) EXT type PL_##var;
+#define PERLVARA(prefix,var,n,type) EXT type PL_##var[n];
+#define PERLVARI(prefix,var,type,init) EXT type PL_##var INIT(init);
+#define PERLVARIC(prefix,var,type,init) EXTCONST type PL_##var INIT(init);
#if !defined(MULTIPLICITY)
START_EXTERN_C
#ifdef DOINIT
EXTCONST U8 PL_magic_data[256] =
-#include "mg_data.h"
+# ifdef PERL_MICRO
+# include "umg_data.h"
+# else
+# include "mg_data.h"
+# endif
;
#else
EXTCONST U8 PL_magic_data[256];
#endif
+#ifdef DOINIT
+ /* NL BD IV NV PV PI PN MG RX GV LV AV HV CV FM IO */
+EXTCONST bool
+PL_valid_types_IVX[] = { 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0 };
+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 };
+EXTCONST bool
+PL_valid_types_RV[] = { 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1 };
+EXTCONST bool
+PL_valid_types_IV_set[] = { 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1 };
+EXTCONST bool
+PL_valid_types_NV_set[] = { 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 };
+
+#else
+
+EXTCONST bool PL_valid_types_IVX[];
+EXTCONST bool PL_valid_types_NVX[];
+EXTCONST bool PL_valid_types_PVX[];
+EXTCONST bool PL_valid_types_RV[];
+EXTCONST bool PL_valid_types_IV_set[];
+EXTCONST bool PL_valid_types_NV_set[];
+
+#endif
+
+
#include "overload.h"
END_EXTERN_C