zsh-workers
 help / color / mirror / code / Atom feed
From: "Jérémie Roquet" <arkanosis@gmail.com>
To: zsh-workers@zsh.org
Cc: Wayne Davison <wayned@users.sourceforge.net>
Subject: Re: [PATCH] Compilation fix for AIX (missing consts)
Date: Wed, 27 Apr 2011 17:49:32 +0200	[thread overview]
Message-ID: <BANLkTi==gKWtBVbiWkQN=XgDUFoD7-OFCg@mail.gmail.com> (raw)
In-Reply-To: <BANLkTi=UQX0XKbUdhkiO_3-RYtSWPnvkkg@mail.gmail.com>

2011/4/26 Wayne Davison <wayned@users.sourceforge.net>:
> 2011/4/26 Jérémie Roquet <arkanosis@gmail.com>:
>> 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


  reply	other threads:[~2011-04-27 15:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-26 13:33 Jérémie Roquet
2011-04-26 19:16 ` Wayne Davison
2011-04-27 15:49   ` Jérémie Roquet [this message]
2011-04-27 18:54     ` Wayne Davison
2011-05-03 12:23       ` Jérémie Roquet
2011-05-06 13:51         ` Peter Stephenson
2011-05-06 14:16           ` Peter Stephenson
2011-05-09  9:54           ` Peter Stephenson
2011-05-09 10:33             ` Peter Stephenson
2011-05-03 10:23 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTi==gKWtBVbiWkQN=XgDUFoD7-OFCg@mail.gmail.com' \
    --to=arkanosis@gmail.com \
    --cc=wayned@users.sourceforge.net \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).