Re: cdb++ on a 64-bit machine?
Jeff King <[email protected]> Thu, 10 Apr 2003 16:55:43 -0400 (EDT)
| Newsgroups | gmane.comp.djb.cdb |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 10 Apr 2003, Matthias Andree wrote: > > typedef unsigned long uint32; > > Why do people always invent their own constant types when most systems > already provide for uint32_t in <inttypes.h>? Sort of. The correct header is actually <stdint.h> (though inttypes.h is guaranteed by POSIX to include stdint.h). <stdint.h> is POSIX and C99 compliant, but not C89 (I don't believe -- no copy of the standard handy). I believe this portability is why DJB chose to use his own compile-time tests for defining uint32 in the original cdb package (and his other pakcages that use cdb). However, you're correct that not using *either* method (either the compiler provided type or determining it at compile time) is inexcusable. -Peff