pkgsrc/shells/zsh/files/patch-ac
szptvlfn 453f20b7e5 Update to 5.1
pkgsrc changes:
  removed patch:
    patch-Completion_Unix_Command__du
    patch-Completion_Unix_Command__sort
    patch-Src_builtin.c
    patch-Test_B03print.ztst

  quote from zsh-5.1/ChangeLog:
    * 36120: Completion/Unix/Command/_sort: Fix syntax error
    * 35467: Completion/Unix/Command/_du: complete files for non-GNU du
    * 35412: Src/builtin.c, Test/B03print.ztst: fix for - flag
    when formating strings with printf that was broken in 34841

  separate a patch ( $ mv patches/patch-ac files/patch-ac )

zsh-5.1/NEWS:
Changes from 5.0.8 to 5.1
-------------------------

The builtins declare, export, local, readonly and typeset
now have corresponding reserved words.  When used in
this form, the builtin syntax is extended so that assignments
following the reserved word are treated similarly to
assignments that appear at the start of the command line.
For example,
  local scalar=`echo one word` array=(several words)
creates a local "scalar" containing the text "one word"
and an array "array" containing the words "several"
"words".

- The print builtin has new options -x and -X to expand tabs.

- Several new command completions and numerous updates to others.

- Options to "fc" to segregate internal and shared history.

- All emulations including "sh" use multibyte by default; several
  repairs to multibyte handling.

- ZLE supports "bracketed paste" mode to avoid interpreting pasted
  newlines as accept-line.  Pastes can be highlighted for visibility
  and to make it more obvious whether accept-line has occurred.

- Improved (though still not perfect) POSIX compatibility for getopts
  builtin when POSIX_BUILTINS is set.

- New setopt APPEND_CREATE for POSIX-compatible NO_CLOBBER behavior.

- Completion of date values now displays in a calendar format when
  the complist module is available.  Controllable by zstyle.

- New parameter UNDO_LIMIT_NO for more control over ZLE undo repeat.

- Several repairs/improvements to the contributed narrow-to-region
  ZLE function.

- Many changes to child-process and signal handling to eliminate race
  conditions and avoid deadlocks on descriptor and memory management.

- New builtin sysopen in zsh/system module for detailed control of
  file descriptor modes.

zsh-5.1/README:
Incompatibilites between 5.0.8 and 5.1
--------------------------------------

