On Wed, 16 Dec 1998, Thomas G. Lockhart wrote:
> Can you determine the appropriate character(s) in a printf()
> specification for int8 on your version of Solaris? We are currently
> using the HAVE_LONG_INT_64 and HAVE_LONG_LONG_INT_64 to determine this,
> and depending on the values of those we are using either "%ld" or "%lld"
> for the printf() and scanf(). A few other platforms support additional,
> alternate specification (I recall "%qd" but might be mistaken).
Well, I don't know what directives are used (are the directives supplied
by the makefile in correspondence to the assumed platform capabilitis?),
but I wrote this simple C program:
#include <stdio.h>
main(int argc, char *argv[])
{
long long int a;
long int b;
int c;
printf ( "variable sizes: a is %d, b is %d, c is %d\n",
sizeof( a ), sizeof( b), sizeof( c ) );
a = 135;
printf ( "With d: %d, with ld: %ld, with lld: %lld\n", a,a,a);
a = 9876543210;
printf ( "With d: %d, with ld: %ld, with lld: %lld\n", a,a,a);
}
The output when I run it is:
variable sizes: a is 8, b is 4, c is 4
With d: 0, with ld: 135, with lld: 135
With d: 2, with ld: 1286608618, with lld: 9876543210
This seems to indicate that HAVE_LONG_LONG_INT_64 should be defined, if I
got the idea about what your directives do.
Herouth