1 | | From 02cb19835cb52bd84b0b5eaca1b4d6338417d261 Mon Sep 17 00:00:00 2001 |
2 | | From: Antoine Jacoutot <ajacoutot@gnome.org> |
3 | | Date: Tue, 15 Oct 2013 07:36:30 +0000 |
4 | | Subject: portability: canonicalize_file_name -> realpath |
5 | | |
6 | | canonicalize_file_name() is a GNU extension so let's use the portable |
7 | | realpath() instead. |
8 | | |
9 | | https://bugzilla.gnome.org/show_bug.cgi?id=710163 |
10 | | --- |
11 | | diff --git a/rsvg-base.c b/rsvg-base.c |
12 | | index cb9f64a..fb829e7 100644 |
13 | | --- rsvg-base.c |
14 | | +++ rsvg-base.c |
15 | | @@ -50,6 +50,8 @@ |
16 | | #include <math.h> |
17 | | #include <string.h> |
18 | | #include <stdarg.h> |
19 | | +#include <limits.h> |
20 | | +#include <stdlib.h> |
21 | | |
22 | | #include "rsvg-path.h" |
23 | | #include "rsvg-paint-server.h" |
24 | | @@ -2190,8 +2192,7 @@ _rsvg_handle_allow_load (RsvgHandle *handle, |
25 | | dir = g_file_get_path (base); |
26 | | g_object_unref (base); |
27 | | |
28 | | - /* FIXME portability */ |
29 | | - cdir = canonicalize_file_name (dir); |
30 | | + cdir = realpath (dir, NULL); |
31 | | g_free (dir); |
32 | | if (cdir == NULL) |
33 | | goto deny; |
34 | | @@ -2200,8 +2201,7 @@ _rsvg_handle_allow_load (RsvgHandle *handle, |
35 | | if (path == NULL) |
36 | | goto deny; |
37 | | |
38 | | - /* FIXME portability */ |
39 | | - cpath = canonicalize_file_name (path); |
40 | | + cpath = realpath (path, NULL); |
41 | | g_free (path); |
42 | | |
43 | | if (cpath == NULL) |
44 | | -- |
45 | | cgit v0.9.2 |