From: Dave Mitchell Date: Mon, 24 Sep 2007 00:42:07 +0000 (+0000) Subject: fifth attempt to silence S_emulate_eaccess compiler warning X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5711aeb8cae9f3935cd6755e745b5ee1ab3aa4b6;p=p5sagit%2Fp5-mst-13.2.git fifth attempt to silence S_emulate_eaccess compiler warning p4raw-id: //depot/perl@31947 --- diff --git a/embed.fnc b/embed.fnc index 1048331..bd86a1f 100644 --- a/embed.fnc +++ b/embed.fnc @@ -1354,7 +1354,6 @@ s |void |qsortsvu |NN SV** array|size_t num_elts|NN SVCOMPARE_t compare #if defined(PERL_IN_PP_SYS_C) || defined(PERL_DECL_PROT) s |OP* |doform |NN CV *cv|NN GV *gv|NN OP *retop -s |int |emulate_eaccess|NN const char* path|Mode_t mode # if !defined(HAS_MKDIR) || !defined(HAS_RMDIR) sR |int |dooneliner |NN const char *cmd|NN const char *filename # endif diff --git a/embed.h b/embed.h index af50800..1b6d88e 100644 --- a/embed.h +++ b/embed.h @@ -1338,7 +1338,6 @@ #if defined(PERL_IN_PP_SYS_C) || defined(PERL_DECL_PROT) #ifdef PERL_CORE #define doform S_doform -#define emulate_eaccess S_emulate_eaccess #endif # if !defined(HAS_MKDIR) || !defined(HAS_RMDIR) #ifdef PERL_CORE @@ -3618,7 +3617,6 @@ #if defined(PERL_IN_PP_SYS_C) || defined(PERL_DECL_PROT) #ifdef PERL_CORE #define doform(a,b,c) S_doform(aTHX_ a,b,c) -#define emulate_eaccess(a,b) S_emulate_eaccess(aTHX_ a,b) #endif # if !defined(HAS_MKDIR) || !defined(HAS_RMDIR) #ifdef PERL_CORE diff --git a/pp_sys.c b/pp_sys.c index b79031c..7d0bb2d 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -297,20 +297,7 @@ S_emulate_eaccess(pTHX_ const char* path, Mode_t mode) return res; } -# define PERL_EFF_ACCESS(p,f) (emulate_eaccess((p), (f))) -#else -/* With it or without it: anyway you get a warning: either that - it is unused, or it is declared static and never defined. - */ -STATIC int -S_emulate_eaccess(pTHX_ const char* path, Mode_t mode) -{ - PERL_UNUSED_ARG(path); - PERL_UNUSED_ARG(mode); - Perl_croak(aTHX_ "switching effective uid is not implemented"); - /*NOTREACHED*/ - return -1; -} +# define PERL_EFF_ACCESS(p,f) (emulate_eaccess(aTHX_ (p), (f))) #endif PP(pp_backtick) diff --git a/proto.h b/proto.h index 9ceac44..c5979a4 100644 --- a/proto.h +++ b/proto.h @@ -3633,9 +3633,6 @@ STATIC OP* S_doform(pTHX_ CV *cv, GV *gv, OP *retop) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); -STATIC int S_emulate_eaccess(pTHX_ const char* path, Mode_t mode) - __attribute__nonnull__(pTHX_1); - # if !defined(HAS_MKDIR) || !defined(HAS_RMDIR) STATIC int S_dooneliner(pTHX_ const char *cmd, const char *filename) __attribute__warn_unused_result__