diff options
author | Tilman Sauerbeck <tilman@crux.nu> | 2006-12-29 16:51:27 +0100 |
---|---|---|
committer | Tilman Sauerbeck <tilman@crux.nu> | 2006-12-29 16:51:27 +0100 |
commit | 9fb2521b153582faf2d79e29f44421d34c2b6ae1 (patch) | |
tree | 25f380cbcf0ca6ec2928d1589cc9e6e341ac5641 /pkgutil.cc | |
parent | 2a62ed9ad2688a873bc7773b2c3cf818456aeabb (diff) | |
download | pkgutils-9fb2521b153582faf2d79e29f44421d34c2b6ae1.tar.gz pkgutils-9fb2521b153582faf2d79e29f44421d34c2b6ae1.tar.xz |
Removed some dead (and buggy) code.
Diffstat (limited to 'pkgutil.cc')
-rw-r--r-- | pkgutil.cc | 37 |
1 files changed, 0 insertions, 37 deletions
@@ -38,7 +38,6 @@ #include <sys/param.h> #include <unistd.h> #include <fcntl.h> -#include <zlib.h> #include <libgen.h> #include <archive.h> #include <archive_entry.h> @@ -699,42 +698,6 @@ string mtos(mode_t mode) return s; } -int unistd_gzopen(char* pathname, int flags, mode_t mode) -{ - char* gz_mode; - - switch (flags & O_ACCMODE) { - case O_WRONLY: - gz_mode = "w"; - break; - - case O_RDONLY: - gz_mode = "r"; - break; - - case O_RDWR: - default: - errno = EINVAL; - return -1; - } - - int fd; - gzFile gz_file; - - if ((fd = open(pathname, flags, mode)) == -1) - return -1; - - if ((flags & O_CREAT) && fchmod(fd, mode)) - return -1; - - if (!(gz_file = gzdopen(fd, gz_mode))) { - errno = ENOMEM; - return -1; - } - - return (int)gz_file; -} - string trim_filename(const string& filename) { string search("//"); |