zsh-workers
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.org>
To: "Zsh Hackers' List" <zsh-workers@sunsite.dk>
Subject: Re: zsh-4.3.4-dev-2.tar.gz
Date: Wed, 21 Nov 2007 10:40:37 +0100	[thread overview]
Message-ID: <20071121094036.GH1499@prunille.vinc17.org> (raw)
In-Reply-To: <20071120154246.30388170@news01>

On 2007-11-20 15:42:46 +0000, Peter Stephenson wrote:
> +#ifdef ZSH_IGNORE_NCURSES
> +# ifdef HAVE_CURSES_H
> +#  include <curses.h>
> +# endif
> +#else
> +# ifdef HAVE_NCURSESW_NCURSES_H
> +#  include <ncursesw/ncurses.h>
> +# else
> +#  ifdef HAVE_NCURSES_H
> +#   include <ncurses.h>
> +#  else
> +#   ifdef HAVE_NCURSES_NCURSES_H
> +#    include <ncurses/ncurses.h>
> +#   else
> +#    ifdef HAVE_CURSES_H
> +#     include <curses.h>
> +#    endif
> +#   endif
> +#  endif
> +# endif
>  #endif

Shouldn't HAVE_NCURSES_NCURSES_H and HAVE_NCURSES_H be reversed,
in case both are defined? Indeed I assume that <ncurses/ncurses.h>
should have the precedence over <ncurses.h> since the former is
the canonical place, isn't it?

FYI, on my Mac OS X machine:

prunille:~> locate ncurses.h
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/ncurses.h
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/ncurses.h
/opt/local/include/ncurses/ncurses.h
/opt/local/include/ncursesw/ncurses.h
/opt/local/var/macports/software/ncurses/5.6_0+darwin_8/opt/local/include/ncurses/ncurses.h
/opt/local/var/macports/software/ncursesw/5.6_0+darwin_8/opt/local/include/ncursesw/ncurses.h
/usr/include/ncurses.h

prunille:~> locate libncurses.dylib
/Applications/Gimp.app/Contents/Resources/lib/libncurses.dylib
/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/libncurses.dylib
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libncurses.dylib
/opt/local/lib/libncurses.dylib
/opt/local/var/macports/software/ncurses/5.6_0+darwin_8/opt/local/lib/libncurses.dylib
/usr/lib/libncurses.dylib

So, if libncursesw isn't installed, zsh will currently be built
using /usr/include/ncurses.h (the old Mac OS X header file) and
/opt/local/lib/libncurses.dylib (the new ncurses library installed
via MacPorts). If the ncurses ABI has changed, this can lead to
a broken zsh binary.

BTW, since

  gr -r 'include.*curses' .

on zsh 4.3.4 only gives #include <curses.h> lines, I suppose that my
current zsh 4.3.4 version has been built using /usr/include/curses.h,
but it is linked with /opt/local/lib/libncurses.5.dylib:

prunille:~> otool -L =zsh
/opt/local/bin/zsh:
        /opt/local/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.10)
        /opt/local/lib/libncurses.5.dylib (compatibility version 5.0.0, current version 5.0.0)

I wonder if this can explain the crashes I get.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


  parent reply	other threads:[~2007-11-21  9:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <11649.1195558694@csr.com>
     [not found] ` <4742E805.5030402@math.technion.ac.il>
2007-11-20 14:08   ` zsh-4.3.4-dev-2.tar.gz Peter Stephenson
     [not found] ` <4742DC87.5030901@math.technion.ac.il>
2007-11-20 14:14   ` zsh-4.3.4-dev-2.tar.gz Peter Stephenson
2007-11-20 15:03     ` zsh-4.3.4-dev-2.tar.gz Zvi Har'El
2007-11-20 15:11       ` zsh-4.3.4-dev-2.tar.gz Zvi Har'El
2007-11-20 15:42       ` zsh-4.3.4-dev-2.tar.gz Peter Stephenson
2007-11-20 15:59         ` zsh-4.3.4-dev-2.tar.gz Peter Stephenson
2007-11-21  9:40         ` Vincent Lefevre [this message]
2007-11-21  9:49           ` zsh-4.3.4-dev-2.tar.gz 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=20071121094036.GH1499@prunille.vinc17.org \
    --to=vincent@vinc17.org \
    --cc=zsh-workers@sunsite.dk \
    /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).