From 9fb2521b153582faf2d79e29f44421d34c2b6ae1 Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Fri, 29 Dec 2006 16:51:27 +0100 Subject: Removed some dead (and buggy) code. --- pkgutil.cc | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'pkgutil.cc') diff --git a/pkgutil.cc b/pkgutil.cc index 62a9edf7..943c420f 100644 --- a/pkgutil.cc +++ b/pkgutil.cc @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include @@ -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("//"); -- cgit v1.2.3