In bygone days, if you wanted as big an integer type as the system allowed, you'd declare it
long int foo;
or maybe unsigned
if you wanted a bit more space, and didn't care about negative numbers. You could, should you wish to print such a number, then say printf("%ld\n",foo);
, and all was good. On many systems, long
was a 32-bit type. Foolish people would rely on this, and indeed on a long
being no more than 32 bits long.Time went by, and 32 bits just weren't enough. For some programs, 64-bit integers were necessary. One approach would have been to say "on our platform,
long
will be 64 bits", but that would have messed up those foolish people I mentioned above. Instead, C99 came up with a complex mess. You can have long long int
, but that's not guarunteed to be any particular size, or you can have int64_t
and friends - a whole mishmash of types. What you almost certainly cannot use is long int
- all that correct code that assumed that long
would be the biggest type available is now broken.As if that wasn't enough, all these new types are horrible to print out. For an unsigned 64-bit integer (uint64_t), the above rune has to become
printf("%" PRIu64 "\n",foo);
instead, which is just plain ugly. Who came up with this shit?While I'm at is, solaris 9 sucks, too. Its libc lacks a whole pack-load of useful C99 features, its gdb can't cope with 2.4G core files (and, indeed, many of its utilities don't deal with large files). Bah. I'd upgrade to solaris 10, but a) that would take lots of time and b) I'd lay you good odds the entire system (or at least the Oracle install) would break dismally, and we have no on-site solaris admins.
(no subject)
(no subject)
I expect a debugger to be able to set breakpoints and single-step (both source level and assembly), for example.
(no subject)
(no subject)
I'm getting used to debugging without an interactive symbolic debugger again. Years since I've had to do that, and it's *so* much slower.
(no subject)
(no subject)