diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Src/Modules/zftp.c | 2 | ||||
-rw-r--r-- | Src/mkbltnmlst.sh | 24 |
3 files changed, 29 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 51a091aff..6a2801e9b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2023-06-26 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> + * 51889: Src/Modules/zftp.c, Src/mkbltnmlst.sh: enable loading a + module (e.g. zftp) that depends on other modules even if zsh is + built with the full RELRO + * 51884: Doc/Zsh/params.yo, Src/params.c, Src/utils.c, Test/D04parameter.ztst: if MULTIBYTE option is on and IFS contains invalid bytes in curret locale then reset it to default diff --git a/Src/Modules/zftp.c b/Src/Modules/zftp.c index 49b3ffa89..47a5e9de9 100644 --- a/Src/Modules/zftp.c +++ b/Src/Modules/zftp.c @@ -3172,7 +3172,7 @@ static struct features module_features = { int setup_(UNUSED(Module m)) { - return (require_module("zsh/net/tcp", NULL, 0) == 1); + return 0; } /**/ diff --git a/Src/mkbltnmlst.sh b/Src/mkbltnmlst.sh index c4611d8b3..067ecdaf9 100644 --- a/Src/mkbltnmlst.sh +++ b/Src/mkbltnmlst.sh @@ -76,6 +76,30 @@ for x_mod in $x_mods; do test "x$linked" = xno && echo "#endif" done +# if dynamic module 'mod' with load=no has moddeps in its .mdd, +# then output add_dep(mod, dep) for each 'dep' in moddeps. +dyn_mods="`grep ' link=dynamic .* load=no ' $CFMOD | \ + sed -e '/^#/d' -e 's/ .*/ /' -e 's/^name=/ /'`" + +for mod in $dyn_mods; do + modfile="`grep '^name='$mod' ' $CFMOD | \ + sed -e 's/^.* modfile=//' -e 's/ .*//'`" + if test "x$modfile" = x; then + echo >&2 "WARNING: no name for \`$mod' in $CFMOD (ignored)" + continue + fi + unset moddeps + . $srcdir/../$modfile + if test -n "$moddeps"; then + echo '#ifdef DYNAMIC' + echo "/* non-linked-in known module \`$mod' */" + for dep in $moddeps; do + echo " add_dep(\"$mod\", \"$dep\");" + done + echo '#endif' + fi +done + echo done_mods=" " for bin_mod in $bin_mods; do |