diff options
| author | Ross Burton <ross.burton@arm.com> | 2024-06-18 11:14:12 +0000 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2024-07-03 06:28:37 -0700 |
| commit | 3b11fd8602f304d074b25c04f8bbd0eac9cc396d (patch) | |
| tree | 2cc45fe729c53c816c6d67cafb9181567fad78be /meta/recipes-devtools/expect | |
| parent | e7dbf1a8606b77f483d5eb9af60ff077f427b52a (diff) | |
| download | poky-3b11fd8602f304d074b25c04f8bbd0eac9cc396d.tar.gz | |
expect: fix configure with GCC 14
The configure script has many fragments that fail to compile with GCC 14,
take a patch submitted upstream to fix these issues.
(From OE-Core rev: 5c6630e61ad85a4bf9eecd94005e14f0e34df463)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 5c21ca789c288662aa3d307b30813cd03cc8c158)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-devtools/expect')
| -rw-r--r-- | meta/recipes-devtools/expect/expect/expect-configure-c99.patch | 201 | ||||
| -rw-r--r-- | meta/recipes-devtools/expect/expect_5.45.4.bb | 1 |
2 files changed, 202 insertions, 0 deletions
diff --git a/meta/recipes-devtools/expect/expect/expect-configure-c99.patch b/meta/recipes-devtools/expect/expect/expect-configure-c99.patch new file mode 100644 index 0000000000..09bf180df7 --- /dev/null +++ b/meta/recipes-devtools/expect/expect/expect-configure-c99.patch | |||
| @@ -0,0 +1,201 @@ | |||
| 1 | Avoid calling exit without declaring the function. | ||
| 2 | |||
| 3 | Add missing <string.h> include for memcpy. | ||
| 4 | |||
| 5 | Use AC_TYPE_SIGNAL to fix REARM_SIG check. Add missing includes. | ||
| 6 | |||
| 7 | Fix various implicit int return types of main. | ||
| 8 | |||
| 9 | Upstream-Status: Submitted [https://sourceforge.net/p/expect/patches/24/] | ||
| 10 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 11 | |||
| 12 | diff --git a/configure.in b/configure.in | ||
| 13 | index 51558fa14d2bcf7e..055c88fbd8797eaa 100755 | ||
| 14 | --- a/configure.in | ||
| 15 | +++ b/configure.in | ||
| 16 | @@ -452,7 +452,11 @@ AC_CHECK_FUNC(siglongjmp, AC_DEFINE(HAVE_SIGLONGJMP)) | ||
| 17 | # because Unixware 2.0 handles it specially and refuses to compile | ||
| 18 | # autoconf's automatic test that is a call with no arguments | ||
| 19 | AC_MSG_CHECKING([for memcpy]) | ||
| 20 | -AC_TRY_LINK(,[ | ||
| 21 | +AC_TRY_LINK([ | ||
| 22 | +#ifdef HAVE_STRING_H | ||
| 23 | +#include <string.h> | ||
| 24 | +#endif | ||
| 25 | +],[ | ||
| 26 | char *s1, *s2; | ||
| 27 | memcpy(s1,s2,0); | ||
| 28 | ], | ||
| 29 | @@ -469,6 +473,7 @@ memcpy(s1,s2,0); | ||
| 30 | AC_MSG_CHECKING([if WNOHANG requires _POSIX_SOURCE]) | ||
| 31 | AC_TRY_RUN([ | ||
| 32 | #include <sys/wait.h> | ||
| 33 | +int | ||
| 34 | main() { | ||
| 35 | #ifndef WNOHANG | ||
| 36 | return 0; | ||
| 37 | @@ -489,6 +494,7 @@ rm -rf wnohang | ||
| 38 | AC_TRY_RUN([ | ||
| 39 | #include <stdio.h> | ||
| 40 | #include <sys/wait.h> | ||
| 41 | +int | ||
| 42 | main() { | ||
| 43 | #ifdef WNOHANG | ||
| 44 | FILE *fp = fopen("wnohang","w"); | ||
| 45 | @@ -527,16 +533,21 @@ else | ||
| 46 | AC_DEFINE(SELECT_MASK_TYPE, fd_set) | ||
| 47 | fi | ||
| 48 | |||
| 49 | -dnl # Check for the data type of the function used in signal(). This | ||
| 50 | -dnl # must be before the test for rearming. | ||
| 51 | -dnl # echo checking return type of signal handlers | ||
| 52 | -dnl AC_HEADER_EGREP([(void|sighandler_t).*signal], signal.h, retsigtype=void,AC_DEFINE(RETSIGTYPE, int) retsigtype=int) | ||
| 53 | +AC_TYPE_SIGNAL | ||
| 54 | |||
| 55 | # FIXME: check if alarm exists | ||
| 56 | AC_MSG_CHECKING([if signals need to be re-armed]) | ||
| 57 | AC_TRY_RUN([ | ||
| 58 | #include <signal.h> | ||
| 59 | -#define RETSIGTYPE $retsigtype | ||
| 60 | +#ifdef HAVE_STDLIB_H | ||
| 61 | +# include <stdlib.h> | ||
| 62 | +#endif | ||
| 63 | +#ifdef HAVE_UNISTD_H | ||
| 64 | +# include <unistd.h> | ||
| 65 | +#endif | ||
| 66 | +#ifndef NO_SYS_WAIT_H | ||
| 67 | +# include <sys/wait.h> | ||
| 68 | +#endif | ||
| 69 | |||
| 70 | int signal_rearms = 0; | ||
| 71 | |||
| 72 | @@ -553,6 +564,7 @@ int n; | ||
| 73 | signal_rearms++; | ||
| 74 | } | ||
| 75 | |||
| 76 | +int | ||
| 77 | main() | ||
| 78 | { | ||
| 79 | signal(SIGINT,parent_sigint_handler); | ||
| 80 | @@ -714,10 +726,11 @@ fi | ||
| 81 | AC_MSG_CHECKING([for struct sgttyb]) | ||
| 82 | AC_TRY_RUN([ | ||
| 83 | #include <sgtty.h> | ||
| 84 | +int | ||
| 85 | main() | ||
| 86 | { | ||
| 87 | struct sgttyb tmp; | ||
| 88 | - exit(0); | ||
| 89 | + return 0; | ||
| 90 | }], | ||
| 91 | AC_MSG_RESULT(yes) | ||
| 92 | AC_DEFINE(HAVE_SGTTYB) | ||
| 93 | @@ -738,10 +751,11 @@ if test $mach -eq 0 ; then | ||
| 94 | # pty_termios.c is set up to handle pty_termio. | ||
| 95 | AC_MSG_CHECKING([for struct termio]) | ||
| 96 | AC_TRY_RUN([#include <termio.h> | ||
| 97 | + int | ||
| 98 | main() | ||
| 99 | { | ||
| 100 | struct termio tmp; | ||
| 101 | - exit(0); | ||
| 102 | + return 0; | ||
| 103 | }], | ||
| 104 | AC_DEFINE(HAVE_TERMIO) | ||
| 105 | PTY_TYPE=termios | ||
| 106 | @@ -760,10 +774,11 @@ if test $mach -eq 0 ; then | ||
| 107 | # include <inttypes.h> | ||
| 108 | # endif | ||
| 109 | # include <termios.h> | ||
| 110 | + int | ||
| 111 | main() | ||
| 112 | { | ||
| 113 | struct termios tmp; | ||
| 114 | - exit(0); | ||
| 115 | + return 0; | ||
| 116 | }], | ||
| 117 | AC_DEFINE(HAVE_TERMIOS) | ||
| 118 | PTY_TYPE=termios | ||
| 119 | @@ -782,6 +797,7 @@ AC_TRY_RUN([ | ||
| 120 | #include <inttypes.h> | ||
| 121 | #endif | ||
| 122 | #include <termios.h> | ||
| 123 | +int | ||
| 124 | main() { | ||
| 125 | #if defined(TCGETS) || defined(TCGETA) | ||
| 126 | return 0; | ||
| 127 | @@ -804,6 +820,7 @@ AC_TRY_RUN([ | ||
| 128 | #include <inttypes.h> | ||
| 129 | #endif | ||
| 130 | #include <termios.h> | ||
| 131 | +int | ||
| 132 | main() { | ||
| 133 | #ifdef TIOCGWINSZ | ||
| 134 | return 0; | ||
| 135 | @@ -823,6 +840,7 @@ main() { | ||
| 136 | AC_MSG_CHECKING([for Cray-style ptys]) | ||
| 137 | SETUID=":" | ||
| 138 | AC_TRY_RUN([ | ||
| 139 | +int | ||
| 140 | main(){ | ||
| 141 | #ifdef CRAY | ||
| 142 | return 0; | ||
| 143 | @@ -878,12 +896,13 @@ AC_MSG_CHECKING([for SV-style timezone]) | ||
| 144 | AC_TRY_RUN([ | ||
| 145 | extern char *tzname[2]; | ||
| 146 | extern int daylight; | ||
| 147 | +int | ||
| 148 | main() | ||
| 149 | { | ||
| 150 | int *x = &daylight; | ||
| 151 | char **y = tzname; | ||
| 152 | |||
| 153 | - exit(0); | ||
| 154 | + return 0; | ||
| 155 | }], | ||
| 156 | AC_DEFINE(HAVE_SV_TIMEZONE) | ||
| 157 | AC_MSG_RESULT(yes), | ||
| 158 | diff --git a/tclconfig/tcl.m4 b/tclconfig/tcl.m4 | ||
| 159 | index 0689cab3da994068..ebe839e5553ba520 100644 | ||
| 160 | --- a/tclconfig/tcl.m4 | ||
| 161 | +++ b/tclconfig/tcl.m4 | ||
| 162 | @@ -2400,7 +2400,7 @@ AC_DEFUN([TEA_TIME_HANDLER], [ | ||
| 163 | AC_TRY_COMPILE([#include <time.h>], | ||
| 164 | [extern long timezone; | ||
| 165 | timezone += 1; | ||
| 166 | - exit (0);], | ||
| 167 | + return 0;], | ||
| 168 | tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)]) | ||
| 169 | if test $tcl_cv_timezone_long = yes ; then | ||
| 170 | AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?]) | ||
| 171 | @@ -2412,7 +2412,7 @@ AC_DEFUN([TEA_TIME_HANDLER], [ | ||
| 172 | AC_TRY_COMPILE([#include <time.h>], | ||
| 173 | [extern time_t timezone; | ||
| 174 | timezone += 1; | ||
| 175 | - exit (0);], | ||
| 176 | + return 0;], | ||
| 177 | tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)]) | ||
| 178 | if test $tcl_cv_timezone_time = yes ; then | ||
| 179 | AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?]) | ||
| 180 | @@ -2452,17 +2452,17 @@ AC_DEFUN([TEA_BUGGY_STRTOD], [ | ||
| 181 | double value; | ||
| 182 | value = strtod(infString, &term); | ||
| 183 | if ((term != infString) && (term[-1] == 0)) { | ||
| 184 | - exit(1); | ||
| 185 | + return 1; | ||
| 186 | } | ||
| 187 | value = strtod(nanString, &term); | ||
| 188 | if ((term != nanString) && (term[-1] == 0)) { | ||
| 189 | - exit(1); | ||
| 190 | + return 1; | ||
| 191 | } | ||
| 192 | value = strtod(spaceString, &term); | ||
| 193 | if (term == (spaceString+1)) { | ||
| 194 | - exit(1); | ||
| 195 | + return 1; | ||
| 196 | } | ||
| 197 | - exit(0); | ||
| 198 | + return 0; | ||
| 199 | }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy, | ||
| 200 | tcl_cv_strtod_buggy=buggy)]) | ||
| 201 | if test "$tcl_cv_strtod_buggy" = buggy; then | ||
diff --git a/meta/recipes-devtools/expect/expect_5.45.4.bb b/meta/recipes-devtools/expect/expect_5.45.4.bb index 18904ebc10..174b35ec73 100644 --- a/meta/recipes-devtools/expect/expect_5.45.4.bb +++ b/meta/recipes-devtools/expect/expect_5.45.4.bb | |||
| @@ -27,6 +27,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \ | |||
| 27 | file://0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch \ | 27 | file://0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch \ |
| 28 | file://0001-fixline1-fix-line-1.patch \ | 28 | file://0001-fixline1-fix-line-1.patch \ |
| 29 | file://0001-Add-prototype-to-function-definitions.patch \ | 29 | file://0001-Add-prototype-to-function-definitions.patch \ |
| 30 | file://expect-configure-c99.patch \ | ||
| 30 | file://run-ptest \ | 31 | file://run-ptest \ |
| 31 | " | 32 | " |
| 32 | SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2" | 33 | SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2" |
