From 5da09d08428079739170bd2b64db4997b04b38ec Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Tue, 29 Oct 2019 15:03:19 +0200 Subject: Minor changes * src/gdbmconst.h: Don't redefine SIZE_T_MAX * src/gdbmtool.c: Likewise. Include , instead of * configure.ac: Don't check for termios.h * tests/closerr.c: Minor fixes. --- configure.ac | 2 +- src/gdbmconst.h | 4 +++- src/gdbmtool.c | 6 +----- tests/closerr.c | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 4302526..0f0ca0a 100644 --- a/configure.ac +++ b/configure.ac @@ -96,7 +96,7 @@ dnl Internationalization macros. AM_GNU_GETTEXT([external], [need-ngettext]) AM_GNU_GETTEXT_VERSION(0.18) -AC_CHECK_HEADERS([sys/file.h sys/termios.h string.h locale.h getopt.h]) +AC_CHECK_HEADERS([sys/file.h string.h locale.h getopt.h]) AC_CHECK_LIB(dbm, main) AC_CHECK_LIB(ndbm, main) diff --git a/src/gdbmconst.h b/src/gdbmconst.h index d30da3a..5ce182a 100644 --- a/src/gdbmconst.h +++ b/src/gdbmconst.h @@ -54,5 +54,7 @@ /* The size of the bucket cache. */ #define DEFAULT_CACHESIZE 100 +#ifndef SIZE_T_MAX /* Maximum size representable by a size_t variable */ -#define SIZE_T_MAX ((size_t)-1) +# define SIZE_T_MAX ((size_t)-1) +#endif diff --git a/src/gdbmtool.c b/src/gdbmtool.c index 9bd23ea..ceffaef 100644 --- a/src/gdbmtool.c +++ b/src/gdbmtool.c @@ -24,9 +24,7 @@ #include #include #include -#ifdef HAVE_SYS_TERMIOS_H -# include -#endif +#include #include #ifdef HAVE_LOCALE_H # include @@ -38,8 +36,6 @@ datum key_data; /* Current key */ datum return_data; /* Current data */ int open_mode; /* Default open mode */ -#define SIZE_T_MAX ((size_t)-1) - unsigned input_line; diff --git a/tests/closerr.c b/tests/closerr.c index 39fb0b7..b86d74f 100644 --- a/tests/closerr.c +++ b/tests/closerr.c @@ -21,6 +21,7 @@ #include #include #include +#include #include "gdbm.h" int @@ -28,7 +29,6 @@ main (int argc, char **argv) { GDBM_FILE dbf; char dbname[] = "junk.gdbm"; - int rc; assert (argc == 1); -- cgit v1.2.1