From: Jim Meyering Date: Sun, 21 May 1995 11:44:22 +0000 (+0000) Subject: merge with 1.11.1b X-Git-Tag: textutils-1_12_1~162 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f9311c20e369a10a5583e9236e8daafc69758a0;p=thirdparty%2Fcoreutils.git merge with 1.11.1b --- diff --git a/lib/memchr.c b/lib/memchr.c index 57f99735f3..5114869ea5 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 7031ff24cf..d7bdd7cd99 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/xstrtol.c b/lib/xstrtol.c index 383225233e..591493e50c 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 \ { \ diff --git a/old/textutils/ChangeLog b/old/textutils/ChangeLog index b297c32d5e..a01f565a51 100644 --- a/old/textutils/ChangeLog +++ b/old/textutils/ChangeLog @@ -1,5 +1,16 @@ Sat May 20 06:44:14 1995 Jim Meyering (meyering@comco.com) + * join.c (ADD_FIELD): Declare in K&R style, not ANSI. + From Kaveh Ghazi. + + * xstrtol.c: Define NDEBUG for systems with losing assert.h. + (__strtol): Add __unsigned to prototype and use __P. + Move inclusion of xstrtol.h to precede prototype. + From Kaveh Ghazi. + + * memmove.c: Include config.h for definition of const. + From Kaveh Ghazi. + * All Makefile.in (install-exec, install-exec): New targets. From Karl Berry. diff --git a/src/join.c b/src/join.c index 3d0320ae40..88369dd9e7 100644 --- a/src/join.c +++ b/src/join.c @@ -113,7 +113,10 @@ static struct line blank1; static struct line blank2; static void -ADD_FIELD (struct line *line, const char *field, size_t len) +ADD_FIELD (line, field, len) + struct line *line; + const char *field; + size_t len; { if (line->nfields >= line->nfields_allocated) {