add missing flag in change#4892
[p5sagit/p5-mst-13.2.git] / XSUB.h
diff --git a/XSUB.h b/XSUB.h
index ae746a6..18f5b81 100644 (file)
--- a/XSUB.h
+++ b/XSUB.h
@@ -17,6 +17,9 @@
 #define dXSTARG SV * targ = ((PL_op->op_private & OPpENTERSUB_HASTARG) \
                             ? PAD_SV(PL_op->op_targ) : sv_newmortal())
 
+/* Should be used before final PUSHi etc. if not in PPCODE section. */
+#define XSprePUSH (sp = PL_stack_base + ax - 1)
+
 #define XSANY CvXSUBANY(cv)
 
 #define dXSI32 I32 ix = XSANY.any_i32
@@ -74,7 +77,7 @@
                                    vn = "VERSION"), FALSE);            \
        }                                                               \
        if (tmpsv && (!SvOK(tmpsv) || strNE(XS_VERSION, SvPV(tmpsv, n_a))))     \
-           Perl_croak(aTHX_ "%s object version %s does not match %s%s%s%s %_", \
+           Perl_croak(aTHX_ "%s object version %s does not match %s%s%s%s %"SVf,\
                  module, XS_VERSION,                                   \
                  vn ? "$" : "", vn ? module : "", vn ? "::" : "",      \
                  vn ? vn : "bootstrap parameter", tmpsv);              \
 #  define VTBL_amagicelem      &PL_vtbl_amagicelem
 #endif
 
-#if defined(PERL_OBJECT) || defined(PERL_CAPI)
-#  include "perlapi.h"
-#  include "objXSUB.h"
-#endif /* PERL_OBJECT || PERL_CAPI */
+#include "perlapi.h"
+#include "objXSUB.h"
 
 #if defined(PERL_IMPLICIT_CONTEXT) && !defined(PERL_NO_GET_CONTEXT) && !defined(PERL_CORE)
 #  undef aTHX
 #  define aTHX_                aTHX,
 #endif
 
-#if defined(PERL_CAPI)
+#if (defined(PERL_CAPI) || defined(PERL_IMPLICIT_SYS)) && !defined(PERL_CORE)
 #  ifndef NO_XSLOCKS
 #    undef closedir
 #    undef opendir
 #    define fstat              PerlLIO_fstat
 #    define ioctl              PerlLIO_ioctl
 #    define isatty             PerlLIO_isatty
+#    define link                PerlLIO_link
 #    define lseek              PerlLIO_lseek
 #    define lstat              PerlLIO_lstat
 #    define mktemp             PerlLIO_mktemp
 #    define setjmp             PerlProc_setjmp
 #    define longjmp            PerlProc_longjmp
 #    define signal             PerlProc_signal
+#    define getpid             PerlProc_getpid
 #    define htonl              PerlSock_htonl
 #    define htons              PerlSock_htons
 #    define ntohl              PerlSock_ntohl