Bug#438998: gtk+2.0: FTBFS with cups 1.3: code accessing http_t do no longer build

Thadeu Lima de Souza Cascardo cascardo at minaslivre.org
Tue Aug 21 14:02:50 UTC 2007


Package: gtk+2.0
Version: 2.10.13-1
Severity: serious
Tags: patch
Justification: no longer builds from source

Since cups 1.3, http_t members may not be directly accessed.
There are functions to access most of them, however.

This patch checks for cups >= 1.3 and uses the new functions
in this case.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.21-2-vserver-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
-------------- next part --------------
--- gtk+2.0-2.10.13.orig/modules/printbackends/cups/gtkcupsutils.c
+++ gtk+2.0-2.10.13/modules/printbackends/cups/gtkcupsutils.c
@@ -33,6 +33,9 @@
 #if CUPS_VERSION_MAJOR > 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR > 1) || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR == 1 && CUPS_VERSION_PATCH >= 20)
 #define HAVE_HTTP_AUTHSTRING 1
 #endif
+#if CUPS_VERSION_MAJOR > 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR > 2)
+#define HAVE_GET_HTTP_AUTHSTRING
+#endif
 
 typedef void (*GtkCupsRequestStateFunc) (GtkCupsRequest *request);
 
@@ -627,7 +630,9 @@
   httpClearFields(request->http);
   httpSetField(request->http, HTTP_FIELD_CONTENT_LENGTH, length);
   httpSetField(request->http, HTTP_FIELD_CONTENT_TYPE, "application/ipp");
-#ifdef HAVE_HTTP_AUTHSTRING
+#if defined (HAVE_GET_HTTP_AUTHSTRING)
+  httpSetField(request->http, HTTP_FIELD_AUTHORIZATION, httpGetAuthString (request->http));
+#elif defined (HAVE_HTTP_AUTHSTRING)
   httpSetField(request->http, HTTP_FIELD_AUTHORIZATION, request->http->authstring);
 #endif
 
@@ -966,7 +971,9 @@
     }
 
   httpClearFields(request->http);
-#ifdef HAVE_HTTP_AUTHSTRING
+#if defined (HAVE_GET_HTTP_AUTHSTRING)
+  httpSetField(request->http, HTTP_FIELD_AUTHORIZATION, httpGetAuthString (request->http));
+#elif defined (HAVE_HTTP_AUTHSTRING)
   httpSetField(request->http, HTTP_FIELD_AUTHORIZATION, request->http->authstring);
 #endif
 


More information about the pkg-gnome-maintainers mailing list