Unify shell-finding logic
[deliverable/binutils-gdb.git] / gdb / common / pathstuff.h
index d1aa6b306c35701391281f36f5b67fd3dd00bc07..0a8caeacba773cf1874e8357f73869f43063c8a5 100644 (file)
@@ -53,11 +53,20 @@ 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 ();
 
+/* Return the file name of the user's shell.  Normally this comes from
+   the SHELL environment variable.  */
+
+extern const char *get_shell ();
+
 #endif /* PATHSTUFF_H */
This page took 0.026921 seconds and 4 git commands to generate.