zwaldowski/libffi-iOS — pull request #1 by drodriguez (2013-11-30 19:25:37+00:00)
Title: Common files valid for both platforms.

When including libffi as a Cocoapod in a mixed platform project (like https://github.com/jasperblues/Typhoon), several header files are overwritten with ones for the other platform. The headers are `ffi.h`, `fficonfig.h`, and `ffitarget.h` (and technically `ffi_common.h`)

Since the files are only including other suffixed files I tested the approach in this pull request in my local copy and seems to work. Basically the common files are shared between the two platforms, and they include the preprocessor conditionals to include or not the suffixed headers (I haven't done it, but the same conditionals could be removed from the the rest of the headers).

For both the iOS project and the OS X project, when removing the other platform headers, the current platform header is used just fine, and no warning about missing includes is generated.

I haven't changed the scripts that seems to generate the headers, just in case you don't like the idea of having the common headers, or you want other approach.

PD: I have seen the work in ios-redo branch, but that branch doesn't have the podspec nor the pre-generated headers, that's why I did the change here. Besides, if you are going to include ARM64 (like it seems from the commits in that branch), a new set of includes will be needed.