Compare commits

...

No commits in common. 'c9' and 'i10cs' have entirely different histories.
c9 ... i10cs

@ -0,0 +1,24 @@
Adjustments for compatibility with the currrent (Tcl 8.4.0+) channel
implementation.
diff --git a/exp_chan.c b/exp_chan.c
index c92e26b6fbd02305..944200a63b102672 100644
--- a/exp_chan.c
+++ b/exp_chan.c
@@ -60,7 +60,7 @@ void exp_background_channelhandler _ANSI_ARGS_((ClientData,
Tcl_ChannelType expChannelType = {
"exp", /* Type name. */
- ExpBlockModeProc, /* Set blocking/nonblocking mode.*/
+ TCL_CHANNEL_VERSION_2,
ExpCloseProc, /* Close proc. */
ExpInputProc, /* Input proc. */
ExpOutputProc, /* Output proc. */
@@ -70,6 +70,7 @@ Tcl_ChannelType expChannelType = {
ExpWatchProc, /* Initialize notifier. */
ExpGetHandleProc, /* Get OS handles out of channel. */
NULL, /* Close2 proc */
+ ExpBlockModeProc, /* Set blocking/nonblocking mode.*/
};
typedef struct ThreadSpecificData {

@ -0,0 +1,200 @@
Avoid calling exit without declaring the function.
Add missing <string.h> include for memcpy.
Use AC_TYPE_SIGNAL to fix REARM_SIG check. Add missing includes.
Fix various implicit int return types of main.
Submitted upstream here: <https://sourceforge.net/p/expect/patches/24/#6759>
diff --git a/configure.in b/configure.in
index 51558fa14d2bcf7e..055c88fbd8797eaa 100755
--- a/configure.in
+++ b/configure.in
@@ -452,7 +452,11 @@ AC_CHECK_FUNC(siglongjmp, AC_DEFINE(HAVE_SIGLONGJMP))
# because Unixware 2.0 handles it specially and refuses to compile
# autoconf's automatic test that is a call with no arguments
AC_MSG_CHECKING([for memcpy])
-AC_TRY_LINK(,[
+AC_TRY_LINK([
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+],[
char *s1, *s2;
memcpy(s1,s2,0);
],
@@ -469,6 +473,7 @@ memcpy(s1,s2,0);
AC_MSG_CHECKING([if WNOHANG requires _POSIX_SOURCE])
AC_TRY_RUN([
#include <sys/wait.h>
+int
main() {
#ifndef WNOHANG
return 0;
@@ -489,6 +494,7 @@ rm -rf wnohang
AC_TRY_RUN([
#include <stdio.h>
#include <sys/wait.h>
+int
main() {
#ifdef WNOHANG
FILE *fp = fopen("wnohang","w");
@@ -527,16 +533,21 @@ else
AC_DEFINE(SELECT_MASK_TYPE, fd_set)
fi
-dnl # Check for the data type of the function used in signal(). This
-dnl # must be before the test for rearming.
-dnl # echo checking return type of signal handlers
-dnl AC_HEADER_EGREP([(void|sighandler_t).*signal], signal.h, retsigtype=void,AC_DEFINE(RETSIGTYPE, int) retsigtype=int)
+AC_TYPE_SIGNAL
# FIXME: check if alarm exists
AC_MSG_CHECKING([if signals need to be re-armed])
AC_TRY_RUN([
#include <signal.h>
-#define RETSIGTYPE $retsigtype
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#ifndef NO_SYS_WAIT_H
+# include <sys/wait.h>
+#endif
int signal_rearms = 0;
@@ -553,6 +564,7 @@ int n;
signal_rearms++;
}
+int
main()
{
signal(SIGINT,parent_sigint_handler);
@@ -714,10 +726,11 @@ fi
AC_MSG_CHECKING([for struct sgttyb])
AC_TRY_RUN([
#include <sgtty.h>
+int
main()
{
struct sgttyb tmp;
- exit(0);
+ return 0;
}],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SGTTYB)
@@ -738,10 +751,11 @@ if test $mach -eq 0 ; then
# pty_termios.c is set up to handle pty_termio.
AC_MSG_CHECKING([for struct termio])
AC_TRY_RUN([#include <termio.h>
+ int
main()
{
struct termio tmp;
- exit(0);
+ return 0;
}],
AC_DEFINE(HAVE_TERMIO)
PTY_TYPE=termios
@@ -760,10 +774,11 @@ if test $mach -eq 0 ; then
# include <inttypes.h>
# endif
# include <termios.h>
+ int
main()
{
struct termios tmp;
- exit(0);
+ return 0;
}],
AC_DEFINE(HAVE_TERMIOS)
PTY_TYPE=termios
@@ -782,6 +797,7 @@ AC_TRY_RUN([
#include <inttypes.h>
#endif
#include <termios.h>
+int
main() {
#if defined(TCGETS) || defined(TCGETA)
return 0;
@@ -804,6 +820,7 @@ AC_TRY_RUN([
#include <inttypes.h>
#endif
#include <termios.h>
+int
main() {
#ifdef TIOCGWINSZ
return 0;
@@ -823,6 +840,7 @@ main() {
AC_MSG_CHECKING([for Cray-style ptys])
SETUID=":"
AC_TRY_RUN([
+int
main(){
#ifdef CRAY
return 0;
@@ -878,12 +896,13 @@ AC_MSG_CHECKING([for SV-style timezone])
AC_TRY_RUN([
extern char *tzname[2];
extern int daylight;
+int
main()
{
int *x = &daylight;
char **y = tzname;
- exit(0);
+ return 0;
}],
AC_DEFINE(HAVE_SV_TIMEZONE)
AC_MSG_RESULT(yes),
diff --git a/tclconfig/tcl.m4 b/tclconfig/tcl.m4
index 0689cab3da994068..ebe839e5553ba520 100644
--- a/tclconfig/tcl.m4
+++ b/tclconfig/tcl.m4
@@ -2400,7 +2400,7 @@ AC_DEFUN([TEA_TIME_HANDLER], [
AC_TRY_COMPILE([#include <time.h>],
[extern long timezone;
timezone += 1;
- exit (0);],
+ return 0;],
tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)])
if test $tcl_cv_timezone_long = yes ; then
AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
@@ -2412,7 +2412,7 @@ AC_DEFUN([TEA_TIME_HANDLER], [
AC_TRY_COMPILE([#include <time.h>],
[extern time_t timezone;
timezone += 1;
- exit (0);],
+ return 0;],
tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)])
if test $tcl_cv_timezone_time = yes ; then
AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
@@ -2452,17 +2452,17 @@ AC_DEFUN([TEA_BUGGY_STRTOD], [
double value;
value = strtod(infString, &term);
if ((term != infString) && (term[-1] == 0)) {
- exit(1);
+ return 1;
}
value = strtod(nanString, &term);
if ((term != nanString) && (term[-1] == 0)) {
- exit(1);
+ return 1;
}
value = strtod(spaceString, &term);
if (term == (spaceString+1)) {
- exit(1);
+ return 1;
}
- exit(0);
+ return 0;
}], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy,
tcl_cv_strtod_buggy=buggy)])
if test "$tcl_cv_strtod_buggy" = buggy; then

@ -5,8 +5,8 @@
Summary: A program-script interaction and testing utility
Name: expect
Version: %{majorver}
Release: 15%{?dist}
License: Public Domain
Release: 25%{?dist}
License: LicenseRef-Fedora-Public-Domain
URL: https://core.tcl.tk/expect/index
Source: http://downloads.sourceforge.net/%{name}/%{name}%{version}.tar.gz
Buildrequires: gcc tcl-devel autoconf automake chrpath
@ -46,6 +46,8 @@ Patch103: expect-5.45-passmass-su-full-path.patch
Patch104: expect-5.45-mkpasswd-man.patch
# Patch105: Fix error with -Werror=format-security
Patch105: expect-5.45-format-security.patch
Patch106: expect-configure-c99.patch
Patch107: expect-c99.patch
%description
Expect is a tcl application for automating and testing
@ -102,6 +104,8 @@ of expectk.
%patch103 -p1 -b .passmass-su-full-path
%patch104 -p1 -b .mkpasswd-man
%patch105 -p0 -b .format-security
%patch106 -p1 -b .configure-c99
%patch -P 107 -p1
# -pkgpath.patch touch configure.in
aclocal
autoconf
@ -184,12 +188,45 @@ chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libexpect%{version}.so
%{_mandir}/man1/tknewsbiff.1*
%changelog
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 5.45.4-15
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 5.45.4-25
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 5.45.4-14
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Fri Oct 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 5.45.4-24
- Rebuilt for MSVSphere 10
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 5.45.4-24
- Bump release for June 2024 mass rebuild
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.45.4-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.45.4-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jan 17 2024 Florian Weimer <fweimer@redhat.com> - 5.45.4-21
- Use Tcl 8.4 channel type (GCC 14 compatibility)
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.45.4-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Mar 29 2023 Vitezslav Crhonek <vcrhonek@redhat.com> - 5.45.4-19
- SPDX migration
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.45.4-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Nov 18 2022 Florian Weimer <fweimer@redhat.com> - 5.45.4-17
- Update configure for building in strict C99 mode
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.45.4-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.45.4-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.45.4-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.45.4-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

Loading…
Cancel
Save