2016-01-21 23:42:40 +01:00

200 lines
5.4 KiB
Plaintext

$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*)