lltostr() question

lltostr() question

Post by jbro.. » Fri, 11 Feb 2000 04:00:00



Hi,
I am having some trouble using the lltostr() function on a solaris
2.5.1 machine.  A long long on this machine is 8 bytes, but executing
lltostr with an argument of 0xFFFFFFFFFFFFFFFF is returning "/".  

        #include <stdio.h>
        #include <stdlib.h>

        int main(void) {
        char *num_str;
        int i;
        num_str=malloc(64);
        for(i=0; i < 64; i++) num_str[i] = '\0';

        num_str = lltostr(0xFFFFFFFFFFFFFF, num_str + 64);
        printf("num_str = %s\n", num_str);
        num_str = lltostr(0xFFFFFFFFFFFFFFF, num_str + 64);
        printf("num_str = %s\n", num_str);
        num_str = lltostr(0xFFFFFFFFFFFFFFFF, num_str + 64);
        printf("num_str = %s\n", num_str);
        num_str = ulltostr(0xFFFFFFFFFFFFFFFF, num_str + 64);
        printf("u_num_str = %s\n", num_str);

        }

And the output is:
        num_str = 72057594037927935
        num_str = 1152921504606846975
        num_str = /
        u_num_str = 18446744073709551615

Thanks in advance!

 
 
 

1. lltostr() in Linux ?

Hi all,

Sorry if this is not the right forum for this question.

What is the substitute for the C function lltostr() (provided on some
systems eg. Solaris) for conversion of a long long to string () ? I
couldnot find this function  or anything  similar on RH6.2 Linux.

Will appreciate any feedback.

TIA,
Chet

2. Trying to get D-Link DSL-200 ADSL USB modem to work

3. lltostr() Bug in Solaris 2.5.1/2.6

4. Secure Internet Phone?

5. help on lltostr

6. UID 0, NIS, and rhosts

7. Mini-Linux Distribution Questions + General Questions + UMSDOS Questions

8. any Unix-based CD-R packages?

9. Questions, questions questions

10. 3 issues --- 1-Gnome Question, 2-CDRom Detect Question, 3-IMLIB Question

11. Questions Questions Questions ???

12. Questions, Questions, and more Questions..

13. 3 issues --- 1-Gnome Question, 2-CDRom Detect Question, 3-IMLIB Question