derat/xsettingsd — pull request #6 by Ionic (2014-11-22 01:23:36+00:00)
Title: Use int value provided by fgetc() to compare against EOF. Casting to char and back to int won't work on specific architectures.

Example on ppc64 for the old code:
fgetc() reads 0xFFFFFFFF (int, -1). Then converted to 0xFF (char, ÿ).
Then converted to 0x000000FF (int, ÿ).
Compared against EOF macro 0xFFFFFFFF (int, -1).
Obviously not the same value.