summaryrefslogtreecommitdiffstats
path: root/kdeprint/cups/ipprequest.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2014-12-25 19:10:23 +0100
committerSlávek Banko <slavek.banko@axis.cz>2015-12-23 02:22:57 +0100
commit1759e5eadf333c80a008b4e8ea2bdedcecc8a8c5 (patch)
tree7a9b63aca72bcb44ae33483f296f68d502933b57 /kdeprint/cups/ipprequest.cpp
parent24a6fc6f80d49256252bd774e287ebf7e25d2572 (diff)
downloadtdelibs-1759e5eadf333c80a008b4e8ea2bdedcecc8a8c5.tar.gz
tdelibs-1759e5eadf333c80a008b4e8ea2bdedcecc8a8c5.zip
Fix FTBFS because CUPS 2.x
This resolves Bug 2270 Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 592bebb509786ccec893b305d3ae6a0c76ed3bdb)
Diffstat (limited to 'kdeprint/cups/ipprequest.cpp')
-rw-r--r--kdeprint/cups/ipprequest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/kdeprint/cups/ipprequest.cpp b/kdeprint/cups/ipprequest.cpp
index 3506ec384..d2711ca93 100644
--- a/kdeprint/cups/ipprequest.cpp
+++ b/kdeprint/cups/ipprequest.cpp
@@ -407,7 +407,7 @@ bool IppRequest::doFileRequest(const TQString& res, const TQString& filename)
}
#ifdef HAVE_CUPS_NO_PWD_CACHE
-#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR <= 2
+#if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2)
strncpy( HTTP->authstring, cups_authstring.data(), HTTP_MAX_VALUE );
#else
httpSetAuthString( HTTP, NULL, cups_authstring.data() );
@@ -421,7 +421,7 @@ bool IppRequest::doFileRequest(const TQString& res, const TQString& filename)
request_ = cupsDoFileRequest(HTTP, request_, (res.isEmpty() ? "/" : res.latin1()), (filename.isEmpty() ? NULL : filename.latin1()));
#ifdef HAVE_CUPS_NO_PWD_CACHE
-#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR <= 2
+#if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2)
cups_authstring = HTTP->authstring;
#else
cups_authstring = httpGetAuthString( HTTP );
@@ -757,7 +757,7 @@ void IppRequest::setMap(const TQMap<TQString,TQString>& opts)
cupsFreeOptions(n, options);
// find an remove that annoying "document-format" attribute
-#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 2
+#if CUPS_VERSION_MAJOR > 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 2)
ipp_attribute_t *attr = ippFindAttribute(request_, "document-format", IPP_TAG_NAME);
ippDeleteAttribute(request_, attr);
#else