linuxmint / cinnamon-menus

The cinnamon-menu library
GNU General Public License v2.0
26 stars 20 forks source link

Switch to modern realpath() #20

Closed pinotree closed 5 years ago

pinotree commented 5 years ago

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

clefebvre commented 5 years ago

Thanks @pinotree