summaryrefslogtreecommitdiff
path: root/paxlib/paxlib.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-09-10 15:13:28 -0500
committerPaul Eggert <eggert@cs.ucla.edu>2022-09-10 15:39:38 -0500
commit2bf63fcba72c4f4bc54a4caf53d7923c1f9f174f (patch)
treea466361955cef6e34765fbec4734d91d23029222 /paxlib/paxlib.h
parent9ae062098da4383a6c9b39e245c1a2888a645352 (diff)
downloadpaxutils-2bf63fcba72c4f4bc54a4caf53d7923c1f9f174f.tar.gz
Modernize integer handling
It’s now safe to assume C99 sprintf %jd, etc. * am/system.m4 (PU_SYSTEM): Do not require gl_INTTOSTR. * gnulib.modules, paxlib.modules: Remove inttostr. Add strtoimax, strtoumax. * lib/system.h (UINTMAX_STRSIZE_BOUND): Remove. * paxlib/error.c (chown_error_details, read_error_details) (read_warn_details, read_fatal_details, seek_error_details) (seek_warn_details, write_error_details): * paxlib/rtape.c (rmt_read, rmt_write, rmt_lseek, rmt_ioctl): * rmt/rmt.c (rmt_reply): * tests/genfile.c (verify_file, print_stat): Use C99 printf formats instead of doing it by hand. * paxlib/paxlib.h, rmt/rmt.c, tests/genfile.c: Do not include inttostr.h. * paxlib/paxlib.h (STRINGIFY_BIGINT): Remove. * tests/argcv.c (xtonum): Use strtol for signed int, not strtoul. * tests/genfile.c (checkpoint, verify_file, parse_opt) (exec_checkpoint, process_checkpoint, exec_command): Prefer uintmax_t to size_t for counters unrelated to object size. (PRINT_INT): New macro. (print_stat): Prefer uintmax_t to unsigned for modes.
Diffstat (limited to 'paxlib/paxlib.h')
-rw-r--r--paxlib/paxlib.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/paxlib/paxlib.h b/paxlib/paxlib.h
index c6e8382..5e82d8f 100644
--- a/paxlib/paxlib.h
+++ b/paxlib/paxlib.h
@@ -21,8 +21,6 @@
#ifndef _paxlib_h_
#define _paxlib_h_
-#include <inttostr.h>
-
/* Error reporting functions and definitions */
/* Exit status for paxutils app. Let's try to keep this list as simple as
@@ -121,9 +119,6 @@ void write_error_details (char const *, size_t, size_t);
_Noreturn void pax_exit (void);
_Noreturn void fatal_exit (void);
-
-#define STRINGIFY_BIGINT(i, b) umaxtostr (i, b)
-
/* Name-related functions */
bool removed_prefixes_p (void);