bwhite/hadoopy — pull request #56 by gmazzola (2012-05-19 01:58:58+00:00)
Title: Fixes to enable FreeBSD support

Hello Brandyn,

I am using a FreeBSD-based Hadoop cluster for a project, and Hadoopy seems like an excellent way to manage Hadoop through Python. However, I discovered a few Cython compilation errors when I built the Hadoopy package on FreeBSD.

After an hour of debugging, I discovered the root cause of the problem. Your code calls the ``fgetc(FILE *)`` function, but passes a ``void *`` pointer instead of a ``FILE *`` pointer. On most platforms this behaves as expected, but FreeBSD defines ``FILE`` as a structure instead of a standard integer. The FreeBSD ``fgetc`` implementation references members of this struct, which caused compilation errors.

In this pull request I changed ``void *`` to ``FILE *``, which fixes the problem while maintaining compatibility with all platforms.

Thanks!

Gregory