zgz: Don't hardcode /lib, avoid segfaulting on > 128 character paths
authorJoey Hess <joey@kitenet.net>
Sun, 23 Sep 2012 01:53:33 +0000 (21:53 -0400)
committerJoey Hess <joey@kitenet.net>
Sun, 23 Sep 2012 01:53:33 +0000 (21:53 -0400)
commitd5f53a19a691551767c47aaabfaa264654fb81e9
tree5d70f9f44971bfc904764b6e1903c3dd9a4f48f9
parentb74af918e98c4b3e8fd4fd86a2a0febc7455e4e3
zgz: Don't hardcode /lib, avoid segfaulting on > 128 character paths

There were a number of issues with zgz:

* It had a fixed 128 (!) size limit on paths, and if we happened
  to be installed into one longer than that, the program would
  likely segfault.
* Calling exit(system()) is inefficient; we might as well just
  execve() and avoid having a process just blocked in waitpid()
  on another.
* We should honor LIBDIR, in order to support lib64-style "multilib"
  as well as full Debian-style "multiarch".

Based on a patch from Colin Walters <walters@verbum.org>
Makefile.PL
pristine-tar.spec
zgz/zgz.c