3 ms·
typedef unsigned int u32; typedef unsigned long u64; This does not look like portable code.
by markrages 11y ago
typedef unsigned int u32;
typedef unsigned long u64;
This does not look like portable code.
- wkoszek 11y agoThe problem is that I didn't want to make this code depend on stdint.h So yeah - depending on the platform you will need to make u32/u64 point to things from your stdint.h (or whatever that is) and the code should work.
- pdw 11y agoThough your code converts the input int to u32 when calling vpf_num_to_str. That will fail if int happens to be more than 32 bits long. Anyway, a less theoretical bug report: Your "%d" format specifier fails to print negative numbers. :)
- jotux 11y ago>I didn't want to make this code depend on stdint.h Why?
- wkoszek 11y agoSome environments don't have stdint.h