gawk-diffs
[Top][All Lists]
Advanced

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

[SCM] gawk branch, feature/gnulib-pcc, updated. gawk-4.1.0-5072-g533feb5


From: Arnold Robbins
Subject: [SCM] gawk branch, feature/gnulib-pcc, updated. gawk-4.1.0-5072-g533feb5c
Date: Fri, 30 Jun 2023 04:04:49 -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, feature/gnulib-pcc has been updated
       via  533feb5cb4a22dc34ffebf1c34d9bbf7c079bb6a (commit)
      from  743fb01b967ff4052d867d1bcd99945bd465b17b (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=533feb5cb4a22dc34ffebf1c34d9bbf7c079bb6a

commit 533feb5cb4a22dc34ffebf1c34d9bbf7c079bb6a
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Wed Jun 14 18:27:40 2023 -0400

    Forgot to add a file.

diff --git a/missing_d/reallocarray.c b/missing_d/reallocarray.c
new file mode 100644
index 00000000..8c99250f
--- /dev/null
+++ b/missing_d/reallocarray.c
@@ -0,0 +1,38 @@
+/* reallocarray function that is glibc compatible.
+
+   Copyright (C) 2017-2023 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* written by Darshit Shah */
+
+#include <config.h>
+
+#include <stdckdint.h>
+#include <stdlib.h>
+#include <errno.h>
+
+void *
+reallocarray (void *ptr, size_t nmemb, size_t size)
+{
+  size_t nbytes;
+  if (ckd_mul (&nbytes, nmemb, size))
+    {
+      errno = ENOMEM;
+      return NULL;
+    }
+
+  /* Rely on the semantics of GNU realloc.  */
+  return realloc (ptr, nbytes);
+}

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

Summary of changes:
 support/ialloc.c => missing_d/reallocarray.c | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)
 copy support/ialloc.c => missing_d/reallocarray.c (60%)


hooks/post-receive
-- 
gawk



reply via email to

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