--- configure.orig   2024-09-22 01:58:03
+++ configure  2024-09-22 01:58:06
@@ -7994,7 +7994,7 @@
 {
 extern long timezone;
 	    timezone += 1;
-	    exit (0);
+	    return (0);
   ;
   return 0;
 }
@@ -8030,7 +8030,7 @@
 {
 extern time_t timezone;
 		timezone += 1;
-		exit (0);
+		return (0);
   ;
   return 0;
 }
@@ -8791,7 +8791,9 @@
 $as_echo_n "checking for memcpy... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
+#if HAVE_STRING_H
+#include <string.h>
+#endif
 int
 main ()
 {
@@ -8831,7 +8833,7 @@
 /* end confdefs.h.  */
 
 #include <sys/wait.h>
-main() {
+int main() {
 #ifndef WNOHANG
   return 0;
 #else
@@ -8867,7 +8869,7 @@
 
 #include <stdio.h>
 #include <sys/wait.h>
-main() {
+int main() {
 #ifdef WNOHANG
   FILE *fp = fopen("wnohang","w");
   fprintf(fp,"%d",WNOHANG);
@@ -8935,7 +8937,10 @@
 /* end confdefs.h.  */
 
 #include <signal.h>
-#define RETSIGTYPE $retsigtype
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/wait.h>
 
 int signal_rearms = 0;
 
@@ -8952,7 +8957,7 @@
 signal_rearms++;
 }
 
-main()
+int main()
 {
   signal(SIGINT,parent_sigint_handler);
 
@@ -8966,7 +8971,7 @@
 
 		wait(&status);
 		unlink("core");
-		exit(signal_rearms);
+		return (signal_rearms);
 	}
 }
 _ACEOF
@@ -9234,10 +9239,10 @@
 /* end confdefs.h.  */
 
 #include <sgtty.h>
-main()
+int main()
 {
   struct sgttyb tmp;
-  exit(0);
+  return (0);
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
@@ -9274,7 +9279,7 @@
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <termio.h>
-  main()
+  int main()
   {
     struct termio tmp;
     exit(0);
@@ -9312,10 +9317,10 @@
 #  include <inttypes.h>
 #  endif
 #  include <termios.h>
-  main()
+  int main()
   {
     struct termios tmp;
-    exit(0);
+    return (0);
   }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
@@ -9350,7 +9355,7 @@
 #include <inttypes.h>
 #endif
 #include <termios.h>
-main() {
+int main() {
 #if defined(TCGETS) || defined(TCGETA)
   return 0;
 #else
@@ -9388,7 +9393,7 @@
 #include <inttypes.h>
 #endif
 #include <termios.h>
-main() {
+int main() {
 #ifdef TIOCGWINSZ
   return 0;
 #else
@@ -9423,7 +9428,7 @@
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-main(){
+int main(){
 #ifdef CRAY
   return 0;
 #else
@@ -9565,12 +9570,12 @@
 
 extern char *tzname[2];
 extern int daylight;
-main()
+int main()
 {
   int *x = &daylight;
   char **y = tzname;
 
-  exit(0);
+  return (0);
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
--- exp_chan.c.orig	2018-02-02 13:15:52.000000000 -0600
+++ exp_chan.c	2020-06-25 13:23:34.000000000 -0500
@@ -34,6 +37,7 @@
 #include "exp_rename.h"
 #include "exp_prog.h"
 #include "exp_command.h"
+#include "exp_event.h"
 #include "exp_log.h"
 #include "tcldbg.h" /* Dbg_StdinMode */
 
--- exp_clib.c.orig	2018-02-02 13:15:52.000000000 -0600
+++ exp_clib.c	2020-06-24 19:42:41.000000000 -0500
@@ -7,6 +7,9 @@
 would appreciate credit if this program or parts of it are used.
 */
 
+#include <unistd.h>
+void exp_init_tty();
+
 #include "expect_cf.h"
 #include <stdio.h>
 #include <setjmp.h>
--- exp_tty.h.orig	2020-06-24 19:16:15.000000000 -0500
+++ exp_tty.h	2020-06-24 19:17:09.000000000 -0500
@@ -18,6 +18,7 @@
 void exp_tty_raw(int set);
 void exp_tty_echo(int set);
 void exp_tty_break(Tcl_Interp *interp, int fd);
+int exp_tty_cooked_echo(Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo);
 int exp_tty_raw_noecho(Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo);
 int exp_israw(void);
 int exp_isecho(void);
--- exp_win.c.orig	2018-02-02 13:15:52.000000000 -0600
+++ exp_win.c	2020-06-24 19:27:52.000000000 -0500
@@ -39,9 +39,9 @@
 /* Sigh.  On AIX 2.3, termios.h exists but does not define TIOCGWINSZ */
 /* Instead, it has to come from ioctl.h.  However, As I said above, this */
 /* can't be cavalierly included on all machines, even when it exists. */
-#if defined(HAVE_TERMIOS) && !defined(HAVE_TIOCGWINSZ_IN_TERMIOS_H)
+/*  #if defined(HAVE_TERMIOS) && !defined(HAVE_TIOCGWINSZ_IN_TERMIOS_H) */
 #  include <sys/ioctl.h>
-#endif
+/*  #endif
 
 /* SCO defines window size structure in PTEM and TIOCGWINSZ in termio.h */
 /* Sigh... */
--- pty_termios.c.orig	2018-02-02 13:15:52.000000000 -0600
+++ pty_termios.c	2020-06-25 13:14:53.000000000 -0500
@@ -9,6 +9,7 @@
 
 #include <stdio.h>
 #include <signal.h>
+#include <util.h>
 
 #if defined(SIGCLD) && !defined(SIGCHLD)
 #define SIGCHLD SIGCLD
@@ -629,6 +630,8 @@
 #endif /* HAVE_PTYTRAP */
 }
 
+static char *		(*expErrnoMsg) _ANSI_ARGS_((int));
+
 int
 exp_getptyslave(
     int ttycopy,
