* 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