From 4e8d91565aac56b9a096a860294df9914273112a Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 21 May 1995 11:41:02 +0000 Subject: [PATCH] GNU text utilities --- lib/memchr.c | 8 ++------ lib/memmove.c | 4 ++++ lib/regex.c | 2 +- lib/xstrtol.c | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/memchr.c b/lib/memchr.c index 57f99735f..5114869ea 100644 --- a/lib/memchr.c +++ b/lib/memchr.c @@ -33,12 +33,8 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ # define __ptr_t char * #endif /* C++ or ANSI C. */ -#if defined (HAVE_STRING_H) || defined (_LIBC) -# include -#endif - -#if defined (HAVE_LIMIT_H) || defined (_LIBC) -# include +#if defined (HAVE_LIMITS_H) || defined (_LIBC) +# include #endif #define LONG_MAX_32_BITS 2147483647 diff --git a/lib/memmove.c b/lib/memmove.c index 7031ff24c..d7bdd7cd9 100644 --- a/lib/memmove.c +++ b/lib/memmove.c @@ -3,6 +3,10 @@ In the public domain. By David MacKenzie . */ +#ifdef HAVE_CONFIG_H +#include +#endif + void memmove (dest, source, length) char *dest; diff --git a/lib/regex.c b/lib/regex.c index 5a6d3a157..5a98c6c21 100644 --- a/lib/regex.c +++ b/lib/regex.c @@ -243,7 +243,7 @@ char *alloca (); destination) /* No need to do anything to free, after alloca. */ -#define REGEX_FREE(arg) (0) +#define REGEX_FREE(arg) ((void)0) /* Do nothing! But inhibit gcc warning. */ #endif /* not REGEX_MALLOC */ diff --git a/lib/xstrtol.c b/lib/xstrtol.c index 383225233..591493e50 100644 --- a/lib/xstrtol.c +++ b/lib/xstrtol.c @@ -2,10 +2,12 @@ #include #endif +#include "xstrtol.h" /* Get definition for __P before use. */ + #ifdef STDC_HEADERS #include #else -long int __strtol (const char *, char **, int base); +__unsigned long int __strtol __P ((const char *, char **, int base)); #endif #ifdef HAVE_STRING_H @@ -17,8 +19,8 @@ long int __strtol (const char *, char **, int base); # endif #endif +#define NDEBUG #include -/* FIXME: define NDEBUG before release. */ #include #ifndef errno @@ -37,8 +39,6 @@ extern int errno; #define LONG_MAX ((long int) (ULONG_MAX >> 1)) #endif -#include "xstrtol.h" - #define BKM_SCALE(x, scale_factor, error_return) \ do \ { \ -- 2.11.0