deal with newer zlib and build time warnings
The cracklib packer does things like:
#ifdef HAVE_ZLIB_H
if (pdesc.flags & PFOR_USEZLIB)
gzclose(pdesc.dfp);
else
#endif
fclose(pdesc.dfp);
Where dfp and such are FILE* pointers. with newer zlib, we see warnings like:
packlib.c: In function 'PWOpen':
packlib.c:128:4: warning: passing argument 1 of 'gzclose' from incompatible
pointer type [enabled by default]
In file included from packlib.c:11:0:
/usr/include/zlib.h:1511:12: note: expected 'gzFile' but argument is of type
'struct FILE *'
packlib.c:165:4: warning: passing argument 1 of 'gzclose' from incompatible
pointer type [enabled by default]
This is because gzopen/gzclose use gzFile rather than FILE*.
Pne way to fix this would be to add (void*) casts to all zlib related funcs,
but that sucks. We could change these to unions like so:
typedef struct
{
union {
FILE *fp;
gzFile *gfp;
} dfp;
But that sucks because we'd have to update all the call points to use the
right union member. Another idea (which also sucks, but maybe less so) is to
change the pointer type to void*. This patch takes that route.
git-svn-id: file:///tmp/cracklib-svn/trunk@224
4175fe1e-86d5-4fdc-8e6a-
506fab9d8533