[Top][All Lists]

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

Re: proposed patch to allocsa, vasnprintf for Tandem NSK (OSS)

From: Matthew Woehlke
Subject: Re: proposed patch to allocsa, vasnprintf for Tandem NSK (OSS)
Date: Wed, 11 Oct 2006 18:07:47 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20060909 Thunderbird/ Mnenhy/

Paul Eggert wrote:
mwoehlke <address@hidden> writes:

In the midst of all these changes to printf-friends, is anyone (else)
aware that the 'long long' suffix for the system printf on OSS is "L"
("ll" is not recognized)?

That's news to me.  I suppose we could configure it as well, though
I'd rather avoid it if I could, since it won't work with
cross-compilation and it'll be a slow test.

Well, you could "know" that Tandem works that way. Or maybe the symbol I turned up in response to your third question.

Why would it be a slow test, though? If HAVE_LONG_LONG_INT, then try the test program:
long long int foo = 123451234512345;
printf("%lld\n", foo);

...if the result is "123451234512345", then "%lld" is correct. Else try "%Ld". If that doesn't work either, seems like a good time to give up. That would be lightning-fast on most platforms, although I guess it's "slow" if *any* 'build-and-run-a-test-program' test is "slow" (which, in all fairness, my OSS system takes 'real 0m5.363s user 0m1.121s sys 0m0.210s' to compile 'int main() { return 0; }' :-)).

What letter is used for scanf?

Hmm, probably "%Ld"? Seems to WFM.

Is there anything in /usr/include that will tell us about that "L"?

Um... I have no idea? Hmm, according to /usr/include/xlocnum:

                #ifdef _TNS_R_TARGET /* 13feb2002 sjt */
                           %lld for long long int is not
                           supported on tns_r_targets yet
                           use %Ld
                        *_Ptr++ = _Spec[0];     // qualifier
                #else /* _TNS_R_TARGET */
                if (_Spec[0] != 'L')
                        *_Ptr++ = _Spec[0];     // qualifier
                        {       /* change L to ll */
                        *_Ptr++ = 'l';
                        *_Ptr++ = 'l';
                #endif /* _TNS_R_TARGET */

...and 'cc' with no args defines _TNS_R_TARGET. Does that help?

Did you ever find out what _TANDEM_SOURCE does, by looking in

Lots of important things like u_long are not defined if _TANDEM_SOURCE is not defined. I'm not sure what exactly you're wanting to know; if you're still worried about it, maybe I should send you a tarball of headers (about 24 of them) that test _TANDEM_SOURCE?

Will your shell have salvation? Only if it's Bourne Again.

reply via email to

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