XBPS can now be built on NetBSD (and probably any other BSD variant).

This commit is contained in:
Juan RP
2012-12-06 12:58:17 +01:00
parent d6a65a5a55
commit 2c1e4e502d
15 changed files with 145 additions and 158 deletions

View File

@ -312,3 +312,16 @@ xbps_pkgpattern_match(const char *pkg, const char *pattern)
/* no match */
return 0;
}
/*
* Small wrapper for NetBSD's humanize_number(3) with some
* defaults set that we care about.
*/
int
xbps_humanize_number(char *buf, int64_t bytes)
{
assert(buf != NULL);
return humanize_number(buf, 7, bytes, "B",
HN_AUTOSCALE, HN_DECIMAL|HN_NOSPACE);
}