On Fri, 27 Dec 2002, Greg Turner wrote:
Here we use off_t (which requires sys/types.h), that's why I wrote "If we really want to use off_t in this file. Should this simply become cab_off_t?
Bingo. [...] So, yes, this is most certainly an error on my part, and your fix is likely the correct one. Out of curiosity, what is your platform? I am slightly surprised that off_t compiles at all without sys/types.h, even on linux...
I was seeing this on FreeBSD; on GNU/Linux you probably don't see that because sys/types.h and others are implicitly #included by lots of other headers (which is somewhat non-standard, though not forbidden).
Would you be so kind as to change that to cab_off_t, and then run the compile again to make sure that we've really eliminated all the off_t's in there? Let me know your results and I will submit a patch including this, and the renaming I discussed before.
It works fine. I am submitting this to wine-patches, so that Alexandre can unbreak the build as soon as possible, though of course of full fix like the one you mentioned would be better. ;-)
Thanks for working on this with me!
Gerald
Index: cabextract.c =================================================================== RCS file: /home/wine/wine/dlls/cabinet/cabextract.c,v retrieving revision 1.1 diff -u -3 -p -r1.1 cabextract.c --- cabextract.c 19 Dec 2002 21:16:56 -0000 1.1 +++ cabextract.c 29 Dec 2002 22:52:16 -0000 @@ -472,7 +472,7 @@ BOOL cabinet_read_entries(struct cabinet }
fol->cab[0] = cab; - fol->offset[0] = base_offset + (off_t) EndGetI32(buf+cffold_DataOffset); + fol->offset[0] = base_offset + (cab_off_t) EndGetI32(buf+cffold_DataOffset); fol->num_blocks = EndGetI16(buf+cffold_NumBlocks); fol->comp_type = EndGetI16(buf+cffold_CompType);