From e6cd1dc1e6c0d081382ee21c156b205204efc75b Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 14 Sep 2018 08:48:22 -0600 Subject: Update get_standard_cache_dir for macOS On macOS the usual cache directory is ~/Library/Caches. This patch changes get_standard_cache_dir to use that instead of XDG. gdb/ChangeLog 2018-09-17 Tom Tromey * common/pathstuff.c (get_standard_cache_dir): Use ~/Library/Caches on macOS. * common/pathstuff.h (get_standard_cache_dir): Update comment. gdb/doc/ChangeLog 2018-09-17 Tom Tromey * gdb.texinfo (Index Files): Update for cache directory change on macOS. --- gdb/common/pathstuff.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gdb/common/pathstuff.h') diff --git a/gdb/common/pathstuff.h b/gdb/common/pathstuff.h index d1aa6b3..a43b963 100644 --- a/gdb/common/pathstuff.h +++ b/gdb/common/pathstuff.h @@ -53,10 +53,14 @@ extern bool contains_dir_separator (const char *path); /* Get the usual user cache directory for the current platform. On Linux, it follows the XDG Base Directory specification: use - $XDG_CACHE_HOME/gdb if the XDG_CACHE_HOME environment variable is defined, - otherwise $HOME/.cache. The return value is absolute and tilde-expanded. + $XDG_CACHE_HOME/gdb if the XDG_CACHE_HOME environment variable is + defined, otherwise $HOME/.cache. - Return an empty string if neither XDG_CACHE_HOME or HOME are defined. */ + On macOS, it follows the local convention and uses + ~/Library/Caches/gdb. + + The return value is absolute and tilde-expanded. Return an empty + string if neither XDG_CACHE_HOME (on Linux) or HOME are defined. */ extern std::string get_standard_cache_dir (); -- cgit v1.1