[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
[PATCH - 5.10.x] Revert const'ing in cygwin.c
Blead Change 32681 (make miniperl -Wwrite-strings clean)
resulted in some build warnings being generated by cygwin.c.
In response, I submitted blead Change 32689 (const'ing in
cygwin.c) to correct these.
Change 33119 to 5.10.x integrates blead Change 32689.
However, since blead Change 32681 cannot be integrated into
5.10.x, cygwin.c is now producing the following build
warnings:
cygwin.c: In function `do_spawn':
cygwin.c:125: warning: assignment from incompatible pointer type
cygwin.c:127: warning: assignment from incompatible pointer type
To correct this, the portion of 5.10.x Change 33119 related
to blead Change 32689 needs to be reverted. The attached
patch does this.
--- perl/cygwin/cygwin.c
+++ perl/cygwin/cygwin.c
@@ -83,8 +83,7 @@
do_spawn (char *cmd)
{
dTHX;
- char const **a;
- char *s,*metachars = "$&*(){}[]'\";\\?>|<~`\n";
+ char **a,*s,*metachars = "$&*(){}[]'\";\\?>|<~`\n";
const char *command[4];
while (*cmd && isSPACE(*cmd))
@@ -122,7 +121,7 @@
return do_spawnvp("sh",command);
}
- Newx (PL_Argv,(s-cmd)/2+2,const char*);
+ Newx (PL_Argv,(s-cmd)/2+2,char*);
PL_Cmd=savepvn (cmd,s-cmd);
a=PL_Argv;
for (s=PL_Cmd; *s;) {
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]