gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] gawk branch, master, updated. gawk-4.1.0-4796-gbdc68a30


From: Arnold Robbins
Subject: [SCM] gawk branch, master, updated. gawk-4.1.0-4796-gbdc68a30
Date: Tue, 19 Jul 2022 05:52:06 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, master has been updated
       via  bdc68a30182eaef8d70edd7fc9a0fa5a9afe0f5b (commit)
      from  48557ded75a7dad3ca5ddea13dfad54496722eed (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=bdc68a30182eaef8d70edd7fc9a0fa5a9afe0f5b

commit bdc68a30182eaef8d70edd7fc9a0fa5a9afe0f5b
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Tue Jul 19 12:51:42 2022 +0300

    Add checks and handle missing strsignal function.

diff --git a/ChangeLog b/ChangeLog
index ae200135..30ea0b73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-07-19         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * main.c (catchsig): Adjust error message in cant_happen() call.
+       * configure.ac: Add check for strsignal function. It doesn't
+       exist on z/OS.
+       * replace.c: Include missing_d/strsignal.c if needed.
+
 2022-07-18         Arnold D. Robbins     <arnold@skeeve.com>
 
        * main.c (main): Don't use fatal() if pma_init() fails, apparently
diff --git a/configh.in b/configh.in
index 2cfb984a..c23006e9 100644
--- a/configh.in
+++ b/configh.in
@@ -240,6 +240,9 @@
 /* Define to 1 if you have the <stropts.h> header file. */
 #undef HAVE_STROPTS_H
 
+/* Define to 1 if you have the `strsignal' function. */
+#undef HAVE_STRSIGNAL
+
 /* Define to 1 if you have the `strtod' function. */
 #undef HAVE_STRTOD
 
diff --git a/configure b/configure
index 7bf938f5..341ac8f0 100755
--- a/configure
+++ b/configure
@@ -12229,6 +12229,12 @@ if test "x$ac_cv_func_fmod" = xyes
 then :
   printf "%s\n" "#define HAVE_FMOD 1" >>confdefs.h
 
+fi
+ac_fn_c_check_func "$LINENO" "fwrite_unlocked" "ac_cv_func_fwrite_unlocked"
+if test "x$ac_cv_func_fwrite_unlocked" = xyes
+then :
+  printf "%s\n" "#define HAVE_FWRITE_UNLOCKED 1" >>confdefs.h
+
 fi
 ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror"
 if test "x$ac_cv_func_gai_strerror" = xyes
@@ -12253,12 +12259,6 @@ if test "x$ac_cv_func_grantpt" = xyes
 then :
   printf "%s\n" "#define HAVE_GRANTPT 1" >>confdefs.h
 
-fi
-ac_fn_c_check_func "$LINENO" "fwrite_unlocked" "ac_cv_func_fwrite_unlocked"
-if test "x$ac_cv_func_fwrite_unlocked" = xyes
-then :
-  printf "%s\n" "#define HAVE_FWRITE_UNLOCKED 1" >>confdefs.h
-
 fi
 ac_fn_c_check_func "$LINENO" "isascii" "ac_cv_func_isascii"
 if test "x$ac_cv_func_isascii" = xyes
@@ -12379,12 +12379,24 @@ if test "x$ac_cv_func_snprintf" = xyes
 then :
   printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
 
+fi
+ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
+if test "x$ac_cv_func_strcasecmp" = xyes
+then :
+  printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
+
 fi
 ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr"
 if test "x$ac_cv_func_strchr" = xyes
 then :
   printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h
 
+fi
+ac_fn_c_check_func "$LINENO" "strcoll" "ac_cv_func_strcoll"
+if test "x$ac_cv_func_strcoll" = xyes
+then :
+  printf "%s\n" "#define HAVE_STRCOLL 1" >>confdefs.h
+
 fi
 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
 if test "x$ac_cv_func_strerror" = xyes
@@ -12397,12 +12409,6 @@ if test "x$ac_cv_func_strftime" = xyes
 then :
   printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
 
-fi
-ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
-if test "x$ac_cv_func_strcasecmp" = xyes
-then :
-  printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
-
 fi
 ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
 if test "x$ac_cv_func_strncasecmp" = xyes
@@ -12410,10 +12416,10 @@ then :
   printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
 
 fi
-ac_fn_c_check_func "$LINENO" "strcoll" "ac_cv_func_strcoll"
-if test "x$ac_cv_func_strcoll" = xyes
+ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
+if test "x$ac_cv_func_strsignal" = xyes
 then :
-  printf "%s\n" "#define HAVE_STRCOLL 1" >>confdefs.h
+  printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
 
 fi
 ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod"
diff --git a/configure.ac b/configure.ac
index 863bc317..800b0866 100644
--- a/configure.ac
+++ b/configure.ac
@@ -312,17 +312,13 @@ osf1)     : ;;
 esac
 
 # Need the check for mkstemp and tmpfile for missing_d/snprintf.c.
