[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

check for strtoimax fails if strtoimax is a macro.

From: Steve Ellcey
Subject: check for strtoimax fails if strtoimax is a macro.
Date: Thu, 15 Sep 2005 15:25:52 -0700 (PDT)

Configuration Information [Automatically generated, do not change]:
Machine: hppa1.1
OS: hpux11.00
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='hppa1.1' 
-DCONF_OSTYPE='hpux11.00' -DCONF_MACHTYPE='hppa1.1-hp-hpux11.00' 
-DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -DHPUX  -I.  -I/tmp/be28626/bash-3.0 
-I/tmp/be28626/bash-3.0/include -I/tmp/be28626/bash-3.0/lib   -g -O2
uname output: HP-UX disco B.11.00 U 9000/800 125901587 unlimited-user license
Machine Type: hppa1.1-hp-hpux11.00

Bash Version: 3.0
Patch Level: 0
Release Status: release

        The check for strtoimax fails on HP-UX 11.00 because strtoimax
        is defined in inttypes.h as a macro that calls __strtol or
        __strtoll.  We get lucky when building bash with 32 bits and the
        build still works but with a 64 bit build it fails.  On a 32 bit
        build we see the odd effect of bash-3.0/lib/sh/strtomax.c
        defining a __strtoll function instead of a strtomax function.

        Build bash on HP-UX 11.00 and see if it finds a strtoimax
        function and a strtoimax declaration.  They will both return
        'no' even though /usr/include/inttypes.h contains:

                /* 32 bits */
                #define strtoimax(__a, __b, __c) __strtoll(__a, __b, __c)
                #define strtoumax(__a, __b, __c) __strtoull(__a, __b, __c)
                /* 64 bits */
                #define strtoimax(__a, __b, __c) (intmax_t)strtol(__a, __b, __c)
                #define strtoumax(__a, __b, __c) (uintmax_t)strtoul(__a, __b, 

        and bash could/should just use these macros.

        The fix would seem to be to improve the bash configure script to
        take into account the fact that strtoimax might be a macro.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]