Compare commits
1 Commits
Author | SHA256 | Date | |
---|---|---|---|
24a6bd6690 |
@@ -1,53 +0,0 @@
|
|||||||
From 4c89849c98172c951a9def3690e8647dae76308f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Florian Weimer <fweimer@redhat.com>
|
|
||||||
Date: Fri, 8 Dec 2023 21:58:07 +0100
|
|
||||||
Subject: [PATCH] 52383: Avoid incompatible pointer types in terminfo global variable checks
|
|
||||||
Upstream: Committed, this is a backport
|
|
||||||
References: boo#1225958
|
|
||||||
|
|
||||||
* Florian Weimer: 52383: configure.ac: Avoid incompatible pointer
|
|
||||||
types in terminfo global variable checks
|
|
||||||
|
|
||||||
|
|
||||||
---
|
|
||||||
configure.ac | 12 ++++++------
|
|
||||||
2 files changed, 9 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index 2a8221e1f..2871dcb7c 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -1768,27 +1768,27 @@ if test x$zsh_cv_path_term_header != xnone; then
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(if boolcodes is available)
|
|
||||||
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no])
|
|
||||||
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no])
|
|
||||||
AC_MSG_RESULT($boolcodes)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(if numcodes is available)
|
|
||||||
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no])
|
|
||||||
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no])
|
|
||||||
AC_MSG_RESULT($numcodes)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(if strcodes is available)
|
|
||||||
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no])
|
|
||||||
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no])
|
|
||||||
AC_MSG_RESULT($strcodes)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(if boolnames is available)
|
|
||||||
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no])
|
|
||||||
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no])
|
|
||||||
AC_MSG_RESULT($boolnames)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(if numnames is available)
|
|
||||||
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no])
|
|
||||||
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no])
|
|
||||||
AC_MSG_RESULT($numnames)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(if strnames is available)
|
|
||||||
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no])
|
|
||||||
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no])
|
|
||||||
AC_MSG_RESULT($strnames)
|
|
||||||
|
|
||||||
dnl There are apparently defective terminal library headers on some
|
|
@@ -1,553 +0,0 @@
|
|||||||
From ab4d62eb975a4c4c51dd35822665050e2ddc6918 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nicholas Vinson <nvinson234@gmail.com>
|
|
||||||
Date: Wed, 21 Sep 2022 09:22:11 +0900
|
|
||||||
Subject: [PATCH] 50641: use 'int main()' in test C-codes in configure
|
|
||||||
Upstream: Committed, this is a backport
|
|
||||||
References: boo#1225958
|
|
||||||
|
|
||||||
2022-09-21 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
|
||||||
|
|
||||||
* Nicholas Vinson: 50641: aczsh.m4, configure.ac: use 'int main()'
|
|
||||||
in test C-codes in configure
|
|
||||||
|
|
||||||
|
|
||||||
---
|
|
||||||
aczsh.m4 | 64 +++++++++++++++++------------------
|
|
||||||
configure.ac | 94 ++++++++++++++++++++++------------------------------
|
|
||||||
3 files changed, 77 insertions(+), 86 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/aczsh.m4 b/aczsh.m4
|
|
||||||
index 1209ac6140..b31236020c 100644
|
|
||||||
--- a/aczsh.m4
|
|
||||||
+++ b/aczsh.m4
|
|
||||||
@@ -44,6 +44,7 @@ AC_DEFUN(zsh_64_BIT_TYPE,
|
|
||||||
#include <sys/types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+int
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
$1 foo = 0;
|
|
||||||
@@ -118,7 +119,6 @@ AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS
|
|
||||||
AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AS_MESSAGE_LOG_FD) &&
|
|
||||||
AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AS_MESSAGE_LOG_FD); then
|
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
||||||
-#include <stdlib.h>
|
|
||||||
#ifdef HPUX10DYNAMIC
|
|
||||||
#include <dl.h>
|
|
||||||
#define RTLD_LAZY BIND_DEFERRED
|
|
||||||
@@ -146,29 +146,30 @@ char *zsh_gl_sym_addr ;
|
|
||||||
#define RTLD_GLOBAL 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+int
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
void *handle1, *handle2;
|
|
||||||
void *(*zsh_getaddr1)(), *(*zsh_getaddr2)();
|
|
||||||
void *sym1, *sym2;
|
|
||||||
handle1 = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
|
|
||||||
- if(!handle1) exit(1);
|
|
||||||
+ if(!handle1) return(1);
|
|
||||||
handle2 = dlopen("./conftest2.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
|
|
||||||
- if(!handle2) exit(1);
|
|
||||||
+ if(!handle2) return(1);
|
|
||||||
zsh_getaddr1 = (void *(*)()) dlsym(handle1, "${us}zsh_getaddr1");
|
|
||||||
zsh_getaddr2 = (void *(*)()) dlsym(handle2, "${us}zsh_getaddr2");
|
|
||||||
sym1 = zsh_getaddr1();
|
|
||||||
sym2 = zsh_getaddr2();
|
|
||||||
- if(!sym1 || !sym2) exit(1);
|
|
||||||
- if(sym1 != sym2) exit(1);
|
|
||||||
+ if(!sym1 || !sym2) return(1);
|
|
||||||
+ if(sym1 != sym2) return(1);
|
|
||||||
dlclose(handle1);
|
|
||||||
handle1 = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
|
|
||||||
- if(!handle1) exit(1);
|
|
||||||
+ if(!handle1) return(1);
|
|
||||||
zsh_getaddr1 = (void *(*)()) dlsym(handle1, "${us}zsh_getaddr1");
|
|
||||||
sym1 = zsh_getaddr1();
|
|
||||||
- if(!sym1) exit(1);
|
|
||||||
- if(sym1 != sym2) exit(1);
|
|
||||||
- exit(0);
|
|
||||||
+ if(!sym1) return(1);
|
|
||||||
+ if(sym1 != sym2) return(1);
|
|
||||||
+ return(0);
|
|
||||||
}
|
|
||||||
]])],[zsh_cv_shared_$1=yes],
|
|
||||||
[zsh_cv_shared_$1=no],
|
|
||||||
@@ -200,7 +201,6 @@ AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS
|
|
||||||
AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AS_MESSAGE_LOG_FD) &&
|
|
||||||
AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AS_MESSAGE_LOG_FD); then
|
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
||||||
-#include <stdlib.h>
|
|
||||||
#ifdef HPUX10DYNAMIC
|
|
||||||
#include <dl.h>
|
|
||||||
#define RTLD_LAZY BIND_DEFERRED
|
|
||||||
@@ -228,19 +228,19 @@ char *zsh_gl_sym_addr ;
|
|
||||||
#define RTLD_GLOBAL 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-
|
|
||||||
+int
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
void *handle1, *handle2;
|
|
||||||
int (*fred1)(), (*fred2)();
|
|
||||||
handle1 = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
|
|
||||||
- if(!handle1) exit(1);
|
|
||||||
+ if(!handle1) return(1);
|
|
||||||
handle2 = dlopen("./conftest2.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
|
|
||||||
- if(!handle2) exit(1);
|
|
||||||
+ if(!handle2) return(1);
|
|
||||||
fred1 = (int (*)()) dlsym(handle1, "${us}fred");
|
|
||||||
fred2 = (int (*)()) dlsym(handle2, "${us}fred");
|
|
||||||
- if(!fred1 || !fred2) exit(1);
|
|
||||||
- exit((*fred1)() != 42 || (*fred2)() != 69);
|
|
||||||
+ if(!fred1 || !fred2) return(1);
|
|
||||||
+ return((*fred1)() != 42 || (*fred2)() != 69);
|
|
||||||
}
|
|
||||||
]])],[zsh_cv_sys_dynamic_clash_ok=yes],
|
|
||||||
[zsh_cv_sys_dynamic_clash_ok=no],
|
|
||||||
@@ -276,7 +276,6 @@ AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS
|
|
||||||
AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AS_MESSAGE_LOG_FD) &&
|
|
||||||
AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AS_MESSAGE_LOG_FD); then
|
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
||||||
-#include <stdlib.h>
|
|
||||||
#ifdef HPUX10DYNAMIC
|
|
||||||
#include <dl.h>
|
|
||||||
#define RTLD_LAZY BIND_DEFERRED
|
|
||||||
@@ -304,17 +303,18 @@ char *zsh_gl_sym_addr ;
|
|
||||||
#define RTLD_GLOBAL 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+int
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
void *handle;
|
|
||||||
int (*barneysym)();
|
|
||||||
handle = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
|
|
||||||
- if(!handle) exit(1);
|
|
||||||
+ if(!handle) return(1);
|
|
||||||
handle = dlopen("./conftest2.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
|
|
||||||
- if(!handle) exit(1);
|
|
||||||
+ if(!handle) return(1);
|
|
||||||
barneysym = (int (*)()) dlsym(handle, "${us}barney");
|
|
||||||
- if(!barneysym) exit(1);
|
|
||||||
- exit((*barneysym)() != 69);
|
|
||||||
+ if(!barneysym) return(1);
|
|
||||||
+ return((*barneysym)() != 69);
|
|
||||||
}
|
|
||||||
]])],[zsh_cv_sys_dynamic_rtld_global=yes],
|
|
||||||
[zsh_cv_sys_dynamic_rtld_global=no],
|
|
||||||
@@ -346,7 +346,6 @@ AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS
|
|
||||||
save_ldflags=$LDFLAGS
|
|
||||||
LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
|
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
||||||
-#include <stdlib.h>
|
|
||||||
#ifdef HPUX10DYNAMIC
|
|
||||||
#include <dl.h>
|
|
||||||
#define RTLD_LAZY BIND_DEFERRED
|
|
||||||
@@ -374,15 +373,16 @@ char *zsh_gl_sym_addr ;
|
|
||||||
#define RTLD_GLOBAL 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+int
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
void *handle;
|
|
||||||
int (*barneysym)();
|
|
||||||
handle = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
|
|
||||||
- if(!handle) exit(1);
|
|
||||||
+ if(!handle) return(1);
|
|
||||||
barneysym = (int (*)()) dlsym(handle, "${us}barney");
|
|
||||||
- if(!barneysym) exit(1);
|
|
||||||
- exit((*barneysym)() != 69);
|
|
||||||
+ if(!barneysym) return(1);
|
|
||||||
+ return((*barneysym)() != 69);
|
|
||||||
}
|
|
||||||
|
|
||||||
int fred () { return 42; }
|
|
||||||
@@ -420,7 +420,6 @@ elif
|
|
||||||
save_ldflags=$LDFLAGS
|
|
||||||
LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS -s"
|
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
||||||
-#include <stdlib.h>
|
|
||||||
#ifdef HPUX10DYNAMIC
|
|
||||||
#include <dl.h>
|
|
||||||
#define RTLD_LAZY BIND_DEFERRED
|
|
||||||
@@ -448,15 +447,16 @@ char *zsh_gl_sym_addr ;
|
|
||||||
#define RTLD_GLOBAL 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+int
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
void *handle;
|
|
||||||
int (*barneysym)();
|
|
||||||
handle = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
|
|
||||||
- if(!handle) exit(1);
|
|
||||||
+ if(!handle) return(1);
|
|
||||||
barneysym = (int (*)()) dlsym(handle, "${us}barney");
|
|
||||||
- if(!barneysym) exit(1);
|
|
||||||
- exit((*barneysym)() != 69);
|
|
||||||
+ if(!barneysym) return(1);
|
|
||||||
+ return((*barneysym)() != 69);
|
|
||||||
}
|
|
||||||
|
|
||||||
int fred () { return 42; }
|
|
||||||
@@ -488,7 +488,6 @@ echo 'int fred () { return 42; }' > conftest1.c
|
|
||||||
if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AS_MESSAGE_LOG_FD) &&
|
|
||||||
AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS -s conftest1.o $LIBS 1>&AS_MESSAGE_LOG_FD); then
|
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
||||||
-#include <stdlib.h>
|
|
||||||
#ifdef HPUX10DYNAMIC
|
|
||||||
#include <dl.h>
|
|
||||||
#define RTLD_LAZY BIND_DEFERRED
|
|
||||||
@@ -516,15 +515,16 @@ char *zsh_gl_sym_addr ;
|
|
||||||
#define RTLD_GLOBAL 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+int
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
void *handle;
|
|
||||||
int (*fredsym)();
|
|
||||||
handle = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
|
|
||||||
- if(!handle) exit(1);
|
|
||||||
+ if(!handle) return(1);
|
|
||||||
fredsym = (int (*)()) dlsym(handle, "${us}fred");
|
|
||||||
- if(!fredsym) exit(1);
|
|
||||||
- exit((*fredsym)() != 42);
|
|
||||||
+ if(!fredsym) return(1);
|
|
||||||
+ return((*fredsym)() != 42);
|
|
||||||
}
|
|
||||||
]])],[zsh_cv_sys_dynamic_strip_lib=yes],
|
|
||||||
[zsh_cv_sys_dynamic_strip_lib=no],
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index 890ef8dd27..074141d38d 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -585,7 +585,7 @@ fi
|
|
||||||
dnl Checking if compiler correctly cast signed to unsigned.
|
|
||||||
AC_CACHE_CHECK(if signed to unsigned casting is broken,
|
|
||||||
zsh_cv_c_broken_signed_to_unsigned_casting,
|
|
||||||
-[AC_RUN_IFELSE([AC_LANG_SOURCE([[main(){return((int)(unsigned char)((char) -1) == 255);}]])],[zsh_cv_c_broken_signed_to_unsigned_casting=yes],[zsh_cv_c_broken_signed_to_unsigned_casting=no],[zsh_cv_c_broken_signed_to_unsigned_casting=no])])
|
|
||||||
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[int main(){return((int)(unsigned char)((char) -1) == 255);}]])],[zsh_cv_c_broken_signed_to_unsigned_casting=yes],[zsh_cv_c_broken_signed_to_unsigned_casting=no],[zsh_cv_c_broken_signed_to_unsigned_casting=no])])
|
|
||||||
AH_TEMPLATE([BROKEN_SIGNED_TO_UNSIGNED_CASTING],
|
|
||||||
[Define to 1 if compiler incorrectly cast signed to unsigned.])
|
|
||||||
if test x$zsh_cv_c_broken_signed_to_unsigned_casting = xyes; then
|
|
||||||
@@ -1046,7 +1046,7 @@ else
|
|
||||||
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
-main() { return sizeof(off_t) < 8; }
|
|
||||||
+int main() { return sizeof(off_t) < 8; }
|
|
||||||
]])],[zsh_cv_off_t_is_64_bit=yes],[zsh_cv_off_t_is_64_bit=no],[zsh_cv_off_t_is_64_bit=no])])
|
|
||||||
if test x$zsh_cv_off_t_is_64_bit = xyes; then
|
|
||||||
AC_DEFINE(OFF_T_IS_64_BIT)
|
|
||||||
@@ -1056,7 +1056,7 @@ main() { return sizeof(off_t) < 8; }
|
|
||||||
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
-main() { return sizeof(ino_t) < 8; }
|
|
||||||
+int main() { return sizeof(ino_t) < 8; }
|
|
||||||
]])],[zsh_cv_ino_t_is_64_bit=yes],[zsh_cv_ino_t_is_64_bit=no],[zsh_cv_ino_t_is_64_bit=no])])
|
|
||||||
if test x$zsh_cv_ino_t_is_64_bit = xyes; then
|
|
||||||
AC_DEFINE(INO_T_IS_64_BIT)
|
|
||||||
@@ -1369,7 +1369,7 @@ zsh_cv_func_realpath_accepts_null,
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <limits.h>
|
|
||||||
],[
|
|
||||||
-exit(!realpath("/", (char*)0));
|
|
||||||
+return(!realpath("/", (char*)0));
|
|
||||||
])],
|
|
||||||
[zsh_cv_func_realpath_accepts_null=yes],
|
|
||||||
[zsh_cv_func_realpath_accepts_null=no],
|
|
||||||
@@ -1393,10 +1393,9 @@ AC_CACHE_CHECK(if tgetent accepts NULL,
|
|
||||||
zsh_cv_func_tgetent_accepts_null,
|
|
||||||
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
||||||
#include <fcntl.h>
|
|
||||||
-#include <stdlib.h>
|
|
||||||
int tgetent(char *, char *);
|
|
||||||
char *tgetstr(char *, char **);
|
|
||||||
-main()
|
|
||||||
+int main()
|
|
||||||
{
|
|
||||||
char buf[4096];
|
|
||||||
int r1 = tgetent(buf, "vt100");
|
|
||||||
@@ -1407,7 +1406,7 @@ main()
|
|
||||||
tgetstr("cl", &u);
|
|
||||||
creat("conftest.tgetent", 0640);
|
|
||||||
}
|
|
||||||
- exit((r1 != r2) || r2 == -1);
|
|
||||||
+ return((r1 != r2) || r2 == -1);
|
|
||||||
}
|
|
||||||
]])],[if test -f conftest.tgetent; then
|
|
||||||
zsh_cv_func_tgetent_accepts_null=yes
|
|
||||||
@@ -1421,10 +1420,9 @@ AC_CACHE_CHECK(if tgetent returns 0 on success,
|
|
||||||
zsh_cv_func_tgetent_zero_success,
|
|
||||||
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
||||||
#include <fcntl.h>
|
|
||||||
-#include <stdlib.h>
|
|
||||||
int tgetent(char *, char*);
|
|
||||||
char *tgetstr(char *, char **);
|
|
||||||
-main()
|
|
||||||
+int main()
|
|
||||||
{
|
|
||||||
char buf[4096];
|
|
||||||
int r1 = tgetent(buf, "!@#$%^&*");
|
|
||||||
@@ -1435,7 +1433,7 @@ main()
|
|
||||||
tgetstr("cl", &u);
|
|
||||||
creat("conftest.tgetent0", 0640);
|
|
||||||
}
|
|
||||||
- exit(r1 == r2);
|
|
||||||
+ return(r1 == r2);
|
|
||||||
}
|
|
||||||
]])],[if test -f conftest.tgetent0; then
|
|
||||||
zsh_cv_func_tgetent_zero_success=yes
|
|
||||||
@@ -1869,8 +1867,7 @@ zsh_cv_rlim_t_is_longer,
|
|
||||||
#include <sys/time.h>
|
|
||||||
#endif
|
|
||||||
#include <sys/resource.h>
|
|
||||||
-#include <stdlib.h>
|
|
||||||
-main(){struct rlimit r;exit(sizeof(r.rlim_cur) <= sizeof(long));}]])],[zsh_cv_rlim_t_is_longer=yes],[zsh_cv_rlim_t_is_longer=no],[zsh_cv_rlim_t_is_longer=yes])])
|
|
||||||
+int main(){struct rlimit r;return(sizeof(r.rlim_cur) <= sizeof(long));}]])],[zsh_cv_rlim_t_is_longer=yes],[zsh_cv_rlim_t_is_longer=no],[zsh_cv_rlim_t_is_longer=yes])])
|
|
||||||
if test x$zsh_cv_rlim_t_is_longer = xyes; then
|
|
||||||
AC_CACHE_CHECK(if rlim_t is a quad,
|
|
||||||
zsh_cv_rlim_t_is_quad_t,
|
|
||||||
@@ -1880,13 +1877,12 @@ if test x$zsh_cv_rlim_t_is_longer = xyes; then
|
|
||||||
#endif
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <sys/resource.h>
|
|
||||||
-#include <stdlib.h>
|
|
||||||
-main() {
|
|
||||||
+int main() {
|
|
||||||
struct rlimit r;
|
|
||||||
char buf[20];
|
|
||||||
r.rlim_cur = 0;
|
|
||||||
sprintf(buf, "%qd", r.rlim_cur);
|
|
||||||
- exit(strcmp(buf, "0"));
|
|
||||||
+ return(strcmp(buf, "0"));
|
|
||||||
}]])],[zsh_cv_rlim_t_is_quad_t=yes],[zsh_cv_rlim_t_is_quad_t=no],[zsh_cv_rlim_t_is_quad_t=no])])
|
|
||||||
if test x$zsh_cv_rlim_t_is_quad_t = xyes; then
|
|
||||||
AC_DEFINE(RLIM_T_IS_QUAD_T)
|
|
||||||
@@ -1903,8 +1899,7 @@ else
|
|
||||||
#include <sys/time.h>
|
|
||||||
#endif
|
|
||||||
#include <sys/resource.h>
|
|
||||||
-#include <stdlib.h>
|
|
||||||
- main(){struct rlimit r;r.rlim_cur=-1;exit(r.rlim_cur<0);}]])],[zsh_cv_type_rlim_t_is_unsigned=yes],[zsh_cv_type_rlim_t_is_unsigned=no],[zsh_cv_type_rlim_t_is_unsigned=no])])
|
|
||||||
+ int main(){struct rlimit r;r.rlim_cur=-1;return(r.rlim_cur<0);}]])],[zsh_cv_type_rlim_t_is_unsigned=yes],[zsh_cv_type_rlim_t_is_unsigned=no],[zsh_cv_type_rlim_t_is_unsigned=no])])
|
|
||||||
if test x$zsh_cv_type_rlim_t_is_unsigned = xyes; then
|
|
||||||
AC_DEFINE(RLIM_T_IS_UNSIGNED)
|
|
||||||
DEFAULT_RLIM_T="unsigned $DEFAULT_RLIM_T"
|
|
||||||
@@ -2187,9 +2182,8 @@ zsh_cv_sys_fifo,
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
-#include <stdlib.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
-main()
|
|
||||||
+int main()
|
|
||||||
{
|
|
||||||
char c;
|
|
||||||
int fd;
|
|
||||||
@@ -2200,18 +2194,18 @@ main()
|
|
||||||
#else
|
|
||||||
if(mknod("/tmp/fifo$$", 0010600, 0) < 0)
|
|
||||||
#endif
|
|
||||||
- exit(1);
|
|
||||||
+ return(1);
|
|
||||||
pid = fork();
|
|
||||||
if(pid < 0)
|
|
||||||
- exit(1);
|
|
||||||
+ return(1);
|
|
||||||
if(pid) {
|
|
||||||
fd = open("/tmp/fifo$$", O_RDONLY);
|
|
||||||
- exit(fd < 0 || read(fd, &c, 1) != 1 || c != 'x');
|
|
||||||
+ return(fd < 0 || read(fd, &c, 1) != 1 || c != 'x');
|
|
||||||
}
|
|
||||||
fd = open("/tmp/fifo$$", O_WRONLY);
|
|
||||||
ret = (fd < 0 || write(fd, "x", 1) < 1);
|
|
||||||
unlink("/tmp/fifo$$");
|
|
||||||
- exit(ret);
|
|
||||||
+ return(ret);
|
|
||||||
}
|
|
||||||
]])],[zsh_cv_sys_fifo=yes],[zsh_cv_sys_fifo=no],[zsh_cv_sys_fifo=yes])
|
|
||||||
])
|
|
||||||
@@ -2289,8 +2283,7 @@ zsh_cv_sys_link,
|
|
||||||
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
-#include <stdlib.h>
|
|
||||||
-main()
|
|
||||||
+int main()
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
char *tmpfile, *newfile;
|
|
||||||
@@ -2299,11 +2292,11 @@ main()
|
|
||||||
unlink(tmpfile);
|
|
||||||
unlink(newfile);
|
|
||||||
if(creat(tmpfile, 0644) < 0)
|
|
||||||
- exit(1);
|
|
||||||
+ return(1);
|
|
||||||
ret = link(tmpfile, newfile);
|
|
||||||
unlink(tmpfile);
|
|
||||||
unlink(newfile);
|
|
||||||
- exit(ret<0);
|
|
||||||
+ return(ret<0);
|
|
||||||
}
|
|
||||||
]])],[zsh_cv_sys_link=yes],[zsh_cv_sys_link=no],[zsh_cv_sys_link=yes])])
|
|
||||||
AH_TEMPLATE([HAVE_LINK],
|
|
||||||
@@ -2322,12 +2315,11 @@ zsh_cv_sys_killesrch,
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <stdlib.h>
|
|
||||||
-main()
|
|
||||||
+int main()
|
|
||||||
{
|
|
||||||
int pid = (getpid() + 10000) & 0xffffff;
|
|
||||||
while (pid && (kill(pid, 0) == 0 || errno != ESRCH)) pid >>= 1;
|
|
||||||
- exit(errno!=ESRCH);
|
|
||||||
+ return(errno!=ESRCH);
|
|
||||||
}
|
|
||||||
]])],[zsh_cv_sys_killesrch=yes],[zsh_cv_sys_killesrch=no],[zsh_cv_sys_killesrch=yes])])
|
|
||||||
AH_TEMPLATE([BROKEN_KILL_ESRCH],
|
|
||||||
@@ -2348,12 +2340,11 @@ if test x$signals_style = xPOSIX_SIGNALS; then
|
|
||||||
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
||||||
#include <signal.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
-#include <stdlib.h>
|
|
||||||
int child=0;
|
|
||||||
void handler(sig)
|
|
||||||
int sig;
|
|
||||||
{if(sig==SIGCHLD) child=1;}
|
|
||||||
-main() {
|
|
||||||
+int main() {
|
|
||||||
struct sigaction act;
|
|
||||||
sigset_t set;
|
|
||||||
int pid, ret;
|
|
||||||
@@ -2368,7 +2359,7 @@ main() {
|
|
||||||
if(pid>0) {
|
|
||||||
sigemptyset(&set);
|
|
||||||
ret=sigsuspend(&set);
|
|
||||||
- exit(child==0);
|
|
||||||
+ return(child==0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]])],[zsh_cv_sys_sigsuspend=yes],[zsh_cv_sys_sigsuspend=no],[zsh_cv_sys_sigsuspend=yes])])
|
|
||||||
@@ -2400,15 +2391,14 @@ case "x$zsh_working_tcsetpgrp" in
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
-#include <stdlib.h>
|
|
||||||
-main() {
|
|
||||||
+int main() {
|
|
||||||
int fd;
|
|
||||||
int ret;
|
|
||||||
fd=open("/dev/tty", O_RDWR);
|
|
||||||
- if (fd < 0) exit(2);
|
|
||||||
+ if (fd < 0) return(2);
|
|
||||||
ret=tcsetpgrp(fd, tcgetpgrp(fd));
|
|
||||||
- if (ret < 0) exit(1);
|
|
||||||
- exit(0);
|
|
||||||
+ if (ret < 0) return(1);
|
|
||||||
+ return(0);
|
|
||||||
}
|
|
||||||
]])],[zsh_cv_sys_tcsetpgrp=yes],[
|
|
||||||
case $? in
|
|
||||||
@@ -2448,7 +2438,7 @@ if test x$ac_cv_func_getpwnam = xyes; then
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
-main() {
|
|
||||||
+int main() {
|
|
||||||
struct passwd *pw1, *pw2;
|
|
||||||
char buf[1024], name[1024];
|
|
||||||
sprintf(buf, "%d:%d", getpid(), rand());
|
|
||||||
@@ -2456,7 +2446,7 @@ main() {
|
|
||||||
if (pw1) strcpy(name, pw1->pw_name);
|
|
||||||
sprintf(buf, "%d:%d", rand(), getpid());
|
|
||||||
pw2=getpwnam(buf);
|
|
||||||
- exit(pw1!=0 && pw2!=0 && !strcmp(name, pw2->pw_name));
|
|
||||||
+ return(pw1!=0 && pw2!=0 && !strcmp(name, pw2->pw_name));
|
|
||||||
}
|
|
||||||
]])],[zsh_cv_sys_getpwnam_faked=no],[zsh_cv_sys_getpwnam_faked=yes],[zsh_cv_sys_getpwnam_faked=no])])
|
|
||||||
if test x$zsh_cv_sys_getpwnam_faked = xyes; then
|
|
||||||
@@ -2775,20 +2765,17 @@ elif test "x$dynamic" = xyes; then
|
|
||||||
zsh_cv_sys_elf,
|
|
||||||
[AC_RUN_IFELSE([AC_LANG_SOURCE([[/* Test for whether ELF binaries are produced */
|
|
||||||
#include <fcntl.h>
|
|
||||||
-#include <stdlib.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
-main(argc, argv)
|
|
||||||
-int argc;
|
|
||||||
-char *argv[];
|
|
||||||
+int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
char b[4];
|
|
||||||
int i = open(argv[0],O_RDONLY);
|
|
||||||
if(i == -1)
|
|
||||||
- exit(1); /* fail */
|
|
||||||
+ return(1); /* fail */
|
|
||||||
if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
|
|
||||||
- exit(0); /* succeed (yes, it's ELF) */
|
|
||||||
+ return(0); /* succeed (yes, it's ELF) */
|
|
||||||
else
|
|
||||||
- exit(1); /* fail */
|
|
||||||
+ return(1); /* fail */
|
|
||||||
}]])],[zsh_cv_sys_elf=yes],[zsh_cv_sys_elf=no],[zsh_cv_sys_elf=yes])])
|
|
||||||
|
|
||||||
# We use [0-9]* in case statements, so need to change quoting
|
|
||||||
@@ -2924,13 +2911,12 @@ LDFLAGS="$old_LDFLAGS")
|
|
||||||
AC_CACHE_CHECK(if your dlsym() needs a leading underscore,
|
|
||||||
zsh_cv_func_dlsym_needs_underscore,
|
|
||||||
[echo failed >conftestval && cat >conftest.c <<EOM
|
|
||||||
-fred () { }
|
|
||||||
+void fred () { }
|
|
||||||
EOM
|
|
||||||
AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest.c 1>&AS_MESSAGE_LOG_FD) &&
|
|
||||||
AC_TRY_COMMAND($DLLD $LDFLAGS $DLLDFLAGS -o conftest.$DL_EXT conftest.o 1>&AS_MESSAGE_LOG_FD) &&
|
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
||||||
#include <stdio.h>
|
|
||||||
-#include <stdlib.h>
|
|
||||||
#ifdef HPUX10DYNAMIC
|
|
||||||
#include <dl.h>
|
|
||||||
#define RTLD_LAZY BIND_DEFERRED
|
|
||||||
@@ -2957,16 +2943,16 @@ char *zsh_gl_sym_addr ;
|
|
||||||
|
|
||||||
extern int fred() ;
|
|
||||||
|
|
||||||
-main()
|
|
||||||
+int main()
|
|
||||||
{
|
|
||||||
void * handle ;
|
|
||||||
void * symbol ;
|
|
||||||
FILE *f=fopen("conftestval", "w");
|
|
||||||
- if (!f) exit(1);
|
|
||||||
+ if (!f) return(1);
|
|
||||||
handle = dlopen("./conftest.$DL_EXT", RTLD_LAZY) ;
|
|
||||||
if (handle == NULL) {
|
|
||||||
fprintf (f, "dlopen failed") ;
|
|
||||||
- exit(1);
|
|
||||||
+ return(1);
|
|
||||||
}
|
|
||||||
symbol = dlsym(handle, "fred") ;
|
|
||||||
if (symbol == NULL) {
|
|
||||||
@@ -2974,13 +2960,13 @@ main()
|
|
||||||
symbol = dlsym(handle, "_fred") ;
|
|
||||||
if (symbol == NULL) {
|
|
||||||
fprintf (f, "dlsym failed") ;
|
|
||||||
- exit(1);
|
|
||||||
+ return(1);
|
|
||||||
}
|
|
||||||
fprintf (f, "yes") ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
fprintf (f, "no") ;
|
|
||||||
- exit(0);
|
|
||||||
+ return(0);
|
|
||||||
}]])],[zsh_cv_func_dlsym_needs_underscore=`cat conftestval`],[zsh_cv_func_dlsym_needs_underscore=failed
|
|
||||||
dynamic=no],[zsh_cv_func_dlsym_needs_underscore=no])])
|
|
||||||
if test "x$zsh_cv_func_dlsym_needs_underscore" = xyes; then
|
|
25
zsh.changes
25
zsh.changes
@@ -1,33 +1,10 @@
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 17 13:37:01 UTC 2025 - Dr. Werner Fink <werner@suse.de>
|
Thu Nov 30 17:10:17 UTC 2023 - Paolo Perego <paolo.perego@suse.com>
|
||||||
|
|
||||||
- Make it build with texinfo 7.1 (boo#1237196)
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
|
||||||
Mon Jul 15 14:02:19 UTC 2024 - Martin Jambor <mjambor@suse.com>
|
|
||||||
|
|
||||||
- Backport zsh-ab4d62eb975a4c4c51dd35822665050e2ddc6918.patch
|
|
||||||
and zsh-4c89849c98172c951a9def3690e8647dae76308f.patch and add
|
|
||||||
autoconf to build requirements to make the package build with
|
|
||||||
GCC 14. [boo#1225958]
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
|
||||||
Tue Feb 20 12:11:13 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
|
||||||
|
|
||||||
- Use %patch -P N instead of deprecated %patchN.
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
|
||||||
Thu Nov 30 09:43:33 UTC 2023 - Paolo Perego <paolo.perego@suse.com>
|
|
||||||
|
|
||||||
- add pipe-less-and-signals-handling.patch (bsc#1217304). It fixes a problem
|
- add pipe-less-and-signals-handling.patch (bsc#1217304). It fixes a problem
|
||||||
with signal handling and less when the job is suspended in a user defined
|
with signal handling and less when the job is suspended in a user defined
|
||||||
concatenated commands function.
|
concatenated commands function.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
|
||||||
Thu Aug 3 10:28:02 UTC 2023 - Andreas Schwab <schwab@suse.de>
|
|
||||||
|
|
||||||
- Enable testsuite in qemu build
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Feb 28 16:40:02 UTC 2023 - Paolo Perego <paolo.perego@suse.com>
|
Tue Feb 28 16:40:02 UTC 2023 - Paolo Perego <paolo.perego@suse.com>
|
||||||
|
|
||||||
|
22
zsh.spec
22
zsh.spec
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package zsh
|
# spec file for package zsh
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2023 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -43,9 +43,7 @@ Patch2: zsh-osc-completion.patch
|
|||||||
# PATCH-FIX-OPENSUSE: taken from https://www.zsh.org/mla/workers/2022/msg00956.html
|
# PATCH-FIX-OPENSUSE: taken from https://www.zsh.org/mla/workers/2022/msg00956.html
|
||||||
Patch3: egrep-deprecation.patch
|
Patch3: egrep-deprecation.patch
|
||||||
Patch4: pipe-less-and-signals-handling.patch
|
Patch4: pipe-less-and-signals-handling.patch
|
||||||
Patch5: zsh-ab4d62eb975a4c4c51dd35822665050e2ddc6918.patch
|
|
||||||
Patch6: zsh-4c89849c98172c951a9def3690e8647dae76308f.patch
|
|
||||||
BuildRequires: autoconf
|
|
||||||
BuildRequires: groff
|
BuildRequires: groff
|
||||||
BuildRequires: libcap-devel
|
BuildRequires: libcap-devel
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
@@ -114,14 +112,11 @@ Use zsh as /bin/sh implementation.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
%patch -P 1 -p1
|
%patch1 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch -P 2 -p1
|
%patch2 -p1
|
||||||
%patch -P 3 -p1
|
%patch3 -p1
|
||||||
%patch -P 4 -p1
|
%patch4 -p1
|
||||||
%patch -P 5 -p1
|
|
||||||
%patch -P 6 -p1
|
|
||||||
|
|
||||||
# Remove executable bit
|
# Remove executable bit
|
||||||
chmod 0644 Etc/changelog2html.pl
|
chmod 0644 Etc/changelog2html.pl
|
||||||
|
|
||||||
@@ -132,8 +127,7 @@ perl -p -i -e 's|%{_prefix}/local/bin|%{_bindir}|' \
|
|||||||
Util/reporter Functions/VCS_Info/test-repo-git-rebase-*
|
Util/reporter Functions/VCS_Info/test-repo-git-rebase-*
|
||||||
|
|
||||||
%build
|
%build
|
||||||
TEXI2HTML=texi2html
|
|
||||||
export TEXI2HTML
|
|
||||||
%configure \
|
%configure \
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
--with-term-lib="ncursesw" \
|
--with-term-lib="ncursesw" \
|
||||||
@@ -220,6 +214,7 @@ rm -f %{buildroot}/%{_infodir}/dir
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if ! 0%{?qemu_user_space_build}
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
make %{?_smp_mflags} check
|
make %{?_smp_mflags} check
|
||||||
%else
|
%else
|
||||||
@@ -234,6 +229,7 @@ mv Test/E01options.ztst Test/E01options.ztst.mvd
|
|||||||
%endif
|
%endif
|
||||||
ZTST_verbose=0 make test
|
ZTST_verbose=0 make test
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%if ! 0%{?suse_version}
|
%if ! 0%{?suse_version}
|
||||||
|
Reference in New Issue
Block a user