PIC for x86-64 *nix linking & a non-blocking poll in C API #90
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Two big things:
I had problems linking my files against Emokit on my x86-64 machine due to the lack of a position-independent code flag in the build files (it's either this or using wide-addressing, which is... well as far as I've heard, dumb). I added this to the top-level
CMakeLists.txt
using the built-in CMake macro, made available in version 2.8.9. This means that the required CMake version was upped to CMake 2.8.9. If this is a problem it should be fairly easy to add the necessary (messy) if/endif switches to make it work in earlier CMake versions.I had major major headaches getting emokit's C API to play nicely with threads due to the blocking read if the device was unplugged in the middle of the program running. Every session would end with a segfault because the hanging thread would finally be cut off and not be able to clean up after itself because it hung around longer than any thread should reasonably hang around for. I managed to work around it, but the solution was disgusting and I hated the code. So instead, I added the more elegant solution: a non-blocking poll. I no longer feel like vomiting on my keyboard and I don't think anyone else should feel that way ever. Unless they had the fish for dinner. Then they can enjoy their food poisoning.
One minor thing:
I've removed the Findlibusb-1.0.cmake file. It wasn't being used and it was confusing for me to discern what it was doing there when I initially forked the repository, and therefore t'was culled.
Some notes:
I haven't tested this outside of Linux, and I have yet to ever use the Python API (because I'm a masochist and love C/C++/D and other evil things [D isn't evil]). If there's something broken over yonder due to this request, well, erm, I guess I wouldn't feel bad about being called a fool, but please do it with a kind firm tone, as if speaking to your goldfish. Or something.
Thanks~!