Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh-4.3.4-dev-2.tar.gz

On 2007-11-20 15:42:46 +0000, Peter Stephenson wrote:
> +# ifdef HAVE_CURSES_H
> +#  include <curses.h>
> +# endif
> +#else
> +#  include <ncursesw/ncurses.h>
> +# else
> +#  ifdef HAVE_NCURSES_H
> +#   include <ncurses.h>
> +#  else
> +#    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

prunille:~> locate 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/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@xxxxxxxxxx> - 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)

Messages sorted by: Reverse Date, Date, Thread, Author