fifth attempt to silence S_emulate_eaccess compiler warning
authorDave Mitchell <davem@fdisolutions.com>
Mon, 24 Sep 2007 00:42:07 +0000 (00:42 +0000)
committerDave Mitchell <davem@fdisolutions.com>
Mon, 24 Sep 2007 00:42:07 +0000 (00:42 +0000)
p4raw-id: //depot/perl@31947

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

index 1048331..bd86a1f 100644 (file)
--- 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 (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
-#define emulate_eaccess                S_emulate_eaccess
 #endif
 #  if !defined(HAS_MKDIR) || !defined(HAS_RMDIR)
 #ifdef PERL_CORE
 #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
index b79031c..7d0bb2d 100644 (file)
--- 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 (file)
--- 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__