-AC_CHECK_FUNCS(__etoa_l atexit btowc fmod gai_strerror \
-       getgrent getgroups grantpt \
-       fwrite_unlocked \
-       isascii isblank iswctype iswlower iswupper mbrlen \
-       memcmp memcpy memcpy_ulong memmove memset \
-       memset_ulong mkstemp mtrace \
-       posix_openpt setenv setlocale setsid sigprocmask \
-       snprintf strchr \
-       strerror strftime strcasecmp strncasecmp strcoll strtod strtoul \
-       system timegm tmpfile towlower towupper tzset usleep waitpid wcrtomb \
-       wcscoll wctype)
+AC_CHECK_FUNCS(__etoa_l atexit btowc fmod fwrite_unlocked gai_strerror \
+       getgrent getgroups grantpt isascii isblank iswctype iswlower iswupper \
+       mbrlen memcmp memcpy memcpy_ulong memmove memset memset_ulong \
+       mkstemp mtrace posix_openpt setenv setlocale setsid sigprocmask \
+       snprintf strcasecmp strchr strcoll strerror strftime strncasecmp \
+       strsignal strtod strtoul system timegm tmpfile towlower towupper \
+       tzset usleep waitpid wcrtomb wcscoll wctype)
 dnl this check is for both mbrtowc and the mbstate_t type, which is good
 AC_FUNC_MBRTOWC
 
diff --git a/main.c b/main.c
index b0c4a1e2..ca913844 100644
--- a/main.c
+++ b/main.c
@@ -1317,7 +1317,7 @@ catchsig(int sig)
                fflush(NULL);
                abort();
        } else
-               cant_happen("unexpected signal, number %s", strsignal(sig));
+               cant_happen("unexpected signal, number %d (%s)", sig, 
strsignal(sig));
        /* NOTREACHED */
 }
 
diff --git a/missing_d/ChangeLog b/missing_d/ChangeLog
index 41716dbc..fbad7084 100644
--- a/missing_d/ChangeLog
+++ b/missing_d/ChangeLog
@@ -1,3 +1,7 @@
+2022-07-19         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * strsignal.c: New file.
+
 2022-07-14         Arnold D. Robbins     <arnold@skeeve.com>
 
        * snprintf.c: Update copyright.
diff --git a/missing_d/strsignal.c b/missing_d/strsignal.c
new file mode 100644
index 00000000..6ad51dee
--- /dev/null
+++ b/missing_d/strsignal.c
@@ -0,0 +1,11 @@
+/* strsignal --- replacement version for systems that don't have it */
+
+const char*
+strsignal(int signal)
+{
+       static char buffer[100];
+
+       sprintf(buffer, "signal %d", signal);
+
+       return buffer;
+}
diff --git a/replace.c b/replace.c
index 05c5d1ad..2ff76a37 100644
--- a/replace.c
+++ b/replace.c
@@ -114,3 +114,7 @@
 #ifndef HAVE_STRCOLL
 #include "missing_d/strcoll.c"
 #endif
+
+#ifndef HAVE_STRSIGNAL
+#include "missing_d/strsignal.c"
+#endif

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog             |  7 +++++++
 configh.in            |  3 +++
 configure             | 36 +++++++++++++++++++++---------------
 configure.ac          | 18 +++++++-----------
 main.c                |  2 +-
 missing_d/ChangeLog   |  4 ++++
 missing_d/strsignal.c | 11 +++++++++++
 replace.c             |  4 ++++
 8 files changed, 58 insertions(+), 27 deletions(-)
 create mode 100644 missing_d/strsignal.c


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]