Zsh Mailing List Archive
Messages sorted by:
Re: 4.1.1 doesn't compile
- X-seq: zsh-workers 18624
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Tomi.Vainio@xxxxxxx
- Subject: Re: 4.1.1 doesn't compile
- Date: Tue, 24 Jun 2003 17:29:08 +0200
- Cc: zsh-workers@xxxxxxxxxx, Stephane CHAZELAS <Stephane_CHAZELAS@xxxxxxxx>
- In-reply-to: <16120.21181.974421.168422@xxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <16120.21181.974421.168422@xxxxxxxxxxxxxxxxxxxxxxxx>
Tomi Vainio - Sun Finland wrote:
> Minor problem compiling latest zsh. 64bit compilation fails but 32bit
> still works.
Thanks for reporting this. I can reproduce it.
> cc -c -I. -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -DMODULE -xO4 -xarch=v9 -KPIC -o terminfo..o terminfo.c
> "terminfo.c", line 110: warning: argument #3 is incompatible with prototype:
> prototype: pointer to function(char) returning int : "/usr/include/term.h", line 1205
> argument : pointer to function(int) returning int
This is only a warning but does anyone know if we could safely use
putp() instead of tputs() to avoid it (prototype for tputs seems to be
subtly different between Solaris and Linux)?
> "terminfo.c", line 113: prototype mismatch: 2 args passed, 10 expected
This is the error. The reason why it fails for 64-bit but not 32-bit
probably has something to do with this section of term.h:
#if defined(_XPG4_2) || defined(_LP64) || defined(__cplusplus)
*tparm(char *, long, long, long, long, long, long, long, long, long);
/* this is wrong, but is needed for historical reasons */
extern char *tparm();
As you can see, Solaris' tparm() prototype wants there to be 9
parameters (10 arguments).
This is the same chunk of code that Stephane Chazelas was complaining
about in 18544. Reading back over that, what Stephane says makes a lot
of sense and the code is clearly badly broken. It only ever passes one
parameter. If you look at the output of `echoti cup 5 10|od -t c', the
second parameter is defaulting to something big.
On the question of how to determine if parameters should be integer or
string, it might work to just treat them all as strings. They are just
converted back to strings for the escape sequence anyway. It'll need a
bit of experimenting.
For the moment, the following quick patch will allow compilation on
Solaris to at least not fail.
--- terminfo.c.bak 2003-06-24 15:17:22.333407000 +0000
+++ terminfo.c 2003-06-24 15:21:52.103550000 +0000
@@ -110,7 +110,7 @@
tputs(t, 1, putraw);
num = (argv) ? atoi(argv) : atoi(*argv);
- tputs(tparm(t, atoi(*argv)), num, putraw);
+ tputs(tparm(t, atoi(*argv), 0, 0, 0, 0, 0, 0, 0, 0), num, putraw);
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
Messages sorted by: