libbsd: Branch 'master' - 5 commits
Guillem Jover
guillem at kemper.freedesktop.org
Sat Jan 13 15:58:32 UTC 2018
configure.ac | 2 +-
include/bsd/stdlib.h | 2 ++
include/bsd/string.h | 2 ++
include/bsd/sys/cdefs.h | 4 ++--
man/arc4random.3bsd | 6 +++++-
man/explicit_bzero.3bsd | 3 ++-
man/libbsd.7 | 33 ++++++++++++++++++++++++++++-----
man/reallocarray.3bsd | 3 ++-
test/nlist.c | 4 ++--
9 files changed, 46 insertions(+), 13 deletions(-)
New commits:
commit 0b61c5ffeda8fc094e6aabc70d4d99058e46d769
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Jan 13 16:20:35 2018 +0100
Release libbsd 0.8.7
diff --git a/configure.ac b/configure.ac
index c909878..88ccd91 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,7 +13,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
LIBBSD_ABI_MAJOR=0
LIBBSD_ABI_MINOR=8
-LIBBSD_ABI_PATCH=6
+LIBBSD_ABI_PATCH=7
LIBBSD_ABI="$LIBBSD_ABI_MAJOR:$LIBBSD_ABI_MINOR:$LIBBSD_ABI_PATCH"
AC_SUBST([LIBBSD_ABI])
commit 9ceac74e91411d3f7dbbc42d772f3500c47c7cec
Author: Jason Duerstock <jason.duerstock at gmail.com>
Date: Sun Dec 3 16:50:07 2017 +0100
test: Fix nlist(3) unit test on IA64
On IA64 this is only the case in the ELF binary, but it gets normalized
when loaded at run-time.
Fixes: https://bugs.debian.org/881611
Signed-off-by: Guillem Jover <guillem at hadrons.org>
diff --git a/test/nlist.c b/test/nlist.c
index 893176e..c76d9e7 100644
--- a/test/nlist.c
+++ b/test/nlist.c
@@ -69,8 +69,8 @@ main(int argc, char **argv)
rc = nlist(argv[0], nl);
assert(rc == 0);
-#if defined(__ia64__) || (defined(__powerpc64__) && _CALL_ELF == 1)
- /* On IA64 and PowerPC 64-bit ELFv1, the functions are stored in
+#if defined(__powerpc64__) && _CALL_ELF == 1
+ /* On PowerPC 64-bit ELFv1, the functions are stored in
* the .text sections but they are accessed through a function
* descriptor stored in a data section, for example for PowerPC
* 64-bit that section is called .opd. */
commit 9afc7100a1078e177ff68349446526efe6872618
Author: Adam Lackorzynski <adam at os.inf.tu-dresden.de>
Date: Sun Dec 3 16:46:19 2017 +0100
Fix <sys/cdefs.h> for gcc with no __has_include or __has_include_next support
Fixes: https://bugs.freedesktop.org/103396
Signed-off-by: Guillem Jover <guillem at hadrons.org>
diff --git a/include/bsd/sys/cdefs.h b/include/bsd/sys/cdefs.h
index 044f221..b4c8f30 100644
--- a/include/bsd/sys/cdefs.h
+++ b/include/bsd/sys/cdefs.h
@@ -25,10 +25,10 @@
*/
#ifndef __has_include
-#define __has_include 1
+#define __has_include(x) 1
#endif
#ifndef __has_include_next
-#define __has_include_next 1
+#define __has_include_next(x) 1
#endif
#ifdef LIBBSD_OVERLAY
commit 22fbd62368c39de8ac5e249d1502d5ac0ffdef30
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Sep 2 19:55:50 2017 +0200
Handle several functions now being provided by glibc
We mention that these are now superseded by the glibc implementations,
make the headers cope with already declared functions on glibc-based
systems, and document this in the man pages.
diff --git a/include/bsd/stdlib.h b/include/bsd/stdlib.h
index 46a009e..ebc9638 100644
--- a/include/bsd/stdlib.h
+++ b/include/bsd/stdlib.h
@@ -67,7 +67,9 @@ int sradixsort(const unsigned char **base, int nmemb,
const unsigned char *table, unsigned endbyte);
void *reallocf(void *ptr, size_t size);
+#if defined(_GNU_SOURCE) && defined(__GLIBC__) && !__GLIBC_PREREQ(2, 26)
void *reallocarray(void *ptr, size_t nmemb, size_t size);
+#endif
long long strtonum(const char *nptr, long long minval, long long maxval,
const char **errstr);
diff --git a/include/bsd/string.h b/include/bsd/string.h
index ee2f953..6798bf6 100644
--- a/include/bsd/string.h
+++ b/include/bsd/string.h
@@ -42,7 +42,9 @@ size_t strlcat(char *dst, const char *src, size_t siz);
char *strnstr(const char *str, const char *find, size_t str_len);
void strmode(mode_t mode, char *str);
+#if defined(_GNU_SOURCE) && defined(__GLIBC__) && !__GLIBC_PREREQ(2, 25)
void explicit_bzero(void *buf, size_t len);
+#endif
__END_DECLS
#endif
diff --git a/man/explicit_bzero.3bsd b/man/explicit_bzero.3bsd
index b40929e..cf67c56 100644
--- a/man/explicit_bzero.3bsd
+++ b/man/explicit_bzero.3bsd
@@ -72,4 +72,5 @@ pass, making it useful for clearing sensitive memory such as a password.
The
.Fn explicit_bzero
function first appeared in
-.Ox 5.5 .
+.Ox 5.5 ,
+glibc 2.25.
diff --git a/man/libbsd.7 b/man/libbsd.7
index 19af0aa..ea2d281 100644
--- a/man/libbsd.7
+++ b/man/libbsd.7
@@ -150,13 +150,36 @@ function can be used.
Otherwise the code needs to be prepared for neither of these functions being
available.
.El
+.Sh SUPERSEDED
+Some functions have been superseded by implementations in other system
+libraries, and might disappear on the next SONAME bump, assuming those
+other implementation have widespread deployment, or the implementations
+are present in all major
+.Nm libc
+for example.
.Pp
-In addition, the MD5 set of digest funtions are now provided by the
+.Bl -tag -width 4m -compact
+.It Fn MD5Init
+.It Fn MD5Update
+.It Fn MD5Pad
+.It Fn MD5Final
+.It Fn MD5Transform
+.It Fn MD5End
+.It Fn MD5File
+.It Fn MD5FileChunk
+.It Fn MD5Data
+The set of MD5 digest functions are now provided by the
.Nm libmd
-companion library, so it is advised to use that instead, as the ones
-provided in
-.Nm libbsd
-might disappear on the next SONAME bump.
+companion library, so it is advised to use that instead.
+.It Fn explicit_bzero
+This function is provided by
+.Nm glibc
+2.25.
+.It Fn reallocarray
+This function is provided by
+.Nm glibc
+2.26.
+.El
.Sh SEE ALSO
.Xr arc4random 3bsd ,
.Xr bitstring 3bsd ,
diff --git a/man/reallocarray.3bsd b/man/reallocarray.3bsd
index b1aff9c..96563ea 100644
--- a/man/reallocarray.3bsd
+++ b/man/reallocarray.3bsd
@@ -102,4 +102,5 @@ is set to
.Sh HISTORY
.Fn reallocarray
appeared in
-.Ox 5.6 .
+.Ox 5.6 ,
+glibc 2.26.
commit b4f7c065ba6d6649c33f8876445ed30b971fe09e
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Aug 5 13:42:56 2017 +0200
man: Document on what other BSDs arc4random(3) is present
diff --git a/man/arc4random.3bsd b/man/arc4random.3bsd
index 107f246..1de6508 100644
--- a/man/arc4random.3bsd
+++ b/man/arc4random.3bsd
@@ -129,7 +129,11 @@ reserved to indicate an error.
.Xr random 3
.Sh HISTORY
These functions first appeared in
-.Ox 2.1 .
+.Ox 2.1 ,
+.Fx 3.0 ,
+.Nx 1.6 ,
+and
+.Dx 1.0 .
.Pp
The original version of this random number generator used the
RC4 (also known as ARC4) algorithm.
More information about the libbsd
mailing list