Discussion:
bug#32305: mingw vs do_chown in gzip
Paul Eggert
2018-07-29 18:31:06 UTC
Permalink
I'm (finally) working on updating the gzip in Debian to something newer
than 1.6, which caused me to stumble over the addition of the do_chown
function in gzip.c. That's because I need to build both native Debian
and Windows binary packages, the latter in support of a portion of the
Debian installer system that has something to do with Windows.
The problem is that mingw doesn't provide uid_t or gid_t definitions,
perhaps just because there isn't really an equivalent ownership
construct in Windows?
Yes, that must be it. I installed the attached into gzip master on Savannah;
does it fix things for you?
Bdale Garbee
2018-07-30 03:31:50 UTC
Permalink
Post by Paul Eggert
Yes, that must be it. I installed the attached into gzip master on Savannah;
does it fix things for you?
That fixes the compilation of gzip.c, but of course causes a link
failure since it leaves two calls to function do_chown() that is no
longer defined.

The hack I used to build the Debian gzip 1.9-1 upload I did last night
is to conditionally add two bogus typedefs and elide the function
content if __MINGW32__ is defined. So far, that seems to work ok. My
patch is attached to this email.

It does feel like an "ugly" approach, but I just got confused trying to
unwind how the configure code which learns there are no *chown()
functions in the mingw environment didn't actually cause the right
things to happen in the build. Since apparently I'm the first person to
stumble over this since you added do_chown shortly after the gzip 1.6
release, I doubt it's worth much more time from either of us to come up
with a "cleaner" patch...

Feel free to use some or all of my patch, but I am also happy to update
may packaging for Debian if you choose to put more time in this and
develop a better solution.

Regards,

Bdale
Paul Eggert
2018-08-04 07:39:34 UTC
Permalink
Post by Bdale Garbee
That fixes the compilation of gzip.c, but of course causes a link
failure since it leaves two calls to function do_chown() that is no
longer defined.
I installed into Savannah master the attached patch, which should be a bit
cleaner. Does it fix things for you?
Bdale Garbee
2018-08-05 00:01:28 UTC
Permalink
Post by Paul Eggert
I installed into Savannah master the attached patch, which should be a bit
cleaner. Does it fix things for you?
Yep, thanks! I've updated my packaging repo to use your approach for
the 1.9-2 upload.

Bdale
Paul Eggert
2018-08-05 03:36:42 UTC
Permalink
Thanks for checking the fix; closing the bug report.

Loading...