diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-03-09 19:11:23 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-03-09 19:11:23 +0000 |
commit | eef56b544e01755a52fdfbf204e6f2d5800efd21 (patch) | |
tree | 510e6ad2669f46e75d1b0bc7af8c09f8a2c2456c /modules | |
parent | 4f5d6947d90a65c2b577ef2ca7adf4e413cfe6b6 (diff) | |
download | gnulib-eef56b544e01755a52fdfbf204e6f2d5800efd21.tar.gz |
Factor int-properties macros into a single file, except for
glibc-related files.
* lib/intprops.h: New file.
* lib/getloadavg.c: Include it instead of limits.h.
(INT_STRLEN_BOUND): Remove.
* lib/human.c: Include intprops.h.
(group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
* lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than 302/1000.
* lib/inttostr.h: Include intprops.h instead of limits.h.
(INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
* lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
for consistency with intprops.h.
(time_t_is_integer, twos_complement_arithmetic): Use them.
* lib/sig2str.h: Include <signal.h>, intprops.h.
(INT_STRLEN_BOUND): Remove.
* lib/strftime.c (TYPE_SIGNED): Remove.
(INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
* lib/strtol.c: Adjust comments to match intprops.h.
* lib/userspec.c: Include intprops.h.
(TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
* lib/utimecmp.c, lib/xnanosleep.c, lib/xstrtol.c: Likewise.
* lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
instead of rolling our own expressions.
* lib/xstrtol.c: Include xstrtol.h first, to test interface.
* modules/getloadavg (Files): Add lib/intprops.h.
* modules/human (Files): Likewise.
* modules/inttostr (Files): Likewise.
* modules/sig2str (Files): Likewise.
* modules/userspec (Files): Likewise.
* modules/utimecmp (Files): Likewise.
* modules/xnanosleep (Files): Likewise.
* modules/xstrtol (Files): Likewise.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/getloadavg | 1 | ||||
-rw-r--r-- | modules/human | 2 | ||||
-rw-r--r-- | modules/inttostr | 1 | ||||
-rw-r--r-- | modules/sig2str | 2 | ||||
-rw-r--r-- | modules/userspec | 1 | ||||
-rw-r--r-- | modules/utimecmp | 2 | ||||
-rw-r--r-- | modules/xnanosleep | 1 | ||||
-rw-r--r-- | modules/xstrtol | 1 |
8 files changed, 8 insertions, 3 deletions
diff --git a/modules/getloadavg b/modules/getloadavg index e2ede2bdc2..8d02810a1b 100644 --- a/modules/getloadavg +++ b/modules/getloadavg @@ -3,6 +3,7 @@ Return the current system load averages. Files: lib/getloadavg.c +lib/intprops.h Depends-on: cloexec diff --git a/modules/human b/modules/human index 78ab324963..5b7ff6a13f 100644 --- a/modules/human +++ b/modules/human @@ -5,6 +5,7 @@ with K/M/G suffix. Files: lib/human.h lib/human.c +lib/intprops.h m4/ulonglong.m4 m4/stdint_h.m4 m4/inttypes_h.m4 @@ -32,4 +33,3 @@ GPL Maintainer: Paul Eggert - diff --git a/modules/inttostr b/modules/inttostr index f070d3f390..b17445194f 100644 --- a/modules/inttostr +++ b/modules/inttostr @@ -3,6 +3,7 @@ Convert integers to printable strings. Files: lib/imaxtostr.c +lib/intprops.h lib/inttostr.c lib/inttostr.h lib/offtostr.c diff --git a/modules/sig2str b/modules/sig2str index 42c8073030..5f6fce5a38 100644 --- a/modules/sig2str +++ b/modules/sig2str @@ -2,6 +2,7 @@ Description: Convert between signal names and signal numbers. Files: +lib/intprops.h lib/sig2str.h lib/sig2str.c m4/sig2str.m4 @@ -22,4 +23,3 @@ GPL Maintainer: Paul Eggert, Jim Meyering - diff --git a/modules/userspec b/modules/userspec index a0b1ec29fd..98521fc329 100644 --- a/modules/userspec +++ b/modules/userspec @@ -2,6 +2,7 @@ Description: Parse a `user:group' specifier (e.g. the first argument of chown utility). Files: +lib/intprops.h lib/userspec.c lib/userspec.h m4/userspec.m4 diff --git a/modules/utimecmp b/modules/utimecmp index d65ef3e336..64a4fa3207 100644 --- a/modules/utimecmp +++ b/modules/utimecmp @@ -2,6 +2,7 @@ Description: compare file time stamps Files: +lib/intprops.h lib/utimecmp.h lib/utimecmp.c m4/utimecmp.m4 @@ -26,4 +27,3 @@ GPL Maintainer: Paul Eggert, Jim Meyering - diff --git a/modules/xnanosleep b/modules/xnanosleep index 18abf00981..546daf4091 100644 --- a/modules/xnanosleep +++ b/modules/xnanosleep @@ -2,6 +2,7 @@ Description: a more convenient interface to nanosleep Files: +lib/intprops.h lib/xnanosleep.h lib/xnanosleep.c m4/xnanosleep.m4 diff --git a/modules/xstrtol b/modules/xstrtol index f453cf2e00..04c825b03b 100644 --- a/modules/xstrtol +++ b/modules/xstrtol @@ -2,6 +2,7 @@ Description: Convert string to 'long` or 'unsigned long', with error checking. Files: +lib/intprops.h lib/xstrtol.h lib/xstrtol.c lib/xstrtoul.c |