Hal Murray <[email protected]> writes: >> 32 bit ints and 32 bit longs. Making string formatting requie a lof of >> casts to work on all platforms. > > That's ugly, but easy to fix and not the sort of thing that we are likely > to get wrong as long as the compiler is happy. > > We could make a macro to make it less ugly. Since we haven't done that > yet, it probably isn't that much of a problem.
The standard approach is: Use %d for int, %ld for long. Use PRI macros for other types. But, the real issue surely is that we have a lot of system-defined types that are underlying int/long, and this varies by CPU type. However, it also varies by OS, because more or less always POSIX requires that things be an integral type. Thus, I suspect a lot of the printf type handling is necessary anyway, even without ILP32 CPU types in the mix. >> Power PC. As in older Apples. > > What does that have to do with PPS or i386? Very simple: "PPS and i386" is a typo for "ppc and i386". This has nothing to do with PPS.
