[PATCH] fixes for android in libraries/unix

Nathan Hüsken nathan.huesken at posteo.de
Tue Jan 29 23:34:30 CET 2013

On 01/29/2013 11:34 AM, Simon Marlow wrote:
> On 25/01/13 08:55, Nathan Hüsken wrote:
>> These patches are for libraries/unix.
>> They may need some discussing, because I am not sure if this is the
>> right thing.
>> 1. On android the passwd struct does not define pw_gecos. The first
>> patch therefor sets it to the empty string.
>> 2. The android ndk does not define _POSIX_VDISABLE, but it defines
>> _PC_VDISABLE. The second patch defines _POSIX_VDISABLE to _PC_VIDISABLE,
>> which is (as I undestand it) what the POSIX programmer guide suggests.
>> 3. The android ndk does not define telldir and seekdir. The third patch
>> removes them when compiling for android.
> Thanks for the patch.  A better way to do these things is to add
> detection logic to the configure script, rather than platform-specific
> #ifdefs.
> See:
> http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/Conventions#Otherportabilityconventions
> (the point about "avoid conditional code")
> There should be plenty of examples in the configure script that you can
> copy and modify.

Appended are update patches for 1 und 3.

More information about the ghc-devs mailing list