John E. Malmberg wrote:
Craig A. Berry wrote:

At 5:48 PM -0400 7/24/05, John E. Malmberg wrote:


              if (UNLINK(s))
....................^
%CC-W-NOTCONSTQUAL, In this statement, the


And this should take care of it. Accidentally left out of my patch of


I would strongly recommend the patch that I posted before I received this.

I accidentally left off the "-u" from GNU diff, these have the patches in unified diff format.

Also is what I think is the fix to mg.c to resolve where it may be attempting to modify read-only memory.

Next on the list that pp_ctl.c is is trying to pass a string constant to tounixpath() and tounixname() to be converted to a UNIX name.

From the code optimization issue, it is better if I can just add a const qualifier to the routines in VMS.C. I can try putting such a qualifier in the header files and VMS.C and see what shakes out when VMS.C gets compiled.

Has VMS.C changed any from Perl 5.8.7?

-John
[EMAIL PROTECTED]
Personal Opinion Only

--- embed.fnc_blead     Sun Jul 24 18:43:53 2005
+++ embed.fnc   Sun Jul 24 18:19:41 2005
@@ -832,7 +832,7 @@
 Apd    |UV     |to_utf8_title  |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
 Apd    |UV     |to_utf8_fold   |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
 #if defined(UNLINK_ALL_VERSIONS)
-Ap     |I32    |unlnk          |NN char* f
+Ap     |I32    |unlnk          |NN const char* f
 #endif
 Apd    |I32    |unpack_str     |NN const char *pat|NN const char *patend|NN 
const char *s \
                                |NULLOK const char *strbeg|NN const char 
*strend|NULLOK char **new_s \
--- mg.c_blead  Sun Jul 24 19:40:43 2005
+++ mg.c        Sun Jul 24 19:40:29 2005
@@ -1045,10 +1045,13 @@
        MgTAINTEDDIR_off(mg);
 #ifdef VMS
        if (s && klen == 8 && strEQ(ptr, "DCL$PATH")) {
-           char pathbuf[256], eltbuf[256], *cp, *elt = s;
+           char pathbuf[256], eltbuf[256], *cp, *elt;
            Stat_t sbuf;
            int i = 0, j = 0;
 
+           strncpy(eltbuf, s, 255);
+           eltbuf[255] = 0;
+           elt = eltbuf;
            do {          /* DCL$PATH may be a search list */
                while (1) {   /* as may dev portion of any element */
                    if ( ((cp = strchr(elt,'[')) || (cp = strchr(elt,'<'))) ) {
--- perl.h_blead        Sun Jul 24 18:45:57 2005
+++ perl.h      Sun Jul 24 17:58:03 2005
@@ -3469,7 +3469,7 @@
 
 #ifdef UNLINK_ALL_VERSIONS /* Currently only makes sense for VMS */
 #define UNLINK unlnk
-I32 unlnk (char*);
+I32 unlnk (const char*);
 #else
 #define UNLINK PerlLIO_unlink
 #endif
--- util.c_blead        Sun Jul 24 18:47:36 2005
+++ util.c      Sun Jul 24 17:57:56 2005
@@ -1563,7 +1563,7 @@
 
 #ifdef UNLINK_ALL_VERSIONS
 I32
-Perl_unlnk(pTHX_ char *f)      /* unlink all versions of a file */
+Perl_unlnk(pTHX_ const char *f)        /* unlink all versions of a file */
 {
     I32 i;
 

Reply via email to