GNOME Bugzilla – Bug 467414
gtkcupsutil.c won't build with cups 1.3
Last modified: 2007-09-07 18:35:25 UTC
API changes in CUPS 1.3 break gtkcupsutil.c build. From V1.3b1 changelog: "- Moved the definition of the (private) _http_s structure to http-private.h; code that directly accesses the http_t members will no longer compile!"
Ok, it seems that configuring again after upgrading cups makes the trick. However, it is still possible to access the http.authstring field by using httpGetAuthString () (added in cups 1.3): Something on the line of this would make it: Index: gtkcupsutils.c =================================================================== --- gtkcupsutils.c (revision 18633) +++ gtkcupsutils.c (working copy) @@ -971,6 +971,8 @@ _get_send (GtkCupsRequest *request) httpClearFields (request->http); #ifdef HAVE_HTTP_AUTHSTRING httpSetField (request->http, HTTP_FIELD_AUTHORIZATION, request->http->authstring); +#else + httpSetField (request->http, HTTP_FIELD_AUTHORIZATION, httpGetAuthString (request->http)); #endif if (httpGet (request->http, request->resource))
Created attachment 93806 [details] [review] a better approach than current I think this approach is a bit cleaner than current. Check if the 1.3 API is available and if so, use httpGetAuthString() instead of accessing the http.authstring field directly. hth
Created attachment 93810 [details] [review] fixed version a bit cleaner (some autotools magic)
There are some really old cups versions with no authstring at all. So there should probably be still another test.
Is gtk+ really targeting such cups versions?
This also seems to be affecting the stable branch. http://mail.gnome.org/archives/gtk-list/2007-August/msg00080.html
Committed a slightly different patch 2007-09-07 Matthias Clasen <mclasen@redhat.com> * configure.in: Check for the cups function httpGetAuthString(). * modules/printbackends/cups/gtkcupsutils.c: Use httpGetAuthString() if available. (#467414, Claudio Saavedra)