The default behaviour when text is pasted into an X Windows terminal has
changed significantly (unless you are using a very old terminal emulator
that doesn't support this mode).  Now, the new "bracketed paste mode"
treats all the pasted text as literal characters.  This means, in
particular, that a newline is simply inserted as a visible newline; you
need to hit Return on the keyboard to execute the pasted text in one go.
See the description of zle_bracketed_paste in the zshparams manual for
more.  "unset zle_bracketed_paste" restores the previous behaviour.

As noted in NEWS, the builtins declare, export, float, integer, local,
readonly and typeset now have corresponding reserved words that provide
true assignment semantics instead of an approximation by means of normal
command line arguments.  It is hoped that this additional consistency
provides a more natural interface.  However, compatbility with older
versions of zsh can be obtained by turning off the reserved word
interface, exposing the builtin interface:

  disable -r declare export float integer local readonly typeset

This is also necessary in the unusual eventuality that the builtins are
to be overridden by shell functions, since reserved words take
precedence over functions.
2015-09-02 10:54:29 +00:00

199 lines
5.4 KiB
Text

$NetBSD: patch-ac,v 1.1 2015/09/02 10:54:29 szptvlfn Exp $
First chunk:
Don't use _POSIX_C_SOURCE on SunOS with c99.
Next chunks:
Use a compile test, not a run test, for whether various rlimit values
are equivalent. A compile test is sufficient because zsh uses these
values in switch cases, so they must be compile-time, if not
preprocessor-time, constants.
Last-but-one chunk:
Make this package build on Interix. Patches provided by Hiramatsu
Yoshifumi in PR pkg/25946.
Last chunk:
Use -shared instead of -G on SunOS.
Fixes 64-bit package.
--- configure.orig 2014-09-23 18:56:57.000000000 +0000
+++ configure
@@ -7645,7 +7645,9 @@ if ${zsh_cv_type_sigset_t+:} false; then
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#ifndef __sun
#define _POSIX_C_SOURCE 200809L
+#endif
#include <sys/types.h>
#include <signal.h>
int
@@ -10233,9 +10235,6 @@ $as_echo_n "checking if RLIMIT_VMEM and
if ${zsh_cv_rlimit_vmem_is_rss+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
- zsh_cv_rlimit_vmem_is_rss=no
-else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10244,43 +10243,33 @@ else
#include <sys/time.h>
#endif
#include <sys/resource.h>
-int main()
+int
+main ()
{
-int ret = 1;
-#if defined(HAVE_RLIMIT_VMEM) && defined(HAVE_RLIMIT_RSS)
-if (RLIMIT_RSS == RLIMIT_VMEM) ret = 0;
-#endif
-return ret;
+static char x[(RLIMIT_VMEM == RLIMIT_RSS)? 1 : -1]
+ ;
+ return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"; then :
zsh_cv_rlimit_vmem_is_rss=yes
else
zsh_cv_rlimit_vmem_is_rss=no
fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $zsh_cv_rlimit_vmem_is_rss" >&5
$as_echo "$zsh_cv_rlimit_vmem_is_rss" >&6; }
-
if test x$zsh_cv_rlimit_vmem_is_rss = xyes; then
$as_echo "#define RLIMIT_VMEM_IS_RSS 1" >>confdefs.h
fi
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if RLIMIT_VMEM and RLIMIT_AS are the same" >&5
$as_echo_n "checking if RLIMIT_VMEM and RLIMIT_AS are the same... " >&6; }
if ${zsh_cv_rlimit_vmem_is_as+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
- zsh_cv_rlimit_vmem_is_as=no
-else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10289,43 +10278,33 @@ else
#include <sys/time.h>
#endif
#include <sys/resource.h>
-int main()
+int
+main ()
{
-int ret = 1;
-#if defined(HAVE_RLIMIT_VMEM) && defined(HAVE_RLIMIT_AS)
-if (RLIMIT_AS == RLIMIT_VMEM) ret = 0;
-#endif
-return ret;
+static char x[(RLIMIT_VMEM == RLIMIT_AS)? 1 : -1]
+ ;
+ return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"; then :
zsh_cv_rlimit_vmem_is_as=yes
else
zsh_cv_rlimit_vmem_is_as=no
fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $zsh_cv_rlimit_vmem_is_as" >&5
$as_echo "$zsh_cv_rlimit_vmem_is_as" >&6; }
-
if test x$zsh_cv_rlimit_vmem_is_as = xyes; then
$as_echo "#define RLIMIT_VMEM_IS_AS 1" >>confdefs.h
fi
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if RLIMIT_RSS and RLIMIT_AS are the same" >&5
$as_echo_n "checking if RLIMIT_RSS and RLIMIT_AS are the same... " >&6; }
if ${zsh_cv_rlimit_rss_is_as+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
- zsh_cv_rlimit_rss_is_as=no
-else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10334,28 +10313,23 @@ else
#include <sys/time.h>
#endif
#include <sys/resource.h>
-int main()
+int
+main ()
{
-int ret = 1;
-#if defined(HAVE_RLIMIT_RSS) && defined(HAVE_RLIMIT_AS)
-if (RLIMIT_AS == RLIMIT_RSS) ret = 0;
-#endif
-return ret;
+static char x[(RLIMIT_RSS == RLIMIT_AS)? 1 : -1]
+ ;
+ return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"; then :
zsh_cv_rlimit_rss_is_as=yes
else
zsh_cv_rlimit_rss_is_as=no
fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $zsh_cv_rlimit_rss_is_as" >&5
$as_echo "$zsh_cv_rlimit_rss_is_as" >&6; }
-
if test x$zsh_cv_rlimit_rss_is_as = xyes; then
$as_echo "#define RLIMIT_RSS_IS_AS 1" >>confdefs.h
@@ -11852,6 +11826,10 @@ $as_echo "$zsh_cv_sys_elf" >&6; }
DLLD="${DLLD=$CC}"
DLLDARG=""
;;
+ *interix*)
+ DLLD="${DLLD=$CC}"
+ DLLDARG=""
+ ;;
* )
DLLD="${DLLD=ld}"
DLLDARG=""
@@ -11881,7 +11859,7 @@ $as_echo "$zsh_cv_sys_elf" >&6; }
sunos*) DLLDFLAGS="${DLLDFLAGS=-assert nodefinitions}" ;;
sysv4*|esix*) DLLDFLAGS="${DLLDFLAGS=-G $ldflags}" ;;
aix*) DLLDFLAGS="${DLLDFLAGS=-G -bexpall -lc}" ;;
- solaris*|sysv4*|esix*) DLLDFLAGS="${DLLDFLAGS=-G}" ;;
+ solaris*|sysv4*|esix*) DLLDFLAGS="${DLLDFLAGS=-shared}" ;;
darwin*) DLLDFLAGS="${DLLDFLAGS=-bundle -flat_namespace -undefined suppress}" ;;
beos*|haiku*) DLLDFLAGS="${DLLDFLAGS=-nostart}" ;;
openbsd*)