mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
CHAR_BIT SCHAR_MAX UCHAR_MAX SHRT_MAX INT_MAX UINT_MAX LONG_MAX ULONG_MAX
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.
This commit is contained in:
1 parent
b9ed71e46e
commit
dba300a0d0
14 files changed
+22
-189
No files matched your search
+3
-12
@@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@@ -29,24 +29,15 @@
|
||||
#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"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@@ -22,18 +22,6 @@
|
||||
#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
|
||||
|
||||
+1
-13
@@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@@ -26,18 +26,6 @@
|
||||
#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"
|
||||
|
||||
+1
-13
@@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@@ -28,18 +28,6 @@
|
||||
#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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@@ -24,9 +24,8 @@
|
||||
#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>
|
||||
@@ -34,16 +33,6 @@
|
||||
# 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"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@@ -37,36 +37,11 @@ typedef long double LONG_DOUBLE;
|
||||
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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@@ -178,18 +178,6 @@
|
||||
#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
|
||||
|
||||
@@ -43,14 +43,6 @@
|
||||
# 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. */
|
||||
|
||||
+1
-13
@@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@@ -27,18 +27,6 @@
|
||||
#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"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@@ -40,12 +40,14 @@ tac -r -s '.\|
|
||||
#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
|
||||
|
||||
+3
-11
@@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@@ -49,25 +49,17 @@
|
||||
#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. */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@@ -29,33 +29,9 @@
|
||||
#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. */
|
||||
|
||||
+1
-13
@@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@@ -45,18 +45,6 @@
|
||||
#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
|
||||
|
||||
+1
-13
@@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@@ -26,18 +26,6 @@
|
||||
#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"
|
||||
|
||||
Reference in new issue
Block a user