sletz/jack2 — pull request #1 by basilnut (2012-07-22 01:32:27+00:00)
Title: Use specially-aligned types instead of packed structs

Here's my proposed patchset for replacing packed structs with specially aligned types.

I've tested on x86 Linux and confirmed that the structs are compatible between 64-bit and 32-bit. The patch includes changes for MSVC, which I believe should work, but I have not tested it.

The patch includes some minor ABI breakage in jack's public headers; I've described the changes in detail in the commits. This breakage could be avoided, however it would require more complex changes.

I decided to introduce new typedefs only for types which actually differ between 32-bit and 64-bit, rather than all types. This reduced overall churn, though I recognize that it makes it somewhat more likely that someone in the future might add a field to a shared struct and forget to ensure proper alignment.

Let me know if you would like to see anything done differently. Or if you'd like to just forget it altogether I'll understand :-).