mirror of
https://https.git.savannah.gnu.org/git/groff.git
synced 2026-01-26 15:39:07 +00:00
Rely on gnulib for strerror() if necessary.
* bootstrap.conf: Add "strerror" to `gnulib_modules`. * configure.ac: Drop "sterror" from `AC_REPLACE_FUNCS`; we don't need Autoconf's replacement if we've got gnulib's. * Makefile.am: Drop mention of function/macro in comment. * src/include/lib.h: Drop C preprocessor conditional logic. * src/roff/groff/pipeline.c: Drop fallback definition. Let existing "<config.h"> inclusion do the work, and include "<string.h>" unconditionally.
This commit is contained in:
parent
4186c2bb27
commit
949b091c22
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
2024-11-29 G. Branden Robinson <g.branden.robinson@gmail.com>
|
||||
|
||||
Rely on gnulib for `strerror()` if necessary.
|
||||
|
||||
* bootstrap.conf: Add "strerror" to `gnulib_modules`.
|
||||
* configure.ac: Drop "sterror" from `AC_REPLACE_FUNCS`; we don't
|
||||
need Autoconf's replacement if we've got gnulib's.
|
||||
* Makefile.am: Drop mention of function/macro in comment.
|
||||
* src/include/lib.h: Drop C preprocessor conditional logic.
|
||||
* src/roff/groff/pipeline.c: Drop fallback definition. Let
|
||||
existing "<config.h"> inclusion do the work, and include
|
||||
"<string.h>" unconditionally.
|
||||
|
||||
2024-11-29 G. Branden Robinson <g.branden.robinson@gmail.com>
|
||||
|
||||
[troff]: Align with modern groff conventions.
|
||||
|
||||
@ -307,7 +307,6 @@ man7dir=$(manroot)/man$(man7ext)
|
||||
# HAVE_SETLOCALE if you have setlocale()
|
||||
# HAVE_STRCASECMP if you have strcasecmp()
|
||||
# HAVE_STRNCASECMP if you have strncasecmp()
|
||||
# HAVE_STRERROR if you have strerror()
|
||||
# HAVE_STRSEP if you have strsep()
|
||||
# HAVE_STRTOL if you have strtol()
|
||||
# HAVE_SYMLINK if you have symlink()
|
||||
|
||||
@ -49,6 +49,7 @@ gnulib_modules="
|
||||
stdbool-c99
|
||||
stdckdint
|
||||
stdint
|
||||
strerror
|
||||
sys_wait
|
||||
"
|
||||
|
||||
|
||||
@ -130,7 +130,7 @@ AC_FUNC_MMAP
|
||||
saved_libs="$LIBS"
|
||||
LIBS="$LIBS $LIBC $LIBM"
|
||||
AC_REPLACE_FUNCS([fmod getcwd putenv strcasecmp \
|
||||
strerror strncasecmp strtol])
|
||||
strncasecmp strtol])
|
||||
LIBS="$saved_libs"
|
||||
AC_CHECK_FUNCS([gettimeofday isatty kill rename setlocale strdup \
|
||||
strsep])
|
||||
|
||||
@ -25,9 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifndef HAVE_STRERROR
|
||||
char *strerror(int);
|
||||
#endif
|
||||
const char *i_to_a(int);
|
||||
const char *ui_to_a(unsigned int);
|
||||
|
||||
@ -25,15 +25,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <string.h> // strerror(), strsignal()
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRERROR
|
||||
#include <string.h>
|
||||
#else
|
||||
extern char *strerror();
|
||||
#endif
|
||||
|
||||
#ifdef _POSIX_VERSION
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user