Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 4.2.0-pre-3; HP-UX



Peter wrote:
> 
> But they compile OK?  Error messages?  Might simply be missing library
> functions.

Yes, compiles Ok with no error messages. make check just hangs and
without being able to load the completion library, it doesn't seem
particularly usable. When I get some time, I'll investigate further.

> > This warning comes up a lot for many times in different places:
> > Warning 952: "compctl.c", line 608 # Conversion of 'const char *' to 'char *'
> >     loses 'const'.
> >                         *argv = "" - 1;
> >                         ^^^^^^
> > 
> > What is that code trying to do? Isn't that taking the address of a
> > constant string. Seems dodgy to me.
> 
> Harmless.  We're not strict about `const'.  It would be nice to be,
> but when you start going down that road you find you have to change
> *everything*.  It's a hack so that argv[1] contains a NULL --- not a
> particularly nice one.

The warnings are spewed out for this on Tru64 too. Is there not
something we could change it to so that it is both more readable and
doesn't create warnings. Perhaps using a macro to wrap around any nasty
hacks or by having a single null-string variable. I'm happy to go
through all the instances changing them.

> >                 *DM, *DO, *ED, *EI, *K0, *K1, *K2, *K3, *K4, *K5, *K6,
> > ---------------------^
> 
> It's probably defined somewhere else.  We could rename those arguments.

Line 212 in zsh.h. Patch below renames our DO to DOLOOP which solves
the problem. It then builds and all tests pass (on Tru64 5.1). They
have a Tru64 4.0 machine too so I can also try that. And they have gcc
in /usr/local so that can also be tried.

> Frankly, I'm hanged if I personally am going to go round changing all
> the version numbers again, but I don't mind releasing 4.2.0 and warning
> users of HP-UX and AIX they may want to wait.  Nobody expects versions
> ending in `0' to work anyway.

Sounds like a fair enough plan.

Oliver

Index: Src/hashtable.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/hashtable.c,v
retrieving revision 1.16
diff -u -r1.16 hashtable.c
--- Src/hashtable.c	29 Oct 2003 19:17:30 -0000	1.16
+++ Src/hashtable.c	10 Mar 2004 17:04:45 -0000
@@ -925,7 +925,7 @@
     {NULL, "}", 0, OUTBRACE},
     {NULL, "case", 0, CASE},
     {NULL, "coproc", 0, COPROC},
-    {NULL, "do", 0, DO},
+    {NULL, "do", 0, DOLOOP},
     {NULL, "done", 0, DONE},
     {NULL, "elif", 0, ELIF},
     {NULL, "else", 0, ELSE},
Index: Src/lex.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/lex.c,v
retrieving revision 1.27
diff -u -r1.27 lex.c
--- Src/lex.c	3 Sep 2003 10:15:36 -0000	1.27
+++ Src/lex.c	10 Mar 2004 17:04:45 -0000
@@ -393,7 +393,7 @@
     case BAR:
     case BARAMP:
     case INOUTPAR:
-    case DO:
+    case DOLOOP:
     case THEN:
     case ELIF:
     case ELSE:
Index: Src/parse.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/parse.c,v
retrieving revision 1.41
diff -u -r1.41 parse.c
--- Src/parse.c	29 Oct 2003 19:17:30 -0000	1.41
+++ Src/parse.c	10 Mar 2004 17:04:45 -0000
@@ -978,7 +978,7 @@
     incmdpos = 1;
     while (tok == SEPER)
 	yylex();
-    if (tok == DO) {
+    if (tok == DOLOOP) {
 	yylex();
 	par_save_list(complex);
 	if (tok != DONE)
@@ -1260,7 +1260,7 @@
     incmdpos = 1;
     while (tok == SEPER)
 	yylex();
-    if (tok == DO) {
+    if (tok == DOLOOP) {
 	yylex();
 	par_save_list(complex);
 	if (tok != DONE)
@@ -1304,7 +1304,7 @@
     yylex();
     while (tok == SEPER)
 	yylex();
-    if (tok == DO) {
+    if (tok == DOLOOP) {
 	yylex();
 	par_save_list(complex);
 	if (tok != DONE)
Index: Src/zsh.h
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/zsh.h,v
retrieving revision 1.53
diff -u -r1.53 zsh.h
--- Src/zsh.h	6 Mar 2004 00:23:03 -0000	1.53
+++ Src/zsh.h	10 Mar 2004 17:04:45 -0000
@@ -209,7 +209,7 @@
     OUTBRACE,   /* }         */
     CASE,	/* case      */
     COPROC,	/* coproc    */
-    DO,		/* do        */
+    DOLOOP,	/* do        */
     DONE,	/* done      */ /* 45 */
     ELIF,	/* elif      */
     ELSE,	/* else      */
Index: Src/Zle/zle_tricky.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_tricky.c,v
retrieving revision 1.42
diff -u -r1.42 zle_tricky.c
--- Src/Zle/zle_tricky.c	8 Mar 2004 11:44:14 -0000	1.42
+++ Src/Zle/zle_tricky.c	10 Mar 2004 17:04:45 -0000
@@ -1105,7 +1105,7 @@
 	/* We reached the end. */
 	if (tok == ENDINPUT)
 	    break;
-	if ((ins && (tok == DO || tok == SEPER)) ||
+	if ((ins && (tok == DOLOOP || tok == SEPER)) ||
 	    (ins == 2 && i == 2) || (ins == 3 && i == 3) ||
 	    tok == BAR    || tok == AMPER     ||
 	    tok == BARAMP || tok == AMPERBANG ||



Messages sorted by: Reverse Date, Date, Thread, Author