Contents of /trunk/gimp/patches/gimp-2.6.11-curl.patch
Parent Directory | Revision Log
Revision 1595 -
(show annotations)
(download)
Tue Dec 6 00:26:20 2011 UTC (12 years, 9 months ago) by niro
File size: 2580 byte(s)
Tue Dec 6 00:26:20 2011 UTC (12 years, 9 months ago) by niro
File size: 2580 byte(s)
-fix build against newer curl
1 | diff -aur gimp-2.6.11/plug-ins/file-uri/uri-backend-libcurl.c gimp-2.6.11.patched/plug-ins/file-uri/uri-backend-libcurl.c |
2 | --- gimp-2.6.11/plug-ins/file-uri/uri-backend-libcurl.c 2010-07-03 00:51:59.000000000 +0200 |
3 | +++ gimp-2.6.11.patched/plug-ins/file-uri/uri-backend-libcurl.c 2011-06-23 19:15:30.000000000 +0200 |
4 | @@ -4,9 +4,9 @@ |
5 | * libcurl backend for the URI plug-in |
6 | * Copyright (C) 2006 Mukund Sivaraman <muks@mukund.org> |
7 | * |
8 | - * This program is free software; you can redistribute it and/or modify |
9 | + * This program is free software: you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License as published by |
11 | - * the Free Software Foundation; either version 2 of the License, or |
12 | + * the Free Software Foundation; either version 3 of the License, or |
13 | * (at your option) any later version. |
14 | * |
15 | * This program is distributed in the hope that it will be useful, |
16 | @@ -15,8 +15,7 @@ |
17 | * GNU General Public License for more details. |
18 | * |
19 | * You should have received a copy of the GNU General Public License |
20 | - * along with this program; if not, write to the Free Software |
21 | - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
22 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
23 | */ |
24 | |
25 | #include "config.h" |
26 | @@ -24,7 +23,6 @@ |
27 | #include <errno.h> |
28 | |
29 | #include <curl/curl.h> |
30 | -#include <curl/types.h> |
31 | #include <curl/easy.h> |
32 | |
33 | #include <glib/gstdio.h> |
34 | @@ -63,7 +61,7 @@ |
35 | |
36 | vinfo = curl_version_info (CURLVERSION_NOW); |
37 | |
38 | - protocols = g_string_new ("http:,ftp:"); |
39 | + protocols = g_string_new ("http:,ftp:,gopher:"); |
40 | |
41 | if (vinfo->features & CURL_VERSION_SSL) |
42 | { |
43 | @@ -153,7 +151,7 @@ |
44 | FILE *out_file; |
45 | CURL *curl_handle; |
46 | CURLcode result; |
47 | - gint response_code; |
48 | + glong response_code; |
49 | |
50 | gimp_progress_init (_("Connecting to server")); |
51 | |
52 | @@ -195,12 +193,12 @@ |
53 | |
54 | curl_easy_getinfo (curl_handle, CURLINFO_RESPONSE_CODE, &response_code); |
55 | |
56 | - if (response_code != 200) |
57 | + if (response_code != 200 && response_code != 226 && response_code != 0) |
58 | { |
59 | fclose (out_file); |
60 | g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED, |
61 | _("Opening '%s' for reading resulted in HTTP " |
62 | - "response code: %d"), |
63 | + "response code: %ld"), |
64 | uri, response_code); |
65 | curl_easy_cleanup (curl_handle); |
66 | return FALSE; |
67 | @@ -224,3 +222,10 @@ |
68 | |
69 | return FALSE; |
70 | } |
71 | + |
72 | +gchar * |
73 | +uri_backend_map_image (const gchar *uri, |
74 | + GimpRunMode run_mode) |
75 | +{ |
76 | + return NULL; |
77 | +} |