hpux: missing definitions for INTPTR_MAX, etc
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tokyocabinet |
New
|
Undecided
|
Unassigned |
Bug Description
While building TCab 1.4.47 on HP-UX 11.11 for PA-RISC, I found a few missing prototypes and whatnot. The following allowed a clean build on HP-UX 11.11 PA-RISC 2.0 using GCC 4.7.0.
myconf.h patch attached:
* Missing SIZE_MAX defined if needed
* Defined-but-null INTPTR_MAX is replaced if necessary
* Missing HUGE_VALL and nanl() are replaced with GCC builtins if necessary
The HUGE_VALL and nanl() are defined for Itanium HP-UX platforms, but not PA-RISC, so they should be checked before insertion as shown in the patch. I poked around for ways to set these up without using GCC builtins, but settled on this approach.
The following definitions in CFLAGS allowed the correct sections of the stock HP-UX header files to be selected to satisfy requirements in the code:
CC="/opt/
CFLAGS=
The build goes through cleanly as a result, with only a couple of innocuous warnings.