aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-10-29 15:03:19 +0200
committerSergey Poznyakoff <gray@gnu.org>2019-10-29 15:08:50 +0200
commit5da09d08428079739170bd2b64db4997b04b38ec (patch)
tree1ea253d38b7163668e4518ad9e6dddc988f7baa0
parent155c3856ce84ec209f7648baef5b00a63ce77ce5 (diff)
downloadgdbm-5da09d08428079739170bd2b64db4997b04b38ec.tar.gz
gdbm-5da09d08428079739170bd2b64db4997b04b38ec.tar.bz2
Minor changes
* src/gdbmconst.h: Don't redefine SIZE_T_MAX * src/gdbmtool.c: Likewise. Include <termios.h>, instead of <sys/termios.h> * configure.ac: Don't check for termios.h * tests/closerr.c: Minor fixes.
-rw-r--r--configure.ac2
-rw-r--r--src/gdbmconst.h4
-rw-r--r--src/gdbmtool.c6
-rw-r--r--tests/closerr.c2
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
@@ -98,3 +98,3 @@ 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])
diff --git a/src/gdbmconst.h b/src/gdbmconst.h
index d30da3a..5ce182a 100644
--- a/src/gdbmconst.h
+++ b/src/gdbmconst.h
@@ -56,3 +56,5 @@
+#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
@@ -26,5 +26,3 @@
#include <sys/ioctl.h>
-#ifdef HAVE_SYS_TERMIOS_H
-# include <sys/termios.h>
-#endif
+#include <termios.h>
#include <stdarg.h>
@@ -40,4 +38,2 @@ 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
@@ -23,2 +23,3 @@
#include <assert.h>
+#include <unistd.h>
#include "gdbm.h"
@@ -30,3 +31,2 @@ main (int argc, char **argv)
char dbname[] = "junk.gdbm";
- int rc;

Return to:

Send suggestions and report system problems to the System administrator.