Re: [HACKERS] more on int8
От | Bruce Momjian |
---|---|
Тема | Re: [HACKERS] more on int8 |
Дата | |
Msg-id | 199809111410.KAA28598@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] more on int8 (Daniel Kalchev <daniel@digsys.bg>) |
Список | pgsql-hackers |
> >>>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>. Yes, I see it now in the printf manual page: u_quad_t types are defined in <sys/types.h>. Two l conversion option characters are equivalent to a single q. > > 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. Not sure if we should remove %qd, or keep it an wait. May just wait to see how many people support just %qd. Looks like I messed up the config.h.in define for lld again, so I am fixing it now. -- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 + If your life is a hard drive, | (610) 353-9879(w) + Christ can be your backup. | (610) 853-3000(h)
В списке pgsql-hackers по дате отправления: