Friday, February 22, 2008

Why Deadwood requires 64-bit integers

Since I just got an email pointing out that my Deadwood code would be more portable if it didn't use 64-bit integers for the timestamp, I will explain why this is necessary:
  • 32-bit machines can handle 64-bit ints with most compilers. Indeed, the C99 standard mandates 64-bit int support.
  • The only 64-bit int used in Deadwood is for the timestamp.
  • I don't want to contribute to the Y2038 problem our children will have to deal with.
  • The file format used for storing the DNS cache to a file uses these 64-bit timestamps.
64-bit integer support is mandated by the C99 standard. It's been nine years; I don't think it's worth my time to make my program compatible with broken compilers that don't follow a 9-year-old standard.