summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embed.fnc2
-rw-r--r--embed.h12
-rw-r--r--pp_ctl.c6
-rw-r--r--proto.h2
4 files changed, 19 insertions, 3 deletions
diff --git a/embed.fnc b/embed.fnc
index 6030e5c453..d4fa4be829 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1324,7 +1324,9 @@ sR |I32 |dopoptowhen |I32 startingblock
s |void |save_lines |NULLOK AV *array|NN SV *sv
s |bool |doeval |int gimme|NULLOK OP** startop|NULLOK CV* outside|U32 seq
sR |PerlIO *|check_type_and_open|NN const char *name
+#ifndef PERL_DISABLE_PMC
sR |PerlIO *|doopen_pm |NN const char *name|const STRLEN namelen
+#endif
sRn |bool |path_is_absolute|NN const char *name
sR |I32 |run_user_filter|int idx|NN SV *buf_sv|int maxlen
sR |PMOP* |make_matcher |NN regexp* re
diff --git a/embed.h b/embed.h
index 418f794aa4..56b7a4b834 100644
--- a/embed.h
+++ b/embed.h
@@ -1305,7 +1305,13 @@
#define save_lines S_save_lines
#define doeval S_doeval
#define check_type_and_open S_check_type_and_open
+#endif
+#ifndef PERL_DISABLE_PMC
+#ifdef PERL_CORE
#define doopen_pm S_doopen_pm
+#endif
+#endif
+#ifdef PERL_CORE
#define path_is_absolute S_path_is_absolute
#define run_user_filter S_run_user_filter
#define make_matcher S_make_matcher
@@ -3584,7 +3590,13 @@
#define save_lines(a,b) S_save_lines(aTHX_ a,b)
#define doeval(a,b,c,d) S_doeval(aTHX_ a,b,c,d)
#define check_type_and_open(a) S_check_type_and_open(aTHX_ a)
+#endif
+#ifndef PERL_DISABLE_PMC
+#ifdef PERL_CORE
#define doopen_pm(a,b) S_doopen_pm(aTHX_ a,b)
+#endif
+#endif
+#ifdef PERL_CORE
#define path_is_absolute S_path_is_absolute
#define run_user_filter(a,b,c) S_run_user_filter(aTHX_ a,b,c)
#define make_matcher(a) S_make_matcher(aTHX_ a)
diff --git a/pp_ctl.c b/pp_ctl.c
index 021307484f..0968dd47a3 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3018,10 +3018,10 @@ S_check_type_and_open(pTHX_ const char *name)
return PerlIO_open(name, PERL_SCRIPT_MODE);
}
+#ifndef PERL_DISABLE_PMC
STATIC PerlIO *
S_doopen_pm(pTHX_ const char *name, const STRLEN namelen)
{
-#ifndef PERL_DISABLE_PMC
PerlIO *fp;
if (namelen > 3 && strEQ(name + namelen - 3, ".pm")) {
@@ -3045,10 +3045,10 @@ S_doopen_pm(pTHX_ const char *name, const STRLEN namelen)
fp = check_type_and_open(name);
}
return fp;
+}
#else
- return check_type_and_open(name);
+# define doopen_pm(name, namelen) check_type_and_open(name)
#endif /* !PERL_DISABLE_PMC */
-}
PP(pp_require)
{
diff --git a/proto.h b/proto.h
index c96c1d3f05..0bb7220d06 100644
--- a/proto.h
+++ b/proto.h
@@ -3542,10 +3542,12 @@ STATIC PerlIO * S_check_type_and_open(pTHX_ const char *name)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
+#ifndef PERL_DISABLE_PMC
STATIC PerlIO * S_doopen_pm(pTHX_ const char *name, const STRLEN namelen)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
+#endif
STATIC bool S_path_is_absolute(const char *name)
__attribute__warn_unused_result__
__attribute__nonnull__(1);