From 408fc4a9c479b5802e726da10ba9a3ab78c00eb1 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sun, 4 Aug 2024 16:52:29 -0700 Subject: [PATCH] maint: depend on Gnulib's limits-h * bootstrap.conf (gnulib_modules): Add limits-h. * gzip.c (CHAR_BIT): Remove definition. * unlzh.c: Include limits.h. (CHAR_BIT, UCHAR_MAX): Remove definitions. * util.c (CHAR_BIT): Remove definition. --- bootstrap.conf | 1 + gzip.c | 4 ---- unlzh.c | 9 +-------- util.c | 4 ---- 4 files changed, 2 insertions(+), 16 deletions(-) diff --git a/bootstrap.conf b/bootstrap.conf index c373ee6..2654b04 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -43,6 +43,7 @@ intprops inttypes largefile lib-ignore +limits-h lstat maintainer-makefile malloc-gnu diff --git a/gzip.c b/gzip.c index 3e0a642..5cd1586 100644 --- a/gzip.c +++ b/gzip.c @@ -106,10 +106,6 @@ static char const *const license_msg[] = { # define SEEK_END 2 #endif -#ifndef CHAR_BIT -# define CHAR_BIT 8 -#endif - #ifdef off_t off_t lseek (int fd, off_t offset, int whence); #endif diff --git a/unlzh.c b/unlzh.c index 25c05e3..3320196 100644 --- a/unlzh.c +++ b/unlzh.c @@ -4,6 +4,7 @@ */ #include +#include #include #include "tailor.h" @@ -35,14 +36,6 @@ static void make_table (int nchar, uch bitlen[], int tablebits, ush table[]); #define DICBIT 13 /* 12(-lh4-) or 13(-lh5-) */ #define DICSIZ ((unsigned) 1 << DICBIT) -#ifndef CHAR_BIT -# define CHAR_BIT 8 -#endif - -#ifndef UCHAR_MAX -# define UCHAR_MAX 255 -#endif - #define BITBUFSIZ (CHAR_BIT * 2 * sizeof(char)) /* Do not use CHAR_BIT * sizeof(bitbuf), does not work on machines * for which short is not on 16 bits (Cray). diff --git a/util.c b/util.c index 8835d2f..ee94337 100644 --- a/util.c +++ b/util.c @@ -32,10 +32,6 @@ #include #include -#ifndef CHAR_BIT -# define CHAR_BIT 8 -#endif - #ifndef EPIPE # define EPIPE 0 #endif -- 2.11.4.GIT