summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorChristoph Reiter <creiter@src.gnome.org>2019-06-15 09:42:17 +0200
committerChristoph Reiter <creiter@src.gnome.org>2019-06-15 10:08:31 +0200
commit175c4006780bfe4f433d02ad28f23f2c3429d811 (patch)
tree5191d5e7a6d1d5b96b5d9afaa42f0a21b2fd5f2a /modules
parent18177388d12bea311b9fea60357f05c26b9fecb9 (diff)
downloadgtk+-175c4006780bfe4f433d02ad28f23f2c3429d811.tar.gz
build/cups: remove checks for httpGetAuthString and http_t.authstring
httpGetAuthString() was added with cups 1.3 and we depend on a newer version now. The direct field access was a fallback in case httpGetAuthString() was missing, so this can also be dropped.
Diffstat (limited to 'modules')
-rw-r--r--modules/printbackends/cups/gtkcupsutils.c12
-rw-r--r--modules/printbackends/meson.build13
2 files changed, 3 insertions, 22 deletions
diff --git a/modules/printbackends/cups/gtkcupsutils.c b/modules/printbackends/cups/gtkcupsutils.c
index 8e7413a20a..723923b10a 100644
--- a/modules/printbackends/cups/gtkcupsutils.c
+++ b/modules/printbackends/cups/gtkcupsutils.c
@@ -709,13 +709,7 @@ _post_send (GtkCupsRequest *request)
httpClearFields (request->http);
httpSetField (request->http, HTTP_FIELD_CONTENT_LENGTH, length);
httpSetField (request->http, HTTP_FIELD_CONTENT_TYPE, "application/ipp");
-#ifdef HAVE_HTTPGETAUTHSTRING
httpSetField (request->http, HTTP_FIELD_AUTHORIZATION, httpGetAuthString (request->http));
-#else
-#ifdef HAVE_HTTP_AUTHSTRING
- httpSetField (request->http, HTTP_FIELD_AUTHORIZATION, request->http->authstring);
-#endif
-#endif
if (httpPost (request->http, request->resource))
{
@@ -1198,13 +1192,7 @@ _get_send (GtkCupsRequest *request)
}
httpClearFields (request->http);
-#ifdef HAVE_HTTPGETAUTHSTRING
httpSetField (request->http, HTTP_FIELD_AUTHORIZATION, httpGetAuthString (request->http));
-#else
-#ifdef HAVE_HTTP_AUTHSTRING
- httpSetField (request->http, HTTP_FIELD_AUTHORIZATION, request->http->authstring);
-#endif
-#endif
if (httpGet (request->http, request->resource))
{
diff --git a/modules/printbackends/meson.build b/modules/printbackends/meson.build
index a897f022ca..930b9012a8 100644
--- a/modules/printbackends/meson.build
+++ b/modules/printbackends/meson.build
@@ -74,17 +74,10 @@ if enabled_print_backends.contains('cups')
cups_major_version = cc.compute_int('CUPS_VERSION_MAJOR', prefix : '#include <cups/cups.h>')
cups_minor_version = cc.compute_int('CUPS_VERSION_MINOR', prefix : '#include <cups/cups.h>')
message('Found CUPS version: @0@.@1@'.format(cups_major_version, cups_minor_version))
- if cups_major_version >= 2
- if cc.compiles('#include <cups/http.h> \n http_t http; char *s = http.authstring;')
- cdata.set('HAVE_HTTP_AUTHSTRING', 1,
- description :'Define if cups http_t authstring field is accessible')
- endif
- libcups = cc.find_library('cups', required : true)
- if libcups.found() and cc.has_function('httpGetAuthString', dependencies : libcups)
- cdata.set('HAVE_HTTPGETAUTHSTRING', 1)
- endif
- else
+ if cups_major_version < 2
cups_error = 'Need CUPS version >= 2.0'
+ else
+ libcups = cc.find_library('cups', required : true)
endif
else
cups_error = 'Cannot find CUPS headers in default prefix.'