summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2020-11-14 17:57:50 +0000
committerScott Long <scottl@FreeBSD.org>2020-11-14 17:57:50 +0000
commitc849e60a2f065550b40f37193d55f34933c7961a (patch)
tree3860a9c5a5e9de4725f5f49e701bd79b31d8136f
parentfe76c1eca570a230b52f242deb1789a78fc38b19 (diff)
downloadpw-darwin-c849e60a2f065550b40f37193d55f34933c7961a.tar.gz
pw-darwin-c849e60a2f065550b40f37193d55f34933c7961a.tar.zst
pw-darwin-c849e60a2f065550b40f37193d55f34933c7961a.zip
Add the library function getlocalbase and its manual page. This helps to
unify the retrieval of the various ways that the local software base directory, typically "/usr/local", is expressed in the system. Reviewed by: se Differential Revision: https://reviews.freebsd.org/D27022
-rw-r--r--libutil/libutil.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libutil/libutil.h b/libutil/libutil.h
index 2ac5e97..8f093b5 100644
--- a/libutil/libutil.h
+++ b/libutil/libutil.h
@@ -98,6 +98,7 @@ int flopen(const char *_path, int _flags, ...);
int flopenat(int _dirfd, const char *_path, int _flags, ...);
int forkpty(int *_amaster, char *_name,
struct termios *_termp, struct winsize *_winp);
+ssize_t getlocalbase(char *path, size_t pathlen);
void hexdump(const void *_ptr, int _length, const char *_hdr, int _flags);
int humanize_number(char *_buf, size_t _len, int64_t _number,
const char *_suffix, int _scale, int _flags);