]> git.draconx.ca Git - upkg.git/commit
libupkg: Add explicit conversions to stdio wrappers.
authorNick Bowler <nbowler@draconx.ca>
Sun, 31 Jan 2010 21:53:13 +0000 (16:53 -0500)
committerNick Bowler <nbowler@draconx.ca>
Sun, 31 Jan 2010 21:53:13 +0000 (16:53 -0500)
commit6fed51f830b164db3ffaeb42604bb5d6a8a05138
tree10095cd97d5015f4e92956603bf4058cb0a822ff
parent0d572b509281eb39bd418cb7a87ecfd9e101cb8a
libupkg: Add explicit conversions to stdio wrappers.

Some C libraries provide a macro version of feof which does not convert
the provided pointer to FILE * before dereferencing it.  Ordinarily,
this conversion would occur automatically since feof's prototype
specifies FILE *, but this is suppressed in the macro case.

It is not clear to me whether this behaviour is consistent with the
requirements of the C standard.  However, after encountering at least
two implementations which do this, explicit conversions seem simple
enough.
src/libupkg.c