comparison lib/human.c @ 4333:fcd34d3861a4

in lib: * addext.c, backupfile.c, fsusage.c, human.c, pathmax.h, rpmatch.c, userspec.c, xreadlink.c, xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H. * backupfile.c, fsusage.c, hash.c, human.c, safe-read.c, userspec.c, xstrtol.c (CHAR_BIT) : Don't define, since <limits.h> is guaranteed to do that. * fatal.c: Include <stdarg.h> without checking for __STDC__. * exclude.c: Include <stdbool.h> unconditionally. * tempname.c: Include <stddef.h> unconditionally. * hash.c: Include <limits.h>, since we no longer define CHAR_BIT. * modechange.c, rpmatch.c (NULL): Don't define, since <stddef.h> does that. * quote.c: Dont include <stddef.h> or <sys/types.h>; not needed. * safe-read.c (INT_MAX): Don't define, since <limits.h> does that. * safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer needed. * xstrtol.c: Likewise. * safe-read.c: Remove TYPE_SIGNED; no longer needed. * savedir.c: Include <stddef.h> instead of defining NULL. in m4: * backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h. * fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise. * human.m4 (gl_HUMAN): Likewise. * pathmax.m4 (gl_PATHMAX): Likewise. * rpmatch.m4 (gl_FUNC_RPMATCH): Likewise. * userspec.m4 (gl_USERSPEC): Likewise. * xreadlink.m4 (gl_XREADLINK): Likewise. * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise. * quote.m4 (gl_QUOTE): Don't check for stddef.h.
author Paul Eggert <eggert@cs.ucla.edu>
date Thu, 29 May 2003 07:21:59 +0000
parents 22d3032f0239
children d0d257fdad20
comparison
equal deleted inserted replaced
4332:b459be4ef089 4333:fcd34d3861a4
1 /* human.c -- print human readable file size 1 /* human.c -- print human readable file size
2 2
3 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software 3 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free
4 Foundation, Inc. 4 Software Foundation, Inc.
5 5
6 This program is free software; you can redistribute it and/or modify 6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option) 8 the Free Software Foundation; either version 2, or (at your option)
9 any later version. 9 any later version.
25 # include <config.h> 25 # include <config.h>
26 #endif 26 #endif
27 27
28 #include <sys/types.h> 28 #include <sys/types.h>
29 #include <stdio.h> 29 #include <stdio.h>
30 30 #include <limits.h>
31 #if HAVE_LIMITS_H
32 # include <limits.h>
33 #endif
34 31
35 #if HAVE_STRING_H 32 #if HAVE_STRING_H
36 # include <string.h> 33 # include <string.h>
37 #else 34 #else
38 # include <strings.h> 35 # include <strings.h>
39 #endif 36 #endif
40 37
41 #ifndef CHAR_BIT
42 # define CHAR_BIT 8
43 #endif
44 #if HAVE_STDLIB_H 38 #if HAVE_STDLIB_H
45 # include <stdlib.h> 39 # include <stdlib.h>
46 #endif 40 #endif
47 41
48 #ifndef HAVE_DECL_GETENV 42 #ifndef HAVE_DECL_GETENV