From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10218 invoked by alias); 27 Apr 2011 15:49:56 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29095 Received: (qmail 3772 invoked from network); 27 Apr 2011 15:49:55 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.215.43 as permitted sender) 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= MIME-Version: 1.0 In-Reply-To: References: From: =?UTF-8?B?SsOpcsOpbWllIFJvcXVldA==?= Date: Wed, 27 Apr 2011 17:49:32 +0200 Message-ID: Subject: Re: [PATCH] Compilation fix for AIX (missing consts) To: zsh-workers@zsh.org Cc: Wayne Davison Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2011/4/26 Wayne Davison : > 2011/4/26 J=C3=A9r=C3=A9mie Roquet : >> 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=E2=80=A6 > > 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=E2=80=A6 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. >=C2=A0Since 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? =C2=A0Or just the calls weren't > matching the prototypes? =C2=A0If the former, you may want to look into w= hy > 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, --=20 J=C3=A9r=C3=A9mie