Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Compilation fix for AIX (missing consts)
- X-seq: zsh-workers 29095
- From: Jérémie Roquet <arkanosis@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] Compilation fix for AIX (missing consts)
- Date: Wed, 27 Apr 2011 17:49:32 +0200
- Cc: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=I2Lz9PYTooTvKmK9Lhj5NkeOH4CbhM2v302r2ll3S68=; b=IG8DYLGHhWkik8MeVcOK531swwFsDcTbvlcoakqCFNnwcWLD8AzG8DOnbYEutZwXGK eUpcaoujitK4QNw6GfLmkL73jfscg6Sw2tLJ2aA6kVGId7tndomHwZQebSBSDp+074kS XpiLUZtxzstU4vv7Dj94qoGOA3DHwIIE4GeZ4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=gDRT47INy3rMxpM6/YISvKoXQkd3n8VJxz+S6OY7vaJmGVwzQ7QbpRmfl94a6CLTKR j/q6QV1Vb+L9IOUhlGQRpsoFoEluukHOMrGi4UKpdUJJTI1A79BHpqXM/i3y1oME0QOi xQRYw1hRT3LzC9U2voJyfpEXAWUOh2q0DqZdY=
- In-reply-to: <BANLkTi=UQX0XKbUdhkiO_3-RYtSWPnvkkg@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <BANLkTi=wtU3LGu3vPbcD_DH5EQd=X9g0tw@mail.gmail.com> <BANLkTi=UQX0XKbUdhkiO_3-RYtSWPnvkkg@mail.gmail.com>
2011/4/26 Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>:
> 2011/4/26 Jérémie Roquet <arkanosis@xxxxxxxxx>:
>> I've had to fix the source to compile zsh on AIX. It looks like the
>> protos were wrong anyway, but gcc doesn't complain on Linux…
>
> Yeah, that section doesn't get included on Linux, since it has the
> prototypes available in the public term.h and termcap.h.
Of course… stupid me :-)
> I (temporarily) commented out the #if/#endif lines and made all the
> changes necessary to get it to compile without error, which also
> required adding a "const" to the 3 "char *id" args that you didn't
> change.
Well, I didn't change them because it doesn't match the protos which
are (copy-paste) :
int tgetent(char *bp, const char *name);
int tgetflag(char *id);
int tgetnum(char *id);
char *tgetstr(char *id, char **area);
char *tgoto(const char *cap, int col, int row);
int tputs(const char *str, int affcnt, int (*putc)(int));
That's from the man for Linux and FreeBSD and from the source for AIX.
> Since that section of the file is only supposed to be used
> when the public prototypes aren't available, that should be better
> than what we had before.
Thanks!
> Does AIX have a conflicting header file? Or just the calls weren't
> matching the prototypes? If the former, you may want to look into why
> the Src/Modules/termcap.c code isn't setting either USES_TERMCAP_H or
> USES_TERM_H for AIX.
Yes, it's conflicting with the available header.
I haven't spent much time checking who includes who, but it seems that
prototypes.h is included by zsh,mdh which also includes config.h
beforehand but neither defines USES_TERMCAP_H nor USES_TERM_H (which
is done, as expected, by termcap.c).
Best regards,
--
Jérémie
Messages sorted by:
Reverse Date,
Date,
Thread,
Author