]> git.draconx.ca Git - cdecl99.git/commit
libcdecl: Replace uintmax_t with unsigned (long) long.
authorNick Bowler <nbowler@draconx.ca>
Thu, 18 Jan 2024 05:17:06 +0000 (00:17 -0500)
committerNick Bowler <nbowler@draconx.ca>
Fri, 19 Jan 2024 01:39:21 +0000 (20:39 -0500)
commit486349a83f783742b9d148447c6119eb76d4ead0
tree27cf5dc8c60c1c8ddc85818020d2bd420315e997
parentf9f25a36518274455212cf387599aa4e7bc2e0c8
libcdecl: Replace uintmax_t with unsigned (long) long.

Using uintmax_t in a public header file is problematic.  The most
obvious problem is that we need to include either <inttypes.h> or
<stdint.h> to get it, and the current unconditional inclusion of
<stdint.h> breaks on e.g., HP-UX 11 which only has <inttypes.h>

The less obvious problem is that uintmax_t can depend on compiler
configuration, e.g., the Sun compiler for a 32-bit host provides a
32-bit uintmax_t in C89 mode.

Instead, just change it to "unsigned long long" if supported, otherwise
"unsigned long".  It is very likely to be binary compatible with prior
releases, since as far as I am aware prior releases don't actually build
on any implementation where it would not be the case.
19 files changed:
Makefile.am
common
configure.ac
doc/libcdecl.3
src/cdecl-internal.h
src/cdecl.h
src/cdecl99.c
src/declare.c
src/error.c
src/execute.gperf
src/fix-yytname.awk
src/intconv.h
src/output.c
src/parse.y
src/scan.l
t/declgen.c
t/rng.c
t/test.h
t/testlib.c