>>>Bruce Momjian said:
> > Just out of curiosity, does Bruce's BSDI system recognize %lld as did
> > Daniel's? If so, we could dispense with the %qd option for the final
> > release...
>
> Yes, BSDI understands %lld, but not %Ld, though it is not documented in
> the printf manual page.
It is documented in the scanf manual page, where it says:
l Indicates either that the conversion will be one of dioux or n
and the next pointer is a pointer to a long int (rather than
int), or that the conversion will be one of efg and the next
pointer is a pointer to double (rather than float). If the con-
version is dioux or n and two l flags are given, then the next
pointer will be a pointer to a double precision integer of quad_t
or u_quad_t (unsigned) type; these types are defined in
<sys/types.h>.
L Indicates that the conversion will be efg and the next pointer is
a pointer to long double. (This type is not implemented; the L
flag is currently ignored.)
q Indicates a double precision integer conversion; identical to us-
ing ll.
Note the reference to u_quad_t - there is also quad_t in BSD/OS 3.1 which is
singned. There are also (identical) types
typedef u_int64_t u_quad_t; /* quads */
typedef int64_t quad_t;
The same is valid for BSD/OS 4.0.
> We could probably do without %qd, but I assume their are some platforms
> that support %qd and not %lld. We can ask people as they run configure
> if they ever see %lld failing but %qd passing.
Perhaps %lld is GNUism? So it should work on most GNU based compilers. I agree
your approach is good - to just sample the different platforms on which
PostgreSQL is compiled.
Daniel