The gcc attribute "deprecated" seems to have been available since gcc 3.1
[p5sagit/p5-mst-13.2.git] / doio.c
diff --git a/doio.c b/doio.c
index 5064705..0917018 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -9,10 +9,12 @@
  */
 
 /*
- * "Far below them they saw the white waters pour into a foaming bowl, and
- * then swirl darkly about a deep oval basin in the rocks, until they found
- * their way out again through a narrow gate, and flowed away, fuming and
- * chattering, into calmer and more level reaches."
+ *  Far below them they saw the white waters pour into a foaming bowl, and
+ *  then swirl darkly about a deep oval basin in the rocks, until they found
+ *  their way out again through a narrow gate, and flowed away, fuming and
+ *  chattering, into calmer and more level reaches.
+ *
+ *     [p.684 of _The Lord of the Rings_, IV/vi: "The Forbidden Pool"]
  */
 
 /* This file contains functions that do the actual I/O on behalf of ops.
@@ -906,7 +908,7 @@ Perl_nextargv(pTHX_ register GV *gv)
        if (io && (IoFLAGS(io) & IOf_ARGV)
            && PL_argvout_stack && AvFILLp(PL_argvout_stack) >= 0)
        {
-           GV * const oldout = (GV*)av_pop(PL_argvout_stack);
+           GV * const oldout = MUTABLE_GV(av_pop(PL_argvout_stack));
            setdefout(oldout);
            SvREFCNT_dec(oldout);
            return NULL;
@@ -1308,11 +1310,11 @@ Perl_my_stat(pTHX)
        STRLEN len;
        PUTBACK;
        if (isGV_with_GP(sv)) {
-           gv = (GV*)sv;
+           gv = MUTABLE_GV(sv);
            goto do_fstat;
        }
        else if (SvROK(sv) && isGV_with_GP(SvRV(sv))) {
-           gv = (GV*)SvRV(sv);
+           gv = MUTABLE_GV(SvRV(sv));
            goto do_fstat;
        }
         else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) {
@@ -1365,7 +1367,7 @@ Perl_my_lstat(pTHX)
     PUTBACK;
     if (SvROK(sv) && isGV_with_GP(SvRV(sv)) && ckWARN(WARN_IO)) {
        Perl_warner(aTHX_ packWARN(WARN_IO), "Use of -l on filehandle %s",
-               GvENAME((GV*) SvRV(sv)));
+               GvENAME((const GV *)SvRV(sv)));
        return (PL_laststatval = -1);
     }
     file = SvPV_nolen_const(sv);
@@ -1625,7 +1627,7 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp)
            while (++mark <= sp) {
                 GV* gv;
                 if (isGV_with_GP(*mark)) {
-                    gv = (GV*)*mark;
+                    gv = MUTABLE_GV(*mark);
                do_fchmod:
                    if (GvIO(gv) && IoIFP(GvIOp(gv))) {
 #ifdef HAS_FCHMOD
@@ -1641,7 +1643,7 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp)
                    }
                }
                else if (SvROK(*mark) && isGV_with_GP(SvRV(*mark))) {
-                   gv = (GV*)SvRV(*mark);
+                   gv = MUTABLE_GV(SvRV(*mark));
                    goto do_fchmod;
                }
                else {
@@ -1665,7 +1667,7 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp)
            while (++mark <= sp) {
                 GV* gv;
                 if (isGV_with_GP(*mark)) {
-                    gv = (GV*)*mark;
+                    gv = MUTABLE_GV(*mark);
                do_fchown:
                    if (GvIO(gv) && IoIFP(GvIOp(gv))) {
 #ifdef HAS_FCHOWN
@@ -1681,7 +1683,7 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp)
                    }
                }
                else if (SvROK(*mark) && isGV_with_GP(SvRV(*mark))) {
-                   gv = (GV*)SvRV(*mark);
+                   gv = MUTABLE_GV(SvRV(*mark));
                    goto do_fchown;
                }
                else {
@@ -1837,7 +1839,7 @@ nothing in the core.
            while (++mark <= sp) {
                 GV* gv;
                 if (isGV_with_GP(*mark)) {
-                    gv = (GV*)*mark;
+                    gv = MUTABLE_GV(*mark);
                do_futimes:
                    if (GvIO(gv) && IoIFP(GvIOp(gv))) {
 #ifdef HAS_FUTIMES
@@ -1854,7 +1856,7 @@ nothing in the core.
                    }
                }
                else if (SvROK(*mark) && isGV_with_GP(SvRV(*mark))) {
-                   gv = (GV*)SvRV(*mark);
+                   gv = MUTABLE_GV(SvRV(*mark));
                    goto do_futimes;
                }
                else {
@@ -1941,8 +1943,8 @@ Perl_cando(pTHX_ Mode_t mode, bool effective, register const Stat_t *statbufp)
 }
 #endif /* ! VMS */
 
-bool
-Perl_ingroup(pTHX_ Gid_t testgid, bool effective)
+static bool
+S_ingroup(pTHX_ Gid_t testgid, bool effective)
 {
 #ifdef MACOS_TRADITIONAL
     /* This is simply not correct for AppleShare, but fix it yerself. */