libbsd: Branch 'main' - 3 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Feb 26 23:22:42 UTC 2023
.gitlab-ci.yml | 2 +-
include/bsd/unistd.h | 4 ++++
man/arc4random.3bsd | 6 ++++++
man/closefrom.3bsd | 13 +++++++++++--
man/fparseln.3bsd | 4 +++-
man/getpeereid.3bsd | 5 ++++-
man/humanize_number.3bsd | 4 +++-
man/pidfile.3bsd | 14 ++++++++++++++
man/pwcache.3bsd | 6 +++---
man/readpassphrase.3bsd | 6 ++++--
man/reallocarray.3bsd | 10 ++++++++--
man/setproctitle.3bsd | 2 ++
man/strlcpy.3bsd | 2 ++
man/strnstr.3bsd | 5 +++++
man/strtonum.3bsd | 4 ++--
man/tree.3bsd | 3 +++
man/wcslcpy.3bsd | 11 +++++++++++
17 files changed, 86 insertions(+), 15 deletions(-)
New commits:
commit 59a21c7fb846c483460979be74c546edab0d185e
Author: Guillem Jover <guillem at hadrons.org>
Date: Mon Feb 20 00:11:10 2023 +0100
man: Update STANDARDS and HISTORY sections
Include BSD versions when functions were introduced. Add mention
whether these are BSD extensions.
diff --git a/man/arc4random.3bsd b/man/arc4random.3bsd
index 547bd54..f1dc254 100644
--- a/man/arc4random.3bsd
+++ b/man/arc4random.3bsd
@@ -135,6 +135,12 @@ These functions first appeared in
.Nx 1.6 ,
and
.Dx 1.0 .
+The functions
+.Fn arc4random ,
+.Fn arc4random_buf
+and
+.Fn arc4random_uniform
+appeared in glibc 2.36.
.Pp
The original version of this random number generator used the
RC4 (also known as ARC4) algorithm.
diff --git a/man/closefrom.3bsd b/man/closefrom.3bsd
index 9e1b0db..5f930f5 100644
--- a/man/closefrom.3bsd
+++ b/man/closefrom.3bsd
@@ -51,8 +51,17 @@ from the per-process object reference table.
Any errors encountered while closing file descriptors are ignored.
.Sh SEE ALSO
.Xr close 2
+.Sh STANDARDS
+.Fn closefrom
+is a
+.Bx
+and Solaris extension.
.Sh HISTORY
The
.Fn closefrom
-function first appeared in
-.Fx 8.0 .
+function first appeared in Solaris 9,
+.Ox 3.5 ,
+.Dx 1.2 ,
+.Nx 3 ,
+.Fx 8.0
+and glibc 2.26.
diff --git a/man/fparseln.3bsd b/man/fparseln.3bsd
index ab8ad7b..b227f0d 100644
--- a/man/fparseln.3bsd
+++ b/man/fparseln.3bsd
@@ -150,4 +150,6 @@ if it runs out of memory.
The
.Fn fparseln
function first appeared in
-.Nx 1.4 .
+.Nx 1.4
+and
+.Fx 4.0 .
diff --git a/man/getpeereid.3bsd b/man/getpeereid.3bsd
index eafa4b4..4cc7cc6 100644
--- a/man/getpeereid.3bsd
+++ b/man/getpeereid.3bsd
@@ -139,4 +139,7 @@ or the kernel returned invalid data.
The
.Fn getpeereid
function appeared in
-.Fx 4.6 .
+.Fx 4.6 ,
+.Nx 5.0
+and
+.Ox 3.0 .
diff --git a/man/humanize_number.3bsd b/man/humanize_number.3bsd
index 45b1d68..02ce9af 100644
--- a/man/humanize_number.3bsd
+++ b/man/humanize_number.3bsd
@@ -166,7 +166,9 @@ represented a number that does not fit in
.Sh HISTORY
.Fn humanize_number
first appeared in
-.Nx 2.0 .
+.Nx 2.0
+and
+.Fx 5.3 .
.Pp
.Fn dehumanize_number
first appeared in
diff --git a/man/pidfile.3bsd b/man/pidfile.3bsd
index 634ac81..547c556 100644
--- a/man/pidfile.3bsd
+++ b/man/pidfile.3bsd
@@ -292,6 +292,20 @@ Probably called not from the process which used
.Xr open 2 ,
.Xr daemon 3 ,
.Xr flopen 3bsd
+.Sh HISTORY
+The functions
+.Fn pidfile_open ,
+.Fn pidfile_write ,
+.Fn pidfile_close
+and
+.Fn pidfile_remove
+first appeared in
+.Fx 5.5 .
+.Pp
+The function
+.Fn pidfile_fileno
+first appeared in
+.Fx 10.0 .
.Sh AUTHORS
.An -nosplit
The
diff --git a/man/pwcache.3bsd b/man/pwcache.3bsd
index 366c0b2..06c54e1 100644
--- a/man/pwcache.3bsd
+++ b/man/pwcache.3bsd
@@ -137,7 +137,7 @@ The
.Fn uid_from_user
and
.Fn gid_from_group
-functions were ported from
-.Nx
-and first appeared in
+functions first appeared in
+.Nx 1.4
+and
.Ox 6.4 .
diff --git a/man/readpassphrase.3bsd b/man/readpassphrase.3bsd
index 23e5e4c..3c9275d 100644
--- a/man/readpassphrase.3bsd
+++ b/man/readpassphrase.3bsd
@@ -165,10 +165,12 @@ will reprint the prompt and the user may then enter a passphrase.
The
.Fn readpassphrase
function is an
-.Ox
+.Bx
extension and should not be used if portability is desired.
.Sh HISTORY
The
.Fn readpassphrase
function first appeared in
-.Ox 2.9 .
+.Ox 2.9
+and
+.Fx 4.6 .
diff --git a/man/reallocarray.3bsd b/man/reallocarray.3bsd
index f4dbf2b..a63de81 100644
--- a/man/reallocarray.3bsd
+++ b/man/reallocarray.3bsd
@@ -283,12 +283,18 @@ The
.Fn reallocarray
function appeared in
.Ox 5.6 ,
+.Dx 5.5
and glibc 2.26.
+.Pp
The
.Fn recallocarray
function appeared in
-.Ox 6.1 .
+.Ox 6.1
+and
+.Dx 5.5 .
The
.Fn freezero
function appeared in
-.Ox 6.2 .
+.Ox 6.2
+and
+.Dx 5.5 .
diff --git a/man/setproctitle.3bsd b/man/setproctitle.3bsd
index 4a6609f..c8aeb4b 100644
--- a/man/setproctitle.3bsd
+++ b/man/setproctitle.3bsd
@@ -112,6 +112,8 @@ The
.Fn setproctitle
function
first appeared in
+.Nx 1.0
+and
.Fx 2.2 .
Other operating systems have
similar functions.
diff --git a/man/strlcpy.3bsd b/man/strlcpy.3bsd
index 19aaa75..ebc9758 100644
--- a/man/strlcpy.3bsd
+++ b/man/strlcpy.3bsd
@@ -192,4 +192,6 @@ and
functions first appeared in
.Ox 2.4 ,
and made their appearance in
+.Nx 1.4.3
+and
.Fx 3.3 .
diff --git a/man/strnstr.3bsd b/man/strnstr.3bsd
index 44756e6..95e729e 100644
--- a/man/strnstr.3bsd
+++ b/man/strnstr.3bsd
@@ -112,3 +112,8 @@ ptr = strnstr(largestring, smallstring, 4);
.Xr strspn 3 ,
.Xr strtok 3 ,
.Xr wcsstr 3
+.Sh HISTORY
+The
+.Fn strnstr
+function originated in
+.Fx .
diff --git a/man/strtonum.3bsd b/man/strtonum.3bsd
index 44107b1..1041782 100644
--- a/man/strtonum.3bsd
+++ b/man/strtonum.3bsd
@@ -141,8 +141,8 @@ The string did not consist solely of digit characters.
.Xr strtoull 3
.Sh STANDARDS
.Fn strtonum
-is an
-.Ox
+is a
+.Bx
extension.
.Sh HISTORY
.ds doc-operating-system-NetBSD-8.0 8.0
diff --git a/man/tree.3bsd b/man/tree.3bsd
index 2bd4f17..4c9dfb6 100644
--- a/man/tree.3bsd
+++ b/man/tree.3bsd
@@ -562,6 +562,9 @@ main(void)
.Ed
.Sh SEE ALSO
.Xr queue 3bsd
+.Sh HISTORY
+The tree macros first appeared in
+.Fx 4.6 .
.Sh NOTES
Trying to free a tree in the following way is a common error:
.Bd -literal -offset indent
diff --git a/man/wcslcpy.3bsd b/man/wcslcpy.3bsd
index f7ed5a2..3a6169c 100644
--- a/man/wcslcpy.3bsd
+++ b/man/wcslcpy.3bsd
@@ -69,3 +69,14 @@ counterpart, such as
and
.Fn wcslcpy ,
which are BSD extensions.
+.Sh HISTORY
+The
+.Fn wcslcpy
+and
+.Fn wcslcat
+functions first appeared in
+.Ox 3.8 ,
+.Nx 1.6 ,
+.Fx 5.0
+and
+.Dx 2.1.1 .
commit 7b4ebd6521a693f236cad4170fce1bb5237ecae5
Author: Callum Farmer <callumjfarmer13 at gmail.com>
Date: Thu Feb 16 21:26:05 2023 +0000
include: Adjust closefrom() per glibc adoption
Added in glibc 2.34
https://sourceware.org/git/?p=glibc.git;a=commit;h=607449506f197cc9514408908f41f22537a47a8c
Signed-off-by: Guillem Jover <guillem at hadrons.org>
diff --git a/include/bsd/unistd.h b/include/bsd/unistd.h
index 167241b..20b0993 100644
--- a/include/bsd/unistd.h
+++ b/include/bsd/unistd.h
@@ -59,7 +59,11 @@ int bsd_getopt(int argc, char * const argv[], const char *shortopts);
mode_t getmode(const void *set, mode_t mode);
void *setmode(const char *mode_str);
+#if !defined(__GLIBC__) || \
+ !__GLIBC_PREREQ(2, 34) || \
+ !defined(_DEFAULT_SOURCE)
void closefrom(int lowfd);
+#endif
/* Compatibility with sendmail implementations. */
#define initsetproctitle(c, a, e) setproctitle_init((c), (a), (e))
commit 0dfbe7699e10a4e68859eba6a878524002bdb5c5
Author: Guillem Jover <guillem at hadrons.org>
Date: Fri Feb 17 22:28:45 2023 +0100
build: Switch to debian:latest Docker image
This should always point to the latest Debian stable images.
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e9d6b80..18582ed 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,7 +10,7 @@
- gcovr -s -e test/
.debian:
- image: debian:buster
+ image: debian:latest
stage: test
before_script:
- apt-get update -qq
More information about the libbsd
mailing list