From aa185afb72e48049359348b718a9abf0d07cd3ad Mon Sep 17 00:00:00 2001 From: Dave Mitchell Date: Mon, 16 Jul 2007 15:42:56 +0000 Subject: [PATCH] fourth attempt to silence S_emulate_eaccess compiler warning p4raw-id: //depot/perl@31617 --- embed.fnc | 2 -- embed.h | 8 -------- pp_sys.c | 4 +--- proto.h | 2 -- 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/embed.fnc b/embed.fnc index da96046..efd9242 100644 --- a/embed.fnc +++ b/embed.fnc @@ -1351,9 +1351,7 @@ 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 -# if !defined(PERL_EFF_ACCESS) s |int |emulate_eaccess|NN const char* path|Mode_t mode -# endif # 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 e6accd9..3bf7e69 100644 --- a/embed.h +++ b/embed.h @@ -1349,12 +1349,8 @@ #if defined(PERL_IN_PP_SYS_C) || defined(PERL_DECL_PROT) #ifdef PERL_CORE #define doform S_doform -#endif -# if !defined(PERL_EFF_ACCESS) -#ifdef PERL_CORE #define emulate_eaccess S_emulate_eaccess #endif -# endif # if !defined(HAS_MKDIR) || !defined(HAS_RMDIR) #ifdef PERL_CORE #define dooneliner S_dooneliner @@ -3639,12 +3635,8 @@ #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) -#endif -# if !defined(PERL_EFF_ACCESS) -#ifdef PERL_CORE #define emulate_eaccess(a,b) S_emulate_eaccess(aTHX_ a,b) #endif -# endif # if !defined(HAS_MKDIR) || !defined(HAS_RMDIR) #ifdef PERL_CORE #define dooneliner(a,b) S_dooneliner(aTHX_ a,b) diff --git a/pp_sys.c b/pp_sys.c index deed9ff..8193f3c 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -298,9 +298,7 @@ S_emulate_eaccess(pTHX_ const char* path, Mode_t mode) return res; } # define PERL_EFF_ACCESS(p,f) (emulate_eaccess((p), (f))) -#endif - -#if !defined(PERL_EFF_ACCESS) +#else /* With it or without it: anyway you get a warning: either that it is unused, or it is declared static and never defined. */ diff --git a/proto.h b/proto.h index 8d71dae..2545b51 100644 --- a/proto.h +++ b/proto.h @@ -3641,11 +3641,9 @@ STATIC OP* S_doform(pTHX_ CV *cv, GV *gv, OP *retop) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); -# if !defined(PERL_EFF_ACCESS) STATIC int S_emulate_eaccess(pTHX_ const char* path, Mode_t mode) __attribute__nonnull__(pTHX_1); -# endif # if !defined(HAS_MKDIR) || !defined(HAS_RMDIR) STATIC int S_dooneliner(pTHX_ const char *cmd, const char *filename) __attribute__warn_unused_result__ -- 2.7.4