Re: Mixed 64-bit system GerH binaries / BillYscripts --> two-sided training? YES!

Jaakko Hyvätti <[email protected]>
Newsgroups gmane.mail.spam.crm114
Message-ID <[email protected]>
On Mon, 1 Sep 2008, Bill Yerazunis wrote:
> So, Ger, what does this look like in a portable 32/64-bit C:
>
>   typedef struct mythical_new_bucket
>     { gimme_32_bits  hash;
>       gimme_32_bits  in_count;
>       gimme_32_bits  out_count:
>     } standard_bucketp;
>
> Do I have to use uint32_t (which can't be printed by printf
> without casting?  Or is there some other incantation that Just Works.

Here you are:


#include <inttypes.h>
#include <stdio.h>

int main (void)
{
   uint32_t x = 1;
   printf ("foo: %" PRIu32 "\n", x);
   return 0;
}



Regards,
Jaakko

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.