summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/fileutl.h
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-02-26 16:31:25 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2019-02-26 16:31:25 +0100
commit3b13b8a0b79d625d2913518529a34e92b4f41539 (patch)
tree404745c04c1eb4548bd6151034229c98d97d36f6 /apt-pkg/contrib/fileutl.h
parent4935c8af8acd8856211c0a527bf4dec4dace0d08 (diff)
parente1024dc0acf72b9615c0821f005364543775a58a (diff)
Merge branch 'pu/abi6'
Diffstat (limited to 'apt-pkg/contrib/fileutl.h')
-rw-r--r--apt-pkg/contrib/fileutl.h19
1 files changed, 1 insertions, 18 deletions
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h
index 862880c31..fff49a757 100644
--- a/apt-pkg/contrib/fileutl.h
+++ b/apt-pkg/contrib/fileutl.h
@@ -133,20 +133,6 @@ class FileFd
unsigned long long FileSize();
time_t ModificationTime();
- /* You want to use 'unsigned long long' if you are talking about a file
- to be able to support large files (>2 or >4 GB) properly.
- This shouldn't happen all to often for the indexes, but deb's might be…
- And as the auto-conversation converts a 'unsigned long *' to a 'bool'
- instead of 'unsigned long long *' we need to provide this explicitly -
- otherwise applications magically start to fail… */
- bool Read(void *To,unsigned long long Size,unsigned long *Actual) APT_DEPRECATED_MSG("The Actual variable you pass in should be an unsigned long long")
- {
- unsigned long long R;
- bool const T = Read(To, Size, &R);
- *Actual = R;
- return T;
- }
-
bool Open(std::string FileName,unsigned int const Mode,CompressMode Compress,unsigned long const AccessMode = 0666);
bool Open(std::string FileName,unsigned int const Mode,APT::Configuration::Compressor const &compressor,unsigned long const AccessMode = 0666);
inline bool Open(std::string const &FileName,unsigned int const Mode, unsigned long const AccessMode = 0666) {
@@ -163,7 +149,6 @@ class FileFd
// Simple manipulators
inline int Fd() {return iFd;};
inline void Fd(int fd) { OpenDescriptor(fd, ReadWrite);};
- gzFile gzFd() APT_DEPRECATED_MSG("Implementation detail, do not use to be able to support bzip2, xz and co") APT_PURE;
inline bool IsOpen() {return iFd >= 0;};
inline bool Failed() {return (Flags & Fail) == Fail;};
@@ -294,9 +279,7 @@ std::vector<std::string> Glob(std::string const &pattern, int flags=0);
* \param Sandbox True if this should run sandboxed
* \return true on success, false on failure with _error set
*/
-bool Popen(const char *Args[], FileFd &Fd, pid_t &Child, FileFd::OpenMode Mode, bool CaptureStderr, bool Sandbox) APT_HIDDEN;
-bool Popen(const char* Args[], FileFd &Fd, pid_t &Child, FileFd::OpenMode Mode, bool CaptureStderr);
-bool Popen(const char* Args[], FileFd &Fd, pid_t &Child, FileFd::OpenMode Mode);
+bool Popen(const char *Args[], FileFd &Fd, pid_t &Child, FileFd::OpenMode Mode, bool CaptureStderr = true, bool Sandbox = false);
APT_HIDDEN bool OpenConfigurationFileFd(std::string const &File, FileFd &Fd);