If XSUB.h/perl doesn't define the new XS_EXTERNAL macro that we
use for emitting non-static XSUBs for the boot functions, we have
XS_EXTERNAL just fall back to the standard XS macro.
# define PERL_UNUSED_VAR(var) if (0) var = var
#endif
+/* Starting from 5.15.2, XS(name) defines a static function (==internal)
+ * and the XS_EXTERNAL macro is used for functions that must not be static
+ * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL
+ * macro defined, the best we can do is assume XS is the same.
+ */
+#ifndef XS_EXTERNAL
+# define XS_EXTERNAL(name) XS(name)
+#endif
EOF
print <<"EOF";