Change 11067 by gsar@moonru on 2001/07/02 08:03:55

        rename s/sv_getcwd/getcwd_sv/ for better conformance to existing
        naming discipline
        
        win32 fix: enable getcwd_sv() to work on windows (POSIX.t was failing
        because of this)
        
        fix a warning about "fd" being used without being set in Cwd.xs

Affected files ...

... //depot/perl/embed.h#269 edit
... //depot/perl/embed.pl#253 edit
... //depot/perl/ext/Cwd/Cwd.xs#17 edit
... //depot/perl/ext/POSIX/POSIX.t#5 edit
... //depot/perl/ext/POSIX/POSIX.xs#91 edit
... //depot/perl/global.sym#172 edit
... //depot/perl/objXSUB.h#175 edit
... //depot/perl/perlapi.c#116 edit
... //depot/perl/pod/perlapi.pod#84 edit
... //depot/perl/proto.h#315 edit
... //depot/perl/util.c#284 edit
... //depot/perl/win32/config.bc#112 edit
... //depot/perl/win32/config.gc#113 edit
... //depot/perl/win32/config.vc#117 edit

Differences ...

==== //depot/perl/embed.h#269 (text+w) ====
Index: perl/embed.h
--- perl/embed.h.~1~    Mon Jul  2 02:15:05 2001
+++ perl/embed.h        Mon Jul  2 02:15:05 2001
@@ -671,7 +671,7 @@
 #define sv_collxfrm            Perl_sv_collxfrm
 #endif
 #define sv_compile_2op         Perl_sv_compile_2op
-#define sv_getcwd              Perl_sv_getcwd
+#define getcwd_sv              Perl_getcwd_sv
 #define sv_dec                 Perl_sv_dec
 #define sv_dump                        Perl_sv_dump
 #define sv_derived_from                Perl_sv_derived_from
@@ -2178,7 +2178,7 @@
 #define sv_collxfrm(a,b)       Perl_sv_collxfrm(aTHX_ a,b)
 #endif
 #define sv_compile_2op(a,b,c,d)        Perl_sv_compile_2op(aTHX_ a,b,c,d)
-#define sv_getcwd(a)           Perl_sv_getcwd(aTHX_ a)
+#define getcwd_sv(a)           Perl_getcwd_sv(aTHX_ a)
 #define sv_dec(a)              Perl_sv_dec(aTHX_ a)
 #define sv_dump(a)             Perl_sv_dump(aTHX_ a)
 #define sv_derived_from(a,b)   Perl_sv_derived_from(aTHX_ a,b)
@@ -4279,8 +4279,8 @@
 #endif
 #define Perl_sv_compile_2op    CPerlObj::Perl_sv_compile_2op
 #define sv_compile_2op         Perl_sv_compile_2op
-#define Perl_sv_getcwd         CPerlObj::Perl_sv_getcwd
-#define sv_getcwd              Perl_sv_getcwd
+#define Perl_getcwd_sv         CPerlObj::Perl_getcwd_sv
+#define getcwd_sv              Perl_getcwd_sv
 #define Perl_sv_dec            CPerlObj::Perl_sv_dec
 #define sv_dec                 Perl_sv_dec
 #define Perl_sv_dump           CPerlObj::Perl_sv_dump

==== //depot/perl/embed.pl#253 (xtext) ====
Index: perl/embed.pl
--- perl/embed.pl.~1~   Mon Jul  2 02:15:05 2001
+++ perl/embed.pl       Mon Jul  2 02:15:05 2001
@@ -2031,7 +2031,7 @@
 Apd    |char*  |sv_collxfrm    |SV* sv|STRLEN* nxp
 #endif
 Ap     |OP*    |sv_compile_2op |SV* sv|OP** startp|char* code|AV** avp
-Apd    |int    |sv_getcwd      |SV* sv
+Apd    |int    |getcwd_sv      |SV* sv
 Apd    |void   |sv_dec         |SV* sv
 Ap     |void   |sv_dump        |SV* sv
 Apd    |bool   |sv_derived_from|SV* sv|const char* name

