[Pkg-zsh-devel] Bug#776964: Headers installed by zsh-dev packages miss critical pieces

ZyX kp-pav at yandex.ru
Tue Feb 3 16:19:12 UTC 2015


Package: zsh-dev
Version: 5.0.7-5
Severity: important
X-Debbugs-CC: abe at debian.org

To use zsh headers in some module at least `config.h` file is needed in addition to those already present in the package. `config.h` files contains defines guessed by ./configure script and including it prior to `zsh.h` is the only sane variant to include `zsh.h` (insane variant is using module’s own configure script which will create those defines). Without `config.h` including `zsh.h` will fail due to missing defines, and even if it was not failing it would make #include <zsh.h> do the wrong thing because of the bits like

    #ifdef ZSH_64_BIT_TYPE
    typedef ZSH_64_BIT_TYPE zlong;
    #ifdef ZSH_64_BIT_UTYPE
    typedef ZSH_64_BIT_UTYPE zulong;
    #else
    typedef unsigned zlong zulong;
    #endif
    #else
    typedef long zlong;
    typedef unsigned long zulong;
    #endif

(configure.h-driven definition of zlong and zulong which has the potential of breaking ABI compatibility in some cases).

In addition to this file it is good to have a patched `zsh.mdh` file which glues together all zsh includes and is a single entry point. Patch needed to include this file in the distribution may be performed with the following script:

	for file in Src/{zsh.mdh,*.h} ; do
		sed -i 's@\.\./config\.h at config.h@' "$file"
		sed -i 's@#\(\s*\)include "\([^"]\+\)"@#\1include <zsh/\2>@' "$file"
	done

. I am doing this in a Gentoo ebuild and the result works just fine.



More information about the Pkg-zsh-devel mailing list