support bytecode and C backends in perlcc (patch suggested
[p5sagit/p5-mst-13.2.git] / XSUB.h
diff --git a/XSUB.h b/XSUB.h
index 15f2b41..241ac40 100644 (file)
--- a/XSUB.h
+++ b/XSUB.h
@@ -1,6 +1,6 @@
 #define ST(off) PL_stack_base[ax + (off)]
 
-#if defined(CYGWIN32) && defined(USE_DYNAMIC_LOADING)
+#if defined(CYGWIN) && defined(USE_DYNAMIC_LOADING)
 #  define XS(name) __declspec(dllexport) void name(pTHXo_ CV* cv)
 #else
 #  define XS(name) void name(pTHXo_ CV* cv)
 #  include "objXSUB.h"
 #endif /* PERL_OBJECT || PERL_CAPI */
 
-#if defined(PERL_CAPI)
+#if defined(PERL_IMPLICIT_CONTEXT) && !defined(PERL_NO_GET_CONTEXT) && !defined(PERL_CORE)
 #  undef aTHX
 #  undef aTHX_
-#  undef _aTHX
-#  if defined(PERL_NO_GET_CONTEXT)
-#    define aTHX        my_perl
-#  else
-#    define aTHX        PERL_GET_INTERP
-#  endif /* PERL_NO_GET_CONTEXT */
-#  define aTHX_        aTHX,
-#  define _aTHX        ,aTHX
+#  define aTHX         PERL_GET_THX
+#  define aTHX_                aTHX,
+#endif
+
+#if defined(PERL_CAPI)
 #  ifndef NO_XSLOCKS
 #    undef closedir
 #    undef opendir