hpux: missing definitions for INTPTR_MAX, etc

Bug #1016355 reported by Michael Pelletier
6
This bug affects 1 person
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/hp-gcc/bin/gcc -static-libgcc"

CFLAGS="-mpa-risc-2-0 -D_INCLUDE_XOPEN_SOURCE -D_INCLUDE_XOPEN_SOURCE_EXTENDED -D_INCLUDE_HPUX_SOURCE"

The build goes through cleanly as a result, with only a couple of innocuous warnings.

Tags: build hpux
Revision history for this message
Michael Pelletier (michael-v-pelletier) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.