Remove definitions of those symbols.
* src/csplit.c: Move inclusion of regex.h/rx.h to follow system.h
since it now includes limit.h which defines RE_DUP_MAX.
* src/nl.c: Likewise.
* src/tac.c: Likewise.
/* csplit - split a file into sections determined by context lines
- Copyright (C) 91, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 91, 95, 96, 1997, 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <getopt.h>
#include <sys/types.h>
#include <signal.h>
-#ifdef HAVE_LIMITS_H
-# include <limits.h>
-#endif /* HAVE_LIMITS_H */
-#ifndef UINT_MAX
-# define UINT_MAX ((unsigned int) ~(unsigned int) 0)
-#endif
-
-#ifndef INT_MAX
-# define INT_MAX ((int) (UINT_MAX >> 1))
-#endif
+#include "system.h"
#if WITH_REGEX
# include <regex.h>
#else
# include <rx.h>
#endif
-#include "system.h"
+
#include "error.h"
#include "xstrtoul.h"
#include "xalloc.h"
/* GNU fmt -- simple text formatter.
- Copyright (C) 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 94, 95, 96, 1997, 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/types.h>
#include <getopt.h>
-#if HAVE_LIMITS_H
-# include <limits.h>
-#endif
-
-#ifndef UINT_MAX
-# define UINT_MAX ((unsigned int) ~(unsigned int) 0)
-#endif
-
-#ifndef INT_MAX
-# define INT_MAX ((int) (UINT_MAX >> 1))
-#endif
-
/* Redefine. Otherwise, systems (Unicos for one) with headers that define
it to be a type get syntax errors for the variable declaration below. */
#define word unused_word_type
/* fold -- wrap each input line to fit in specified width.
- Copyright (C) 91, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 91, 95, 96, 1997, 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <getopt.h>
#include <sys/types.h>
-#if HAVE_LIMITS_H
-# include <limits.h>
-#endif
-
-#ifndef UINT_MAX
-# define UINT_MAX ((unsigned int) ~(unsigned int) 0)
-#endif
-
-#ifndef INT_MAX
-# define INT_MAX ((int) (UINT_MAX >> 1))
-#endif
-
#include "system.h"
#include "xstrtol.h"
#include "error.h"
/* join - join lines of two files on a common field
- Copyright (C) 91, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 91, 95, 96, 1997, 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/types.h>
#include <getopt.h>
-#if HAVE_LIMITS_H
-# include <limits.h>
-#endif
-
-#ifndef UINT_MAX
-# define UINT_MAX ((unsigned int) ~(unsigned int) 0)
-#endif
-
-#ifndef INT_MAX
-# define INT_MAX ((int) (UINT_MAX >> 1))
-#endif
-
#if _LIBC || STDC_HEADERS
# define TOLOWER(c) tolower (c)
#else
/* nl -- number lines of files
- Copyright (C) 89, 92, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 89, 92, 95, 96, 1997, 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/types.h>
#include <getopt.h>
-#if HAVE_LIMITS_H
-# include <limits.h>
-#endif
+#include "linebuffer.h"
+#include "system.h"
#if WITH_REGEX
# include <regex.h>
# include <rx.h>
#endif
-#ifndef UINT_MAX
-# define UINT_MAX ((unsigned int) ~(unsigned int) 0)
-#endif
-
-#ifndef INT_MAX
-# define INT_MAX ((int) (UINT_MAX >> 1))
-#endif
-
-#include "linebuffer.h"
-#include "system.h"
#include "error.h"
#include "xstrtol.h"
/* od -- dump files in octal and other formats
- Copyright (C) 92, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 92, 95, 96, 1997, 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
typedef double LONG_DOUBLE;
#endif
-#if HAVE_LIMITS_H
-# include <limits.h>
-#endif
-#ifndef SCHAR_MAX
-# define SCHAR_MAX 127
-#endif
-#ifndef SCHAR_MIN
-# define SCHAR_MIN (-128)
-#endif
-#ifndef SHRT_MAX
-# define SHRT_MAX 32767
-#endif
-#ifndef SHRT_MIN
-# define SHRT_MIN (-32768)
-#endif
-#ifndef ULONG_MAX
-# define ULONG_MAX ((unsigned long) ~(unsigned long) 0)
-#endif
-#ifndef LONG_MAX
-# define LONG_MAX ((long int) (ULONG_MAX >> 1))
-#endif
#if HAVE_VALUES_H
# include <values.h>
#endif
-#ifndef BITSPERBYTE
-# define BITSPERBYTE 8
-#endif
-
#ifndef MAX
# define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
/* pr -- convert text files for printing.
- Copyright (C) 88, 91, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 88, 91, 95, 96, 1997, 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "error.h"
#include "xstrtol.h"
-#if HAVE_LIMITS_H
-# include <limits.h>
-#endif
-
-#ifndef UINT_MAX
-# define UINT_MAX ((unsigned int) ~(unsigned int) 0)
-#endif
-
-#ifndef INT_MAX
-# define INT_MAX ((int) (UINT_MAX >> 1))
-#endif
-
#ifndef TRUE
# define TRUE 1
# define FALSE 0
# include <langinfo.h>
#endif
-#ifdef HAVE_LIMITS_H
-# include <limits.h>
-#else
-# ifndef UCHAR_MAX
-# define UCHAR_MAX 255
-# endif
-#endif
-
char *xstrdup ();
/* Undefine, to avoid warning about redefinition on some systems. */
/* split.c -- split a file into pieces.
- Copyright (C) 88, 91, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 88, 91, 95, 96, 1997, 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <getopt.h>
#include <sys/types.h>
-#if HAVE_LIMITS_H
-# include <limits.h>
-#endif
-
-#ifndef UINT_MAX
-# define UINT_MAX ((unsigned int) ~(unsigned int) 0)
-#endif
-
-#ifndef INT_MAX
-# define INT_MAX ((int) (UINT_MAX >> 1))
-#endif
-
#include "system.h"
#include "error.h"
#include "xstrtol.h"
/* tac - concatenate and print files in reverse
- Copyright (C) 88, 89, 90, 91, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 88, 89, 90, 91, 95, 96, 1997, 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
#include <getopt.h>
#include <sys/types.h>
+#include "system.h"
+
#if WITH_REGEX
# include <regex.h>
#else
# include <rx.h>
#endif
-#include "system.h"
+
#include "error.h"
#ifndef DEFAULT_TMPDIR
/* tail -- output the last part of file(s)
- Copyright (C) 89, 90, 91, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 89, 90, 91, 95, 96, 1997, 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <assert.h>
#include <getopt.h>
#include <sys/types.h>
-#if HAVE_LIMITS_H
-# include <limits.h>
-#endif
#include "system.h"
#include "xstrtoul.h"
#include "error.h"
-#ifndef CHAR_BIT
-# define CHAR_BIT 8
-#endif
-
#ifndef OFF_T_MIN
-# define OFF_T_MIN (0 < (off_t) -1 ? (off_t) 0 \
- : ~ (off_t) 0 << (sizeof (off_t) * CHAR_BIT - 1))
+# define OFF_T_MIN TYPE_MINIMUM (off_t)
#endif
#ifndef OFF_T_MAX
-# define OFF_T_MAX (~ (off_t) 0 - OFF_T_MIN)
+# define OFF_T_MAX TYPE_MAXIMUM (off_t)
#endif
/* Disable assertions. Some systems have broken assert macros. */
/* tr -- a filter to translate characters
- Copyright (C) 91, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 91, 95, 96, 1997, 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/types.h>
#include <getopt.h>
-#if HAVE_LIMITS_H
-# include <limits.h>
-#endif
-
#include "system.h"
#include "error.h"
-#ifndef ULONG_MAX
-# define ULONG_MAX ((unsigned long) ~(unsigned long) 0)
-#endif
-
-#ifndef LONG_MAX
-# define LONG_MAX ((long int) (ULONG_MAX >> 1))
-#endif
-
-#ifndef UINT_MAX
-# define UINT_MAX ((unsigned int) ~(unsigned int) 0)
-#endif
-
-#ifndef INT_MAX
-# define INT_MAX ((int) (UINT_MAX >> 1))
-#endif
-
-#ifndef UCHAR_MAX
-# define UCHAR_MAX 0xFF
-#endif
-
#define N_CHARS (UCHAR_MAX + 1)
/* A pointer to a function that returns an int. */
/* unexpand - convert spaces to tabs
- Copyright (C) 89, 91, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 89, 91, 95, 96, 1997, 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/types.h>
#include "system.h"
-#ifdef HAVE_LIMITS_H
-# include <limits.h>
-#endif
-
-#ifndef UINT_MAX
-# define UINT_MAX ((unsigned int) ~(unsigned int) 0)
-#endif
-
-#ifndef INT_MAX
-# define INT_MAX ((int) (UINT_MAX >> 1))
-#endif
-
#include "error.h"
/* The number of bytes added at a time to the amount of memory
/* uniq -- remove duplicate lines from a sorted file
- Copyright (C) 86, 91, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 86, 91, 95, 96, 1997, 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <getopt.h>
#include <sys/types.h>
-#if HAVE_LIMITS_H
-# include <limits.h>
-#endif
-
-#ifndef UINT_MAX
-# define UINT_MAX ((unsigned int) ~(unsigned int) 0)
-#endif
-
-#ifndef INT_MAX
-# define INT_MAX ((int) (UINT_MAX >> 1))
-#endif
-
#include "system.h"
#include "linebuffer.h"
#include "error.h"