MSVC doesn't like when people negate unsigned numbers, and the result is
still unsigned. By default, it's an error. Moreover, section 6.5.6 of
the C11 standard doesn't clearly specify what -x means when x is an
unsigned integer. It does however specify ~x.
So I replaced -x by ~x+1. This was getting ugly, though, so I made the
ALIGN macro. ALIGN(x, block_size) returns how many bytes we need to
reach the next block size, assuming we've already consumed x bytes. For
instance, ALIGN(11, 8) == 5. It uses bit twiddling trickery, so the
block size must be a power of 2.