gtk+ r21079 - in trunk: . modules/printbackends/cups
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r21079 - in trunk: . modules/printbackends/cups
- Date: Mon, 11 Aug 2008 19:59:50 +0000 (UTC)
Author: matthiasc
Date: Mon Aug 11 19:59:50 2008
New Revision: 21079
URL: http://svn.gnome.org/viewvc/gtk+?rev=21079&view=rev
Log:
Fix build with old cups
Modified:
trunk/ChangeLog
trunk/modules/printbackends/cups/gtkcupsutils.c
trunk/modules/printbackends/cups/gtkcupsutils.h
Modified: trunk/modules/printbackends/cups/gtkcupsutils.c
==============================================================================
--- trunk/modules/printbackends/cups/gtkcupsutils.c (original)
+++ trunk/modules/printbackends/cups/gtkcupsutils.c Mon Aug 11 19:59:50 2008
@@ -1204,6 +1204,7 @@
gtk_cups_connection_test_new (const char *server)
{
GtkCupsConnectionTest *result = NULL;
+#ifdef HAVE_CUPS_API_1_2
gchar *port_str = NULL;
result = g_new (GtkCupsConnectionTest, 1);
@@ -1222,6 +1223,9 @@
result->success_at_init = FALSE;
result->success_at_init = gtk_cups_connection_test_is_server_available (result);
+#else
+ result = g_new (GtkCupsConnectionTest, 1);
+#endif
return result;
}
@@ -1235,6 +1239,7 @@
gboolean
gtk_cups_connection_test_is_server_available (GtkCupsConnectionTest *test)
{
+#ifdef HAVE_CUPS_API_1_2
http_addrlist_t *iter;
gboolean result = FALSE;
gint flags;
@@ -1295,6 +1300,9 @@
return result;
}
+#else
+ return TRUE;
+#endif
}
/* This function frees memory used by the GtkCupsConnectionTest structure.
@@ -1305,6 +1313,7 @@
if (test == NULL)
return;
+#ifdef HAVE_CUPS_API_1_2
test->current_addr = NULL;
httpAddrFreeList (test->addrlist);
if (test->socket != -1)
@@ -1312,5 +1321,6 @@
close (test->socket);
test->socket = -1;
}
+#endif
g_free (test);
}
Modified: trunk/modules/printbackends/cups/gtkcupsutils.h
==============================================================================
--- trunk/modules/printbackends/cups/gtkcupsutils.h (original)
+++ trunk/modules/printbackends/cups/gtkcupsutils.h Mon Aug 11 19:59:50 2008
@@ -83,10 +83,12 @@
struct _GtkCupsConnectionTest
{
+#ifdef HAVE_CUPS_API_1_2
http_addrlist_t *addrlist;
http_addrlist_t *current_addr;
gboolean success_at_init;
gint socket;
+#endif
};
#define GTK_CUPS_REQUEST_START 0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]