* PERL_CALLCONV to be something special. See also the
* definition of XS() in XSUB.h. */
#ifndef PERL_EXPORT_C
-# define PERL_EXPORT_C extern
+# ifdef __cplusplus
+# define PERL_EXPORT_C extern "C"
+# else
+# define PERL_EXPORT_C extern
+# endif
#endif
#ifndef PERL_XS_EXPORT_C
-# define PERL_XS_EXPORT_C
+# ifdef __cplusplus
+# define PERL_XS_EXPORT_C extern "C"
+# else
+# define PERL_XS_EXPORT_C
+# endif
#endif
#ifdef OP_IN_REGISTER
#endif
#if defined(HAS_SYSCALL) && !defined(HAS_SYSCALL_PROTO) && !defined(PERL_MICRO)
-int syscall(int, ...);
+EXTERN_C int syscall(int, ...);
#endif
#if defined(HAS_USLEEP) && !defined(HAS_USLEEP_PROTO) && !defined(PERL_MICRO)
-int usleep(unsigned int);
+EXTERN_C int usleep(unsigned int);
#endif
#ifdef PERL_MICRO /* Last chance to export Perl_my_swap */
# endif
#endif
+#if defined(__osf__) && defined(__cplusplus) && !defined(_XOPEN_SOURCE_EXTENDED)
+EXTERN_C int fchdir(int);
+EXTERN_C int flock(int, int);
+EXTERN_C int fseeko(FILE *, off_t, int);
+EXTERN_C off_t ftello(FILE *);
+#endif
+
+#if defined(__SUNPRO_CC)
+EXTERN_C char *crypt(const char *, const char *);
+#endif
+
#ifdef SETERRNO
# undef SETERRNO /* SOCKS might have defined this */
#endif
# endif
#endif
+/* not used; but needed for backward compatibilty with XS code? - RMB */
#ifndef UVf
# define UVf UVuf
#endif
#define HINT_FILETEST_ACCESS 0x00400000 /* filetest pragma */
#define HINT_UTF8 0x00800000 /* utf8 pragma */
-/* assertions pragma */
-#define HINT_ASSERTING 0x01000000
-#define HINT_ASSERTIONSSEEN 0x02000000
+/* assertions pragma, stored in $^H{assertions} */
+#define HINT_ASSERTING 0x00000001
+#define HINT_ASSERTIONSSEEN 0x00000002
/* The following are stored in $^H{sort}, not in PL_hints */
#define HINT_SORT_SORT_BITS 0x000000FF /* allow 256 different ones */
#include "pp.h"
#ifndef PERL_CALLCONV
-# define PERL_CALLCONV
+# ifdef __cplusplus
+# define PERL_CALLCONV extern "C"
+# else
+# define PERL_CALLCONV
+# endif
#endif
#undef PERL_CKDEF
#undef PERL_PPDEF
#include "patchlevel.h"
#undef PERL_PATCHLEVEL_H_IMPLICIT
-/* Mention
+/* These are used by Perl_pv_escape() and Perl_pv_pretty()
+ * are here so that they are available throughout the core
+ * NOTE that even though some are for _escape and some for _pretty
+ * there must not be any clashes as the flags from _pretty are
+ * passed straight through to _escape.
+ */
+
+#define PERL_PV_ESCAPE_QUOTE 0x0001
+#define PERL_PV_PRETTY_QUOTE PERL_PV_ESCAPE_QUOTE
+
+
+#define PERL_PV_PRETTY_ELIPSES 0x0002
+#define PERL_PV_PRETTY_LTGT 0x0004
+
+#define PERL_PV_ESCAPE_FIRSTCHAR 0x0008
+
+#define PERL_PV_ESCAPE_UNI 0x0100
+#define PERL_PV_ESCAPE_UNI_DETECT 0x0200
+
+#define PERL_PV_ESCAPE_ALL 0x1000
+#define PERL_PV_ESCAPE_NOBACKSLASH 0x2000
+#define PERL_PV_ESCAPE_NOCLEAR 0x4000
+
+/* used by pv_display in dump.c*/
+#define PERL_PV_PRETTY_DUMP PERL_PV_PRETTY_ELIPSES|PERL_PV_PRETTY_QUOTE
+#define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELIPSES|PERL_PV_PRETTY_LTGT
+
+/*
+
+ (KEEP THIS LAST IN perl.h!)
+
+ Mention
NV_PRESERVES_UV
HAS_DIRFD
- so that Configure picks them up. */
-
-/* These are used by Perl_pv_escape() and Perl_pv_pretty()
- * are here so that they are available throughout the core
- * NOTE that even though some are for _escape and some for _pretty
- * there must not be any clashes as the flags from _pretty are
- * passed straight through to _escape.
- */
-
-#define PERL_PV_ESCAPE_QUOTE 0x0001
-#define PERL_PV_PRETTY_QUOTE PERL_PV_ESCAPE_QUOTE
-
-
-#define PERL_PV_PRETTY_ELIPSES 0x0002
-#define PERL_PV_PRETTY_LTGT 0x0004
+ so that Configure picks them up.
-#define PERL_PV_ESCAPE_FIRSTCHAR 0x0008
-
-#define PERL_PV_ESCAPE_UNI 0x0100
-#define PERL_PV_ESCAPE_UNI_DETECT 0x0200
+ (KEEP THIS LAST IN perl.h!)
-#define PERL_PV_ESCAPE_ALL 0x1000
-#define PERL_PV_ESCAPE_NOBACKSLASH 0x2000
-#define PERL_PV_ESCAPE_NOCLEAR 0x4000
-
-/* used by pv_display in dump.c*/
-#define PERL_PV_PRETTY_DUMP PERL_PV_PRETTY_ELIPSES|PERL_PV_PRETTY_QUOTE
-#define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELIPSES|PERL_PV_PRETTY_LTGT
+*/
#endif /* Include guard */