# define STRUCT_OFFSET(s,m) (Size_t)(&(((s *)0)->m))
#endif
+/* ptrdiff_t is C11, so undef it under pedantic builds */
+#ifdef PERL_GCC_PEDANTIC
+# undef HAS_PTRDIFF_T
+#endif
+
#ifndef __SYMBIAN32__
# if defined(I_STRING) || defined(__cplusplus)
# include <string.h>
# define CHECK_MALLOC_TAINT(newval) \
CHECK_MALLOC_TOO_LATE_FOR_( \
if (newval) { \
- panic_write2("panic: tainting with $ENV{PERL_MALLOC_OPT}\n");\
+ PERL_UNUSED_RESULT(panic_write2("panic: tainting with $ENV{PERL_MALLOC_OPT}\n"));\
exit(1); })
# define MALLOC_CHECK_TAINT(argc,argv,env) STMT_START { \
if (doing_taint(argc,argv,env)) { \
#define PERLDB_SAVESRC_NOSUBS (PL_perldb && (PL_perldb & PERLDBf_SAVESRC_NOSUBS))
#define PERLDB_SAVESRC_INVALID (PL_perldb && (PL_perldb & PERLDBf_SAVESRC_INVALID))
+#ifdef USE_LOCALE
/* These locale things are all subject to change */
/* Returns TRUE if the plain locale pragma without a parameter is in effect
*/
#define IN_LC_RUNTIME(category) (IN_LC_ALL_RUNTIME || (IN_LC_PARTIAL_RUNTIME && _is_in_locale_category(FALSE, (category))))
#define IN_LC(category) (IN_LC_COMPILETIME(category) || IN_LC_RUNTIME(category))
+#else /* No locale usage */
+# define IN_LOCALE_RUNTIME 0
+# define IN_SOME_LOCALE_FORM_RUNTIME 0
+# define IN_LOCALE_COMPILETIME 0
+# define IN_SOME_LOCALE_FORM_COMPILETIME 0
+# define IN_LOCALE 0
+# define IN_SOME_LOCALE_FORM 0
+# define IN_LC_ALL_COMPILETIME 0
+# define IN_LC_ALL_RUNTIME 0
+# define IN_LC_PARTIAL_COMPILETIME 0
+# define IN_LC_PARTIAL_RUNTIME 0
+# define IN_LC_COMPILETIME(category) 0
+# define IN_LC_RUNTIME(category) 0
+# define IN_LC(category) 0
+#endif
+
#ifdef USE_LOCALE_NUMERIC
/* These macros are for toggling between the underlying locale (LOCAL) and the
#define STORE_LC_NUMERIC_SET_TO_NEEDED()
#define DECLARE_STORE_LC_NUMERIC_SET_TO_NEEDED()
#define RESTORE_LC_NUMERIC()
+#define LOCK_NUMERIC_STANDARD()
+#define UNLOCK_NUMERIC_STANDARD()
#define Atof my_atof
-#define IN_LOCALE_RUNTIME 0
-#define IN_LOCALE_COMPILETIME 0
#endif /* !USE_LOCALE_NUMERIC */
#define PERL_PV_PRETTY_DUMP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_QUOTE
#define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE|PERL_PV_ESCAPE_NONASCII
-#if defined(USE_C_BACKTRACE) && defined(I_BFD)
-# define USE_BFD
-# ifdef PERL_DARWIN
-# undef USE_BFD /* BFD is useless in OS X. */
-# endif
-# ifdef USE_BFD
-# include <bfd.h>
-# endif
-#endif
-
/*
(KEEP THIS LAST IN perl.h!)