/* perl.h
*
* Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- * 2000, 2001, 2002, 2003, 2004, by Larry Wall and others
+ * 2000, 2001, 2002, 2003, 2004, 2005 by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
#endif
#if defined(__STRICT_ANSI__) && defined(PERL_GCC_PEDANTIC)
-# define PERL_GCC_BRACE_GROUPS_FORBIDDEN
+# if !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
+# define PERL_GCC_BRACE_GROUPS_FORBIDDEN
+# endif
#endif
/*
/* eg glibc 2.2 series seems to provide modfl on ppc and arm, but has no
prototype in <math.h> */
# ifndef HAS_MODFL_PROTO
-long double modfl(long double, long double *);
+EXTERN_C long double modfl(long double, long double *);
# endif
# else
# if defined(HAS_AINTL) && defined(HAS_COPYSIGNL)
#ifndef SVf
# ifdef CHECK_FORMAT
# define SVf "-p"
-# ifndef SVf256
-# define SVf256 "-256p"
-# endif
# else
# define SVf "_"
# endif
#endif
-#ifndef SVf256
-# define SVf256 ".256"SVf
-#endif
-
-#ifndef UVf
+#ifndef SVf_precision
# ifdef CHECK_FORMAT
-# define UVf UVuf
+# define SVf_precision(n) "-" n "p"
# else
-# define UVf "Vu"
+# define SVf_precision(n) "." n "_"
# endif
#endif
-#ifndef VDf
-# ifdef CHECK_FORMAT
-# define VDf "-1p"
-# else
-# define VDf "vd"
-# endif
+#ifndef SVf32
+# define SVf32 SVf_precision("32")
+#endif
+
+#ifndef SVf256
+# define SVf256 SVf_precision("256")
+#endif
+
+#ifndef UVf
+# define UVf UVuf
#endif
#ifndef DieNull
# ifdef CHECK_FORMAT
-# define DieNull vdie(aTHX_ Nullch, Null(va_list *))
+# define DieNull Perl_vdie(aTHX_ Nullch, Null(va_list *))
# else
# define DieNull Perl_die(aTHX_ Nullch)
# endif
EXTCONST char PL_no_symref[]
INIT("Can't use string (\"%.32s\") as %s ref while \"strict refs\" in use");
EXTCONST char PL_no_symref_sv[]
- INIT("Can't use string (\"%.32" SVf "\") as %s ref while \"strict refs\" in use");
+ INIT("Can't use string (\"%" SVf32 "\") as %s ref while \"strict refs\" in use");
EXTCONST char PL_no_usym[]
INIT("Can't use an undefined value as %s reference");
EXTCONST char PL_no_aelem[]
#ifdef DOINIT
-EXT char *PL_sig_name[] = { SIG_NAME };
+EXT const char *PL_sig_name[] = { SIG_NAME };
EXT int PL_sig_num[] = { SIG_NUM };
#else
-EXT char *PL_sig_name[];
+EXT const char *PL_sig_name[];
EXT int PL_sig_num[];
#endif
e_star /* asterisk */
} howlen_t;
-typedef struct {
+typedef struct tempsym {
char* patptr; /* current template char */
char* patend; /* one after last char */
char* grpbeg; /* 1st char of ()-group */
int level; /* () nesting level */
U32 flags; /* /=4, comma=2, pack=1 */
/* and group modifiers */
+ STRLEN strbeg; /* offset of group start */
+ struct tempsym *previous; /* previous group */
} tempsym_t;
#include "thread.h"
};
#define NofAMmeth max_amg_code
-#define AMG_id2name(id) ((char*)PL_AMG_names[id]+1)
+#define AMG_id2name(id) (PL_AMG_names[id]+1)
#ifdef DOINIT
EXTCONST char * PL_AMG_names[NofAMmeth] = {
new_chunk_size = (chunk_size); \
if (new_chunk_size > PL_nice_chunk_size) { \
if (PL_nice_chunk) Safefree(PL_nice_chunk); \
- PL_nice_chunk = new_chunk; \
+ PL_nice_chunk = (char *) new_chunk; \
PL_nice_chunk_size = new_chunk_size; \
} else { \
Safefree(chunk); \