gbranden pushed a commit to branch master in repository groff. commit d178bc7c57a19230276e46a78adecd0275e5d626 Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Thu Jul 10 13:44:25 2025 -0500
Retire our `strerror()` implementation. It was specified in ANSI C89, we require ISO C99 anyway, and on top of that we use gnulib's "strerror" module to patch any egregious hole of that name on any host system. * src/libs/libgroff/strerror.c: Delete it. * src/libs/libgroff/libgroff.am (EXTRA_DIST): Stop shipping it. Continues fixing Savannah #66518. --- ChangeLog | 12 ++++++++++ src/libs/libgroff/libgroff.am | 1 - src/libs/libgroff/strerror.c | 52 ------------------------------------------- 3 files changed, 12 insertions(+), 53 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3be1d09e0..f04f1660c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2025-07-10 G. Branden Robinson <g.branden.robin...@gmail.com> + + Retire our `strerror()` implementation. It was specified in + ANSI C89, we require ISO C99 anyway, and on top of that we use + gnulib's "strerror" module to patch any egregious hole of that + name on any host system. + + * src/libs/libgroff/strerror.c: Delete it. + * src/libs/libgroff/libgroff.am (EXTRA_DIST): Stop shipping it. + + Continues fixing Savannah #66518. + 2025-07-10 G. Branden Robinson <g.branden.robin...@gmail.com> * [grn,soelim,tbl]: Add tests verifying pass-through of 8-bit diff --git a/src/libs/libgroff/libgroff.am b/src/libs/libgroff/libgroff.am index 7d8e517d8..2631c7c6b 100644 --- a/src/libs/libgroff/libgroff.am +++ b/src/libs/libgroff/libgroff.am @@ -84,7 +84,6 @@ EXTRA_DIST += \ src/libs/libgroff/fmod.c \ src/libs/libgroff/getcwd.c \ src/libs/libgroff/putenv.c \ - src/libs/libgroff/strerror.c \ src/libs/libgroff/strtol.c \ src/libs/libgroff/config.charset \ src/libs/libgroff/ref-add.sin \ diff --git a/src/libs/libgroff/strerror.c b/src/libs/libgroff/strerror.c deleted file mode 100644 index c6c3475d1..000000000 --- a/src/libs/libgroff/strerror.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 1989-2020 Free Software Foundation, Inc. - Written by James Clark (j...@jclark.com) - -This file is part of groff. - -groff is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation, either version 3 of the License, or -(at your option) any later version. - -groff 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 General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <stdio.h> -#include <errno.h> -#include <stdlib.h> /* for MinGW */ - -#define INT_DIGITS 19 /* enough for 64 bit integer */ - -#ifndef HAVE_SYS_NERR -extern int sys_nerr; -#endif -#ifndef HAVE_SYS_ERRLIST -extern char *sys_errlist[]; -#endif - -char *strerror(n) - int n; -{ - static char buf[sizeof("Error ") + 1 + INT_DIGITS]; - if (n >= 0 && n < sys_nerr && sys_errlist[n] != 0) - return sys_errlist[n]; - else { - sprintf(buf, "Error %d", n); - return buf; - } -} - -// Local Variables: -// fill-column: 72 -// mode: C++ -// End: -// vim: set cindent noexpandtab shiftwidth=2 textwidth=72: _______________________________________________ groff-commit mailing list groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit