summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-12-13 00:54:37 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-12-13 00:54:37 +0100
commita4f6bdc8bd91c7282ae9ac60c44844c6f0058a65 (patch)
treee72c9cda1f1b29c9bf0744c2ebf04c43d7b22500 /apt-pkg/contrib
parent699b209e5122f8fcd85fc4666c9b7020286ab0d0 (diff)
revert 2184.1.2: do not pollute namespace in headers
The breakage is just to big for now, so guard the change with #ifndef APT_8_CLEANER_HEADERS and be nice to library users
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r--apt-pkg/contrib/cdromutl.h4
-rw-r--r--apt-pkg/contrib/configuration.h4
-rw-r--r--apt-pkg/contrib/fileutl.h4
-rw-r--r--apt-pkg/contrib/hashes.h6
-rw-r--r--apt-pkg/contrib/hashsum_template.h5
-rw-r--r--apt-pkg/contrib/md5.h5
-rw-r--r--apt-pkg/contrib/mmap.h4
-rw-r--r--apt-pkg/contrib/progress.h4
-rw-r--r--apt-pkg/contrib/sha1.h5
-rw-r--r--apt-pkg/contrib/strutl.h6
10 files changed, 47 insertions, 0 deletions
diff --git a/apt-pkg/contrib/cdromutl.h b/apt-pkg/contrib/cdromutl.h
index 2c6afac0f..e94045b5c 100644
--- a/apt-pkg/contrib/cdromutl.h
+++ b/apt-pkg/contrib/cdromutl.h
@@ -12,6 +12,10 @@
#include <string>
+#ifndef APT_8_CLEANER_HEADERS
+using std::string;
+#endif
+
// mount cdrom, DeviceName (e.g. /dev/sr0) is optional
bool MountCdrom(std::string Path, std::string DeviceName="");
bool UnmountCdrom(std::string Path);
diff --git a/apt-pkg/contrib/configuration.h b/apt-pkg/contrib/configuration.h
index f6f2a3c1d..4c2e75041 100644
--- a/apt-pkg/contrib/configuration.h
+++ b/apt-pkg/contrib/configuration.h
@@ -34,6 +34,10 @@
#include <vector>
#include <iostream>
+#ifndef APT_8_CLEANER_HEADERS
+using std::string;
+#endif
+
class Configuration
{
public:
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h
index f96dc72dc..8a986b82b 100644
--- a/apt-pkg/contrib/fileutl.h
+++ b/apt-pkg/contrib/fileutl.h
@@ -29,6 +29,10 @@
#include <zlib.h>
+#ifndef APT_8_CLEANER_HEADERS
+using std::string;
+#endif
+
/* Define this for python-apt */
#define APT_HAS_GZIP 1
diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h
index 81851dede..b206eccb8 100644
--- a/apt-pkg/contrib/hashes.h
+++ b/apt-pkg/contrib/hashes.h
@@ -22,6 +22,12 @@
#include <vector>
#include <cstring>
+
+#ifndef APT_8_CLEANER_HEADERS
+using std::min;
+using std::vector;
+#endif
+
// helper class that contains hash function name
// and hash
class HashString
diff --git a/apt-pkg/contrib/hashsum_template.h b/apt-pkg/contrib/hashsum_template.h
index 27d192b82..6301ac9d0 100644
--- a/apt-pkg/contrib/hashsum_template.h
+++ b/apt-pkg/contrib/hashsum_template.h
@@ -15,6 +15,11 @@
#include <algorithm>
#include <stdint.h>
+#ifndef APT_8_CLEANER_HEADERS
+using std::string;
+using std::min;
+#endif
+
template<int N>
class HashSumValue
{
diff --git a/apt-pkg/contrib/md5.h b/apt-pkg/contrib/md5.h
index a207da4e4..25631b166 100644
--- a/apt-pkg/contrib/md5.h
+++ b/apt-pkg/contrib/md5.h
@@ -31,6 +31,11 @@
#include "hashsum_template.h"
+#ifndef APT_8_CLEANER_HEADERS
+using std::string;
+using std::min;
+#endif
+
typedef HashSumValue<128> MD5SumValue;
class MD5Summation : public SummationImplementation
diff --git a/apt-pkg/contrib/mmap.h b/apt-pkg/contrib/mmap.h
index 2ed4a95f8..602de94f8 100644
--- a/apt-pkg/contrib/mmap.h
+++ b/apt-pkg/contrib/mmap.h
@@ -28,6 +28,10 @@
#include <string>
+#ifndef APT_8_CLEANER_HEADERS
+using std::string;
+#endif
+
class FileFd;
/* This should be a 32 bit type, larger tyes use too much ram and smaller
diff --git a/apt-pkg/contrib/progress.h b/apt-pkg/contrib/progress.h
index 7635719bc..3a6943aee 100644
--- a/apt-pkg/contrib/progress.h
+++ b/apt-pkg/contrib/progress.h
@@ -25,6 +25,10 @@
#include <string>
#include <sys/time.h>
+#ifndef APT_8_CLEANER_HEADERS
+using std::string;
+#endif
+
class Configuration;
class OpProgress
{
diff --git a/apt-pkg/contrib/sha1.h b/apt-pkg/contrib/sha1.h
index b4b139a22..a8d55eb13 100644
--- a/apt-pkg/contrib/sha1.h
+++ b/apt-pkg/contrib/sha1.h
@@ -20,6 +20,11 @@
#include "hashsum_template.h"
+#ifndef APT_8_CLEANER_HEADERS
+using std::string;
+using std::min;
+#endif
+
typedef HashSumValue<160> SHA1SumValue;
class SHA1Summation : public SummationImplementation
diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h
index 93f4bef4f..337139d5d 100644
--- a/apt-pkg/contrib/strutl.h
+++ b/apt-pkg/contrib/strutl.h
@@ -27,6 +27,12 @@
#include "macros.h"
+#ifndef APT_8_CLEANER_HEADERS
+using std::string;
+using std::vector;
+using std::ostream;
+#endif
+
bool UTF8ToCodeset(const char *codeset, const std::string &orig, std::string *dest);
char *_strstrip(char *String);
char *_strtabexpand(char *String,size_t Len);