ingroup() is only used in doio.c.
Nicholas Clark [Wed, 26 Nov 2008 19:58:49 +0000 (19:58 +0000)]
Wrap gen_constant_list in #if defined(PERL_IN_OP_C)

p4raw-id: //depot/perl@34925

doio.c
embed.fnc
embed.h
proto.h

diff --git a/doio.c b/doio.c
index 2738323..46ef41e 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -1944,7 +1944,7 @@ Perl_cando(pTHX_ Mode_t mode, bool effective, register const Stat_t *statbufp)
 #endif /* ! VMS */
 
 bool
-Perl_ingroup(pTHX_ Gid_t testgid, bool effective)
+S_ingroup(pTHX_ Gid_t testgid, bool effective)
 {
 #ifdef MACOS_TRADITIONAL
     /* This is simply not correct for AppleShare, but fix it yerself. */
index 6ebd2a2..b7deb6b 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -280,7 +280,9 @@ s   |OP*    |fold_constants |NN OP *o
 Afpd   |char*  |form           |NN const char* pat|...
 Ap     |char*  |vform          |NN const char* pat|NULLOK va_list* args
 Ap     |void   |free_tmps
+#if defined(PERL_IN_OP_C)
 s      |OP*    |gen_constant_list|NULLOK OP* o
+#endif
 #if !defined(HAS_GETENV_LEN)
 p      |char*  |getenv_len     |NN const char *env_elem|NN unsigned long *len
 #endif
@@ -370,7 +372,9 @@ ApP |I32    |ibcmp_locale   |NN const char* a|NN const char* b|I32 len
 Apd    |I32    |ibcmp_utf8     |NN const char *s1|NULLOK char **pe1|UV l1 \
                                |bool u1|NN const char *s2|NULLOK char **pe2 \
                                |UV l2|bool u2
-pR     |bool   |ingroup        |Gid_t testgid|bool effective
+#if defined(PERL_IN_DOIO_C)
+sR     |bool   |ingroup        |Gid_t testgid|bool effective
+#endif
 p      |void   |init_argv_symbols|int argc|NN char **argv
 p      |void   |init_debugger
 Ap     |void   |init_stacks
diff --git a/embed.h b/embed.h
index 57eaeb8..d5768db 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define form                   Perl_form
 #define vform                  Perl_vform
 #define free_tmps              Perl_free_tmps
+#if defined(PERL_IN_OP_C)
 #ifdef PERL_CORE
 #define gen_constant_list      S_gen_constant_list
 #endif
+#endif
 #if !defined(HAS_GETENV_LEN)
 #ifdef PERL_CORE
 #define getenv_len             Perl_getenv_len
 #define ibcmp                  Perl_ibcmp
 #define ibcmp_locale           Perl_ibcmp_locale
 #define ibcmp_utf8             Perl_ibcmp_utf8
+#if defined(PERL_IN_DOIO_C)
+#ifdef PERL_CORE
+#define ingroup                        S_ingroup
+#endif
+#endif
 #ifdef PERL_CORE
-#define ingroup                        Perl_ingroup
 #define init_argv_symbols      Perl_init_argv_symbols
 #define init_debugger          Perl_init_debugger
 #endif
 #endif
 #define vform(a,b)             Perl_vform(aTHX_ a,b)
 #define free_tmps()            Perl_free_tmps(aTHX)
+#if defined(PERL_IN_OP_C)
 #ifdef PERL_CORE
 #define gen_constant_list(a)   S_gen_constant_list(aTHX_ a)
 #endif
+#endif
 #if !defined(HAS_GETENV_LEN)
 #ifdef PERL_CORE
 #define getenv_len(a,b)                Perl_getenv_len(aTHX_ a,b)
 #define ibcmp(a,b,c)           Perl_ibcmp(aTHX_ a,b,c)
 #define ibcmp_locale(a,b,c)    Perl_ibcmp_locale(aTHX_ a,b,c)
 #define ibcmp_utf8(a,b,c,d,e,f,g,h)    Perl_ibcmp_utf8(aTHX_ a,b,c,d,e,f,g,h)
+#if defined(PERL_IN_DOIO_C)
+#ifdef PERL_CORE
+#define ingroup(a,b)           S_ingroup(aTHX_ a,b)
+#endif
+#endif
 #ifdef PERL_CORE
-#define ingroup(a,b)           Perl_ingroup(aTHX_ a,b)
 #define init_argv_symbols(a,b) Perl_init_argv_symbols(aTHX_ a,b)
 #define init_debugger()                Perl_init_debugger(aTHX)
 #endif
diff --git a/proto.h b/proto.h
index 6187a98..c4c0c01 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -818,7 +818,9 @@ PERL_CALLCONV char* Perl_vform(pTHX_ const char* pat, va_list* args)
        assert(pat)
 
 PERL_CALLCONV void     Perl_free_tmps(pTHX);
+#if defined(PERL_IN_OP_C)
 STATIC OP*     S_gen_constant_list(pTHX_ OP* o);
+#endif
 #if !defined(HAS_GETENV_LEN)
 PERL_CALLCONV char*    Perl_getenv_len(pTHX_ const char *env_elem, unsigned long *len)
                        __attribute__nonnull__(pTHX_1)
@@ -1112,9 +1114,11 @@ PERL_CALLCONV I32        Perl_ibcmp_utf8(pTHX_ const char *s1, char **pe1, UV l1, bool
 #define PERL_ARGS_ASSERT_IBCMP_UTF8    \
        assert(s1); assert(s2)
 
-PERL_CALLCONV bool     Perl_ingroup(pTHX_ Gid_t testgid, bool effective)
+#if defined(PERL_IN_DOIO_C)
+STATIC bool    S_ingroup(pTHX_ Gid_t testgid, bool effective)
                        __attribute__warn_unused_result__;
 
+#endif
 PERL_CALLCONV void     Perl_init_argv_symbols(pTHX_ int argc, char **argv)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_INIT_ARGV_SYMBOLS     \