summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/fileutl.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-03-05 22:11:25 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-03-13 13:58:45 +0100
commit453b82a388013e522b3a1b9fcd6ed0810dab1f4f (patch)
treebaa519d4f494816eb31b4cd4d06351c2ba23a1b7 /apt-pkg/contrib/fileutl.h
parent54298f49d71347616df19b8d2f59c907374e07b3 (diff)
cleanup headers and especially #includes everywhere
Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
Diffstat (limited to 'apt-pkg/contrib/fileutl.h')
-rw-r--r--apt-pkg/contrib/fileutl.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h
index e752e9621..6fdea1294 100644
--- a/apt-pkg/contrib/fileutl.h
+++ b/apt-pkg/contrib/fileutl.h
@@ -27,6 +27,7 @@
#include <string>
#include <vector>
#include <set>
+#include <time.h>
#include <zlib.h>
@@ -94,7 +95,7 @@ class FileFd
And as the auto-conversation converts a 'unsigned long *' to a 'bool'
instead of 'unsigned long long *' we need to provide this explicitely -
otherwise applications magically start to fail… */
- __deprecated bool Read(void *To,unsigned long long Size,unsigned long *Actual)
+ bool Read(void *To,unsigned long long Size,unsigned long *Actual) APT_DEPRECATED
{
unsigned long long R;
bool const T = Read(To, Size, &R);
@@ -118,7 +119,7 @@ class FileFd
// Simple manipulators
inline int Fd() {return iFd;};
inline void Fd(int fd) { OpenDescriptor(fd, ReadWrite);};
- __deprecated gzFile gzFd();
+ gzFile gzFd() APT_DEPRECATED;
inline bool IsOpen() {return iFd >= 0;};
inline bool Failed() {return (Flags & Fail) == Fail;};
@@ -152,8 +153,8 @@ class FileFd
bool OpenInternDescriptor(unsigned int const Mode, APT::Configuration::Compressor const &compressor);
// private helpers to set Fail flag and call _error->Error
- bool FileFdErrno(const char* Function, const char* Description,...) __like_printf(3) __cold;
- bool FileFdError(const char* Description,...) __like_printf(2) __cold;
+ bool FileFdErrno(const char* Function, const char* Description,...) APT_PRINTF(3) APT_COLD;
+ bool FileFdError(const char* Description,...) APT_PRINTF(2) APT_COLD;
};
bool RunScripts(const char *Cnf);
@@ -161,7 +162,7 @@ bool CopyFile(FileFd &From,FileFd &To);
int GetLock(std::string File,bool Errors = true);
bool FileExists(std::string File);
bool RealFileExists(std::string File);
-bool DirectoryExists(std::string const &Path) __attrib_const;
+bool DirectoryExists(std::string const &Path) APT_CONST;
bool CreateDirectory(std::string const &Parent, std::string const &Path);
time_t GetModificationTime(std::string const &Path);