This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fourth attempt to silence S_emulate_eaccess compiler warning
authorDave Mitchell <davem@fdisolutions.com>
Mon, 16 Jul 2007 15:42:56 +0000 (15:42 +0000)
committerDave Mitchell <davem@fdisolutions.com>
Mon, 16 Jul 2007 15:42:56 +0000 (15:42 +0000)
p4raw-id: //depot/perl@31617

embed.fnc
embed.h
pp_sys.c
proto.h

index da96046..efd9242 100644 (file)
--- 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 (file)
--- a/embed.h
+++ b/embed.h
 #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
 #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)
index deed9ff..8193f3c 100644 (file)
--- 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 (file)
--- 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__