==== //depot/perl/ext/Cwd/Cwd.xs#17 (text) ====
Index: perl/ext/Cwd/Cwd.xs
--- perl/ext/Cwd/Cwd.xs.~1~     Mon Jul  2 02:15:05 2001
+++ perl/ext/Cwd/Cwd.xs Mon Jul  2 02:15:05 2001
@@ -194,7 +194,11 @@
 #else
        (void)chdir(wd);
 #endif
-err2:  (void)close(fd);
+
+err2:
+#ifdef HAS_FCHDIR
+       (void)close(fd);
+#endif
        errno = serrno;
        return (NULL);
 #endif
@@ -209,7 +213,7 @@
 PPCODE:
 {
     dXSTARG;
-    sv_getcwd(TARG);
+    getcwd_sv(TARG);
     XSprePUSH; PUSHTARG;
 }
 

==== //depot/perl/ext/POSIX/POSIX.t#5 (xtext) ====
Index: perl/ext/POSIX/POSIX.t
--- perl/ext/POSIX/POSIX.t.~1~  Mon Jul  2 02:15:05 2001
+++ perl/ext/POSIX/POSIX.t      Mon Jul  2 02:15:05 2001
@@ -79,7 +79,7 @@
     print &_POSIX_OPEN_MAX > $fds[1] ? "ok 12\n" : "not ok 12\n"
 }
 
-print getcwd() =~ m#/t$# ? "ok 13\n" : "not ok 13\n";
+print getcwd() =~ m#[/\\]t$# ? "ok 13\n" : "not ok 13\n";
 
 # Check string conversion functions.
 

==== //depot/perl/ext/POSIX/POSIX.xs#91 (text) ====
Index: perl/ext/POSIX/POSIX.xs
--- perl/ext/POSIX/POSIX.xs.~1~ Mon Jul  2 02:15:05 2001
+++ perl/ext/POSIX/POSIX.xs     Mon Jul  2 02:15:05 2001
@@ -1751,7 +1751,7 @@
     PPCODE:
       {
        dXSTARG;
-       sv_getcwd(TARG);
+       getcwd_sv(TARG);
        XSprePUSH; PUSHTARG;
       }
 

==== //depot/perl/global.sym#172 (text+w) ====
Index: perl/global.sym
--- perl/global.sym.~1~ Mon Jul  2 02:15:05 2001
+++ perl/global.sym     Mon Jul  2 02:15:05 2001
@@ -413,7 +413,7 @@
 Perl_sv_cmp_locale
 Perl_sv_collxfrm
 Perl_sv_compile_2op
-Perl_sv_getcwd
+Perl_getcwd_sv
 Perl_sv_dec
 Perl_sv_dump
 Perl_sv_derived_from

==== //depot/perl/objXSUB.h#175 (text+w) ====
Index: perl/objXSUB.h
--- perl/objXSUB.h.~1~  Mon Jul  2 02:15:05 2001
+++ perl/objXSUB.h      Mon Jul  2 02:15:05 2001
@@ -1657,10 +1657,10 @@
 #define Perl_sv_compile_2op    pPerl->Perl_sv_compile_2op
 #undef  sv_compile_2op
 #define sv_compile_2op         Perl_sv_compile_2op
-#undef  Perl_sv_getcwd
-#define Perl_sv_getcwd         pPerl->Perl_sv_getcwd
-#undef  sv_getcwd
-#define sv_getcwd              Perl_sv_getcwd
+#undef  Perl_getcwd_sv
+#define Perl_getcwd_sv         pPerl->Perl_getcwd_sv
+#undef  getcwd_sv
+#define getcwd_sv              Perl_getcwd_sv
 #undef  Perl_sv_dec
 #define Perl_sv_dec            pPerl->Perl_sv_dec
 #undef  sv_dec

==== //depot/perl/perlapi.c#116 (text+w) ====
Index: perl/perlapi.c
--- perl/perlapi.c.~1~  Mon Jul  2 02:15:05 2001
+++ perl/perlapi.c      Mon Jul  2 02:15:05 2001
@@ -3002,11 +3002,11 @@
     return ((CPerlObj*)pPerl)->Perl_sv_compile_2op(sv, startp, code, avp);
 }
 
-#undef  Perl_sv_getcwd
+#undef  Perl_getcwd_sv
 int
-Perl_sv_getcwd(pTHXo_ SV* sv)
+Perl_getcwd_sv(pTHXo_ SV* sv)
 {
-    return ((CPerlObj*)pPerl)->Perl_sv_getcwd(sv);
+    return ((CPerlObj*)pPerl)->Perl_getcwd_sv(sv);
 }
 
 #undef  Perl_sv_dec

==== //depot/perl/pod/perlapi.pod#84 (text+w) ====
Index: perl/pod/perlapi.pod
--- perl/pod/perlapi.pod.~1~    Mon Jul  2 02:15:05 2001
+++ perl/pod/perlapi.pod        Mon Jul  2 02:15:05 2001
@@ -475,6 +475,15 @@
 =for hackers
 Found in file scope.h
 
+=item getcwd_sv
+
+Fill the sv with current working directory
+
+       int     getcwd_sv(SV* sv)
+
+=for hackers
+Found in file util.c
+
 =item get_av
 
 Returns the AV of the specified Perl array.  If C<create> is set and the
@@ -2225,22 +2234,22 @@
 =for hackers
 Found in file sv.h
 
-=item SvNVX
+=item SvNVx
 
-Returns the raw value in the SV's NV slot, without checks or conversions.
-Only use when you are sure SvNOK is true. See also C<SvNV()>.
+Coerces the given SV to a double and returns it. Guarantees to evaluate
+sv only once. Use the more efficent C<SvNV> otherwise.
 
-       NV      SvNVX(SV* sv)
+       NV      SvNVx(SV* sv)
 
 =for hackers
 Found in file sv.h
 
-=item SvNVx
+=item SvNVX
 
-Coerces the given SV to a double and returns it. Guarantees to evaluate
-sv only once. Use the more efficent C<SvNV> otherwise.
+Returns the raw value in the SV's NV slot, without checks or conversions.
+Only use when you are sure SvNOK is true. See also C<SvNV()>.
 
-       NV      SvNVx(SV* sv)
+       NV      SvNVX(SV* sv)
 
 =for hackers
 Found in file sv.h
@@ -2434,21 +2443,21 @@
 =for hackers
 Found in file sv.h
 
-=item SvPVx
+=item SvPVX
 
-A version of C<SvPV> which guarantees to evaluate sv only once.
+Returns a pointer to the physical string in the SV.  The SV must contain a
+string.
 
-       char*   SvPVx(SV* sv, STRLEN len)
+       char*   SvPVX(SV* sv)
 
 =for hackers
 Found in file sv.h
 
-=item SvPVX
+=item SvPVx
 
-Returns a pointer to the physical string in the SV.  The SV must contain a
-string.
+A version of C<SvPV> which guarantees to evaluate sv only once.
 
-       char*   SvPVX(SV* sv)
+       char*   SvPVx(SV* sv, STRLEN len)
 
 =for hackers
 Found in file sv.h
@@ -2655,19 +2664,19 @@
 =for hackers
 Found in file sv.h
 
-=item SvTYPE
+=item svtype
 
-Returns the type of the SV.  See C<svtype>.
+An enum of flags for Perl types.  These are found in the file B<sv.h> 
+in the C<svtype> enum.  Test these flags with the C<SvTYPE> macro.
 
-       svtype  SvTYPE(SV* sv)
-
 =for hackers
 Found in file sv.h
 
-=item svtype
+=item SvTYPE
+
+Returns the type of the SV.  See C<svtype>.
 
-An enum of flags for Perl types.  These are found in the file B<sv.h> 
-in the C<svtype> enum.  Test these flags with the C<SvTYPE> macro.
+       svtype  SvTYPE(SV* sv)
 
 =for hackers
 Found in file sv.h
@@ -2778,22 +2787,22 @@
 =for hackers
 Found in file sv.h
 
-=item SvUVx
+=item SvUVX
 
-Coerces the given SV to an unsigned integer and returns it. Guarantees to
-evaluate sv only once. Use the more efficent C<SvUV> otherwise.
+Returns the raw value in the SV's UV slot, without checks or conversions.
+Only use when you are sure SvIOK is true. See also C<SvUV()>.
 
-       UV      SvUVx(SV* sv)
+       UV      SvUVX(SV* sv)
 
 =for hackers
 Found in file sv.h
 
-=item SvUVX
+=item SvUVx
 
-Returns the raw value in the SV's UV slot, without checks or conversions.
-Only use when you are sure SvIOK is true. See also C<SvUV()>.
+Coerces the given SV to an unsigned integer and returns it. Guarantees to
+evaluate sv only once. Use the more efficent C<SvUV> otherwise.
 
-       UV      SvUVX(SV* sv)
+       UV      SvUVx(SV* sv)
 
 =for hackers
 Found in file sv.h
@@ -3205,15 +3214,6 @@
 =for hackers
 Found in file sv.c
 
-=item sv_getcwd
-
-Fill the sv with current working directory
-
-       int     sv_getcwd(SV* sv)
-
-=for hackers
-Found in file util.c
-
 =item sv_gets
 
 Get a line from the filehandle and store it into the SV, optionally

==== //depot/perl/proto.h#315 (text+w) ====
Index: perl/proto.h
--- perl/proto.h.~1~    Mon Jul  2 02:15:05 2001
+++ perl/proto.h        Mon Jul  2 02:15:05 2001
@@ -755,7 +755,7 @@
 PERL_CALLCONV char*    Perl_sv_collxfrm(pTHX_ SV* sv, STRLEN* nxp);
 #endif
 PERL_CALLCONV OP*      Perl_sv_compile_2op(pTHX_ SV* sv, OP** startp, char* code, 
AV** avp);
-PERL_CALLCONV int      Perl_sv_getcwd(pTHX_ SV* sv);
+PERL_CALLCONV int      Perl_getcwd_sv(pTHX_ SV* sv);
 PERL_CALLCONV void     Perl_sv_dec(pTHX_ SV* sv);
 PERL_CALLCONV void     Perl_sv_dump(pTHX_ SV* sv);
 PERL_CALLCONV bool     Perl_sv_derived_from(pTHX_ SV* sv, const char* name);

==== //depot/perl/util.c#284 (text) ====
Index: perl/util.c
--- perl/util.c.~1~     Mon Jul  2 02:15:05 2001
+++ perl/util.c Mon Jul  2 02:15:05 2001
@@ -3614,7 +3614,7 @@
         (dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
 
 /*
-=for apidoc sv_getcwd
+=for apidoc getcwd_sv
 
 Fill the sv with current working directory
 
@@ -3630,7 +3630,7 @@
  *     back into. */
 
 int
-Perl_sv_getcwd(pTHX_ register SV *sv)
+Perl_getcwd_sv(pTHX_ register SV *sv)
 {
 #ifndef PERL_MICRO
 

==== //depot/perl/win32/config.bc#112 (text) ====
Index: perl/win32/config.bc
--- perl/win32/config.bc.~1~    Mon Jul  2 02:15:05 2001
+++ perl/win32/config.bc        Mon Jul  2 02:15:05 2001
@@ -153,7 +153,7 @@
 d_fsync='undef'
 d_ftello='undef'
 d_ftime='define'
-d_getcwd='undef'
+d_getcwd='define'
 d_getespwnam='undef'
 d_getfsstat='undef'
 d_getgrent='undef'

==== //depot/perl/win32/config.gc#113 (text) ====
Index: perl/win32/config.gc
--- perl/win32/config.gc.~1~    Mon Jul  2 02:15:05 2001
+++ perl/win32/config.gc        Mon Jul  2 02:15:05 2001
@@ -153,7 +153,7 @@
 d_fsync='undef'
 d_ftello='undef'
 d_ftime='define'
-d_getcwd='undef'
+d_getcwd='define'
 d_getespwnam='undef'
 d_getfsstat='undef'
 d_getgrent='undef'

==== //depot/perl/win32/config.vc#117 (text) ====
Index: perl/win32/config.vc
--- perl/win32/config.vc.~1~    Mon Jul  2 02:15:05 2001
+++ perl/win32/config.vc        Mon Jul  2 02:15:05 2001
@@ -153,7 +153,7 @@
 d_fsync='undef'
 d_ftello='undef'
 d_ftime='define'
-d_getcwd='undef'
+d_getcwd='define'
 d_getespwnam='undef'
 d_getfsstat='undef'
 d_getgrent='undef'
End of Patch.

Reply via email to