From 82108808f13d056b3904c1717658a306a4aba2dd Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 25 Dec 2018 16:44:19 +0100 Subject: Switch to modern realpath() Assume everywhere that the realpath() implementation has the POSIX.1-2008 behaviour, i.e. allowing NULL as second parameter and thus returning a newly allocated buffer; it is not just a GNU extension, and supported already by modern libc's on other OSes. menu_canonicalize_file_name() is always called with FALSE as second parameter, so it is replaced directly by realpath(); this allows the complete removal of canonicalize.{c,h}. This is a forward-port of the same changes done in gnome-menus, see: https://gitlab.gnome.org/GNOME/gnome-menus/merge_requests/4 --- libmenu/canonicalize.h | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 libmenu/canonicalize.h (limited to 'libmenu/canonicalize.h') diff --git a/libmenu/canonicalize.h b/libmenu/canonicalize.h deleted file mode 100644 index bb291cf..0000000 --- a/libmenu/canonicalize.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Return the canonical absolute name of a given file. - * Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc. - * This file is part of the GNU C Library. - * - * Copyright (C) 2002 Red Hat, Inc. (trivial port to GLib) - * - * The GNU C Library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * The GNU C Library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the GNU C Library; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA. - */ - -#ifndef MATE_CANONICALIZE_H -#define MATE_CANONICALIZE_H - -#include - -G_BEGIN_DECLS - -char* menu_canonicalize_file_name(const char* name, gboolean allow_missing_basename); - -G_END_DECLS - -#endif /* MATE_CANONICALIZE_H */ -- cgit v1.2.1