]> git.ipfire.org Git - thirdparty/libbsd.git/log
thirdparty/libbsd.git
7 years agoUpdate vis/unvis modules from NetBSD
Guillem Jover [Mon, 21 May 2018 01:09:05 +0000 (03:09 +0200)] 
Update vis/unvis modules from NetBSD

7 years agoUpdate readpassphrase() from OpenBSD
Guillem Jover [Sun, 20 May 2018 23:56:33 +0000 (01:56 +0200)] 
Update readpassphrase() from OpenBSD

7 years agoUpdate heapsort() from OpenBSD
Guillem Jover [Sun, 20 May 2018 23:34:17 +0000 (01:34 +0200)] 
Update heapsort() from OpenBSD

7 years agoUpdate fmtcheck() from NetBSD
Guillem Jover [Sun, 20 May 2018 22:31:15 +0000 (00:31 +0200)] 
Update fmtcheck() from NetBSD

7 years agoUpdate humanize_number() from FreeBSD
Guillem Jover [Sun, 20 May 2018 17:22:16 +0000 (19:22 +0200)] 
Update humanize_number() from FreeBSD

Implements HN_IEC_PREFIXES.

7 years agoUpdate pidfile module from FreeBSD
Guillem Jover [Sun, 20 May 2018 17:18:18 +0000 (19:18 +0200)] 
Update pidfile module from FreeBSD

Use EINVAL instead of EDOOFUS. Add a missing synopsis for
pidfile_fileno() in the man page. Move the definition of struct pidfh
from libutil.h into pidfile.c following upstream change.

7 years agoUpdate arc4random() headers from OpenBSD
Guillem Jover [Mon, 14 May 2018 22:41:26 +0000 (00:41 +0200)] 
Update arc4random() headers from OpenBSD

Split Linux support into its own header separate from the generic Unix
to fix a Linux-specific issue with clone(). Reset rsp to NULL on failure.

7 years agoUpdate getentropy() code from OpenBSD
Guillem Jover [Mon, 14 May 2018 22:41:26 +0000 (00:41 +0200)] 
Update getentropy() code from OpenBSD

Includes changes to handle the Linux syscall blocking when there is not
enough entropy during boot, by switching it to non-blocking mode and
falling back to the alternative implementations. Man page URL reference
fixes. Build fixes for Mac OS X.

Fixes: https://bugs.debian.org/898088
7 years agoAdd flopenat() function from FreeBSD
Guillem Jover [Sun, 20 May 2018 23:11:46 +0000 (01:11 +0200)] 
Add flopenat() function from FreeBSD

7 years agoAdd __arraycount() macro from NetBSD
Guillem Jover [Mon, 21 May 2018 01:00:47 +0000 (03:00 +0200)] 
Add __arraycount() macro from NetBSD

7 years agoFix build for openrisc with uClibc
Baruch Siach [Tue, 3 Apr 2018 17:10:14 +0000 (20:10 +0300)] 
Fix build for openrisc with uClibc

uClibc defines EM_OR1K instead of EM_OPENRISC for the OpenRISC ELF
e_machine ID. Use EM_OR1K when EM_OPENRISC is not defined.

This fixes the following build failure:

In file included from nlist.c:44:0:
nlist.c: In function ‘__elf_is_okay__’:
local-elf.h:224:23: error: ‘EM_OPENRISC’ undeclared (first use in this function)
 #define ELF_TARG_MACH EM_OPENRISC
                       ^
nlist.c:77:26: note: in expansion of macro ‘ELF_TARG_MACH’
   if (ehdr->e_machine == ELF_TARG_MACH &&
                          ^

Signed-off-by: Guillem Jover <guillem@hadrons.org>
7 years agoFix function declaration protection for glibc already providing them
Guillem Jover [Tue, 6 Mar 2018 00:39:45 +0000 (01:39 +0100)] 
Fix function declaration protection for glibc already providing them

On non-glibc based systems we cannot unconditionally use the
__GLIBC_PREREQ macro as it gets expanded before evaluation. Instead,
if it is undefined, define it to 0.

We should also always declare these functions on non-glibc based
systems. And on systems with a new enough glibc, which provides these
functions, we should still provide the declarations if _GNU_SOURCE
is *not* defined.

Reported-by: Jörg Krause <joerg.krause@embedded.rocks>
7 years agoRemove <features.h> inclusion from <bsd/libutil.h>
Guillem Jover [Tue, 6 Mar 2018 00:42:52 +0000 (01:42 +0100)] 
Remove <features.h> inclusion from <bsd/libutil.h>

This is a non-portable header, and we should not assume it is present.
Let the first system header pull it in if needed.

7 years agoHandle systems missing <sys/cdefs.h>
Guillem Jover [Tue, 6 Mar 2018 00:41:35 +0000 (01:41 +0100)] 
Handle systems missing <sys/cdefs.h>

This is a non-portable header, and we cannot expect it to be provided by
the system libc (e.g. musl). We just need and rely on declaration that
we have defined ourselves in our own <bsd/sys/cdefs.h>. So we switch to
only ever assume that.

Fixes: https://bugs.freedesktop.org/105281
7 years agoprogname: Port to Windows
Guillem Jover [Sun, 4 Mar 2018 23:37:47 +0000 (00:37 +0100)] 
progname: Port to Windows

Define the directory separator depending on the system targetted.

Reported-by: Progyan Bhattacharya <progyanb@acm.org>
7 years agoHandle SPARC V8+ on Sun Studio compiler
Guillem Jover [Sun, 4 Mar 2018 23:02:34 +0000 (00:02 +0100)] 
Handle SPARC V8+ on Sun Studio compiler

7 years agoAdd support for ELF machine EM_SPARC32PLUS
James Clarke [Sun, 4 Mar 2018 22:44:52 +0000 (23:44 +0100)] 
Add support for ELF machine EM_SPARC32PLUS

32-bit SPARC on V8+ uses a different ELF machine type.

Fixes: https://bugs.gentoo.org/634550
Signed-off-by: Guillem Jover <guillem@hadrons.org>
7 years agoRelease libbsd 0.8.7 0.8.7
Guillem Jover [Sat, 13 Jan 2018 15:20:35 +0000 (16:20 +0100)] 
Release libbsd 0.8.7

7 years agotest: Fix nlist(3) unit test on IA64
Jason Duerstock [Sun, 3 Dec 2017 15:50:07 +0000 (16:50 +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@hadrons.org>
7 years agoFix <sys/cdefs.h> for gcc with no __has_include or __has_include_next support
Adam Lackorzynski [Sun, 3 Dec 2017 15:46:19 +0000 (16:46 +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@hadrons.org>
7 years agoHandle several functions now being provided by glibc
Guillem Jover [Sat, 2 Sep 2017 17:55:50 +0000 (19:55 +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.

7 years agoman: Document on what other BSDs arc4random(3) is present
Guillem Jover [Sat, 5 Aug 2017 11:42:56 +0000 (13:42 +0200)] 
man: Document on what other BSDs arc4random(3) is present

7 years agoRelease libbsd 0.8.6 0.8.6
Guillem Jover [Sun, 16 Jul 2017 23:01:13 +0000 (01:01 +0200)] 
Release libbsd 0.8.6

7 years agoFix handling of non-contiguous argv + envp in setproctitle()
Guillem Jover [Sun, 16 Jul 2017 22:57:07 +0000 (00:57 +0200)] 
Fix handling of non-contiguous argv + envp in setproctitle()

The two arrays might not reference contiguous memory, and assuming they
are does break at least now on GNU/Hurd, which contains an unmapped
memory block between the memory used by the two arrays.

Just check that each element is strictly after the previous one, so that
we know there are no unmapped memory blocks inbetween.

8 years agotest: Fix nlist() unit test on IA64 and PowerPC 64-bit ELFv1
Guillem Jover [Sat, 24 Jun 2017 23:51:30 +0000 (01:51 +0200)] 
test: Fix nlist() unit test on IA64 and PowerPC 64-bit ELFv1

At least on IA64 and 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 ELFv1 that
section is called .opd.

We should take this into account when checking the n_type for the
functions we have requested information from nlist().

Rationale-by: James Clarke <jrtc27@jrtc27.com>
8 years agoRelease libbsd 0.8.5 0.8.5
Guillem Jover [Sat, 24 Jun 2017 14:10:14 +0000 (16:10 +0200)] 
Release libbsd 0.8.5

8 years agoman: Update man page sections in titles and references
Guillem Jover [Fri, 23 Jun 2017 03:59:35 +0000 (05:59 +0200)] 
man: Update man page sections in titles and references

We have moved all man pages to section 3bsd, let's do the same for the
page title, and in all the references for uniformity and to avoid
confusions.

Fixes: https://bugs.freedesktop.org/101545
8 years agoman: Ship and install libbsd(7)
Guillem Jover [Thu, 22 Jun 2017 02:58:09 +0000 (04:58 +0200)] 
man: Ship and install libbsd(7)

Fixes: https://bugs.freedesktop.org/101543
8 years agoFix ELF definitions for MIPS in local-elf.h
James Cowgill [Mon, 19 Jun 2017 19:38:40 +0000 (21:38 +0200)] 
Fix ELF definitions for MIPS in local-elf.h

Add a check for _MIPS_SIM inside the __mips__ #elif to detect mips64el
and use ELFCLASS64 in that case. Note that we can't use defined(__mips64)
here because that is also defined when the n32 ABI is in use, which uses
ELFCLASS32.

Fixes: https://bugs.debian.org/865091
Signed-off-by: Guillem Jover <guillem@hadrons.org>
8 years agoFix ELF definitions for PowerPC in local-elf.h
James Cowgill [Mon, 19 Jun 2017 19:37:14 +0000 (21:37 +0200)] 
Fix ELF definitions for PowerPC in local-elf.h

* ppc64el defines both __powerpc__ and __powerpc64__ but since the
  __powerpc64__ #elif is below the __powerpc__ one, it will never be hit.
* Both assumed that powerpc* was big-endian.

Fixes: https://bugs.debian.org/865091
Signed-off-by: Guillem Jover <guillem@hadrons.org>
8 years agotest: Remove unused variable in nlist() unit test
Guillem Jover [Mon, 19 Jun 2017 19:41:13 +0000 (21:41 +0200)] 
test: Remove unused variable in nlist() unit test

8 years agotest: Handle libtool executable names in getprogname() unit test
Guillem Jover [Mon, 19 Jun 2017 19:32:01 +0000 (21:32 +0200)] 
test: Handle libtool executable names in getprogname() unit test

Sometimes libtool will prefix the test programs with "lt-", we should
handle these and strip the prefix.

Fixes: https://bugs.debian.org/865090
8 years agoRelease libbsd 0.8.4 0.8.4
Guillem Jover [Mon, 19 Jun 2017 01:16:56 +0000 (03:16 +0200)] 
Release libbsd 0.8.4

8 years agoImport <sys/time.h> for some of its macros
Guillem Jover [Mon, 5 Jun 2017 03:43:26 +0000 (05:43 +0200)] 
Import <sys/time.h> for some of its macros

Fixes: https://bugs.freedesktop.org/94320
8 years agotest: Add new strnstr() unit test
Guillem Jover [Sun, 18 Jun 2017 18:30:40 +0000 (20:30 +0200)] 
test: Add new strnstr() unit test

8 years agotest: Add new setprogname() and getprogname() unit test
Guillem Jover [Sun, 18 Jun 2017 18:30:19 +0000 (20:30 +0200)] 
test: Add new setprogname() and getprogname() unit test

8 years agotest: Add new setmode() and getmode() unit test
Guillem Jover [Sun, 18 Jun 2017 18:29:52 +0000 (20:29 +0200)] 
test: Add new setmode() and getmode() unit test

8 years agotest: Add new nlist() unit test
Guillem Jover [Tue, 13 Jun 2017 23:52:12 +0000 (01:52 +0200)] 
test: Add new nlist() unit test

8 years agoRemove RCSID tags
Guillem Jover [Wed, 14 Jun 2017 00:53:35 +0000 (02:53 +0200)] 
Remove RCSID tags

These are obsolete markers, and in some cases they repeat the
information already present in the comment header.

8 years agoUpdate .gitignore for headers generator
Guillem Jover [Wed, 14 Jun 2017 00:45:13 +0000 (02:45 +0200)] 
Update .gitignore for headers generator

8 years agoNamespace header inclusion protection macros
Guillem Jover [Wed, 14 Jun 2017 00:44:37 +0000 (02:44 +0200)] 
Namespace header inclusion protection macros

Use LIBBSD_, and remove trailing underscores.

8 years agoFix broken mmap() usage in nlist() by switching to pread()
Guillem Jover [Tue, 13 Jun 2017 23:49:25 +0000 (01:49 +0200)] 
Fix broken mmap() usage in nlist() by switching to pread()

The offset is not page aligned, which makes mmap() return EINVAL on
Linux. Switch to use pread() which handles unaligned offset and non-page
sized reads, and because we are already loading parts of the executable
by read() calls, so there's not much point in using mmap() anyway.

8 years agoRemove a.out support from nlist()
Guillem Jover [Mon, 5 Jun 2017 03:30:27 +0000 (05:30 +0200)] 
Remove a.out support from nlist()

Some libc libraries do not have an <a.out.h> header. And a.out as an
executable format is very much obsolete on pretty much all currently
supported systems, even if they might still support loading such
objects.

Remove the a.out support to increase portability.

8 years agoMake strlcpy()/strlcat() slightly easier to read
Igor Gnatenko [Mon, 27 Jun 2016 07:21:43 +0000 (09:21 +0200)] 
Make strlcpy()/strlcat() slightly easier to read

Backport new changes from OpenBSD.

[guillem@hadrons.org:
 - Update copyright years in COPYING. ]

References: https://svnweb.freebsd.org/base?view=revision&revision=281135
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Signed-off-by: Guillem Jover <guillem@hadrons.org>
8 years agobuild: Add missing \ at end of line
Guillem Jover [Mon, 19 Jun 2017 01:02:32 +0000 (03:02 +0200)] 
build: Add missing \ at end of line

Fixes: commit 934b7a0ccbdc60313102f153eadc2f46853a505b
8 years agoUpdate TODO
Guillem Jover [Sun, 18 Jun 2017 18:30:51 +0000 (20:30 +0200)] 
Update TODO

8 years agoUpdate TODO
Guillem Jover [Tue, 6 Jun 2017 02:56:49 +0000 (04:56 +0200)] 
Update TODO

8 years agotest: Add unit test for strlcpy() and strlcat()
Guillem Jover [Fri, 9 Jun 2017 03:13:32 +0000 (05:13 +0200)] 
test: Add unit test for strlcpy() and strlcat()

8 years agobuild: Match any glibc and musl ABIs on the host_os AS_CASE
Guillem Jover [Fri, 9 Jun 2017 03:14:24 +0000 (05:14 +0200)] 
build: Match any glibc and musl ABIs on the host_os AS_CASE

Reported-by: Helmut Grohne <helmut@subdivi.de>
8 years agobuild: Quote the arguments to AC_CONDITIONAL
Guillem Jover [Fri, 9 Jun 2017 02:52:45 +0000 (04:52 +0200)] 
build: Quote the arguments to AC_CONDITIONAL

8 years agobuild: Move AC_TYPE_UID_T close to the other AC_TYPE_* checks
Guillem Jover [Fri, 9 Jun 2017 02:52:45 +0000 (04:52 +0200)] 
build: Move AC_TYPE_UID_T close to the other AC_TYPE_* checks

8 years agobuild: Move configure.ac comment into actual AC_CASE
Guillem Jover [Fri, 9 Jun 2017 02:52:45 +0000 (04:52 +0200)] 
build: Move configure.ac comment into actual AC_CASE

8 years agobuild: Use src/strlcpy.c in AC_CONFIG_SRCDIR
Guillem Jover [Wed, 7 Jun 2017 21:09:40 +0000 (23:09 +0200)] 
build: Use src/strlcpy.c in AC_CONFIG_SRCDIR

The src/fgetln.c file contains a function considered obsolete, use one
that is not.

8 years agoman: Use .In intead of .Fd macros for includes
Guillem Jover [Wed, 7 Jun 2017 20:46:07 +0000 (22:46 +0200)] 
man: Use .In intead of .Fd macros for includes

8 years agoman: Add new libbsd(7) library overview man page
Guillem Jover [Mon, 5 Jun 2017 04:33:47 +0000 (06:33 +0200)] 
man: Add new libbsd(7) library overview man page

8 years agoman: Add missing man pages
Guillem Jover [Wed, 7 Jun 2017 03:00:34 +0000 (05:00 +0200)] 
man: Add missing man pages

This adds man pages for byteorder(3), errc(3) and fpurge(3), including
all their aliases.

8 years agoman: Add missing aliases
Guillem Jover [Mon, 5 Jun 2017 04:32:36 +0000 (06:32 +0200)] 
man: Add missing aliases

8 years agoman: Move all man pages to section 3bsd
Guillem Jover [Mon, 5 Jun 2017 04:43:22 +0000 (06:43 +0200)] 
man: Move all man pages to section 3bsd

This should guarantee that even if the system provides or will provide
native implementations of these functions, we will not have file
conflicts.

8 years agoDo not use legacy BSD u_* types
Guillem Jover [Mon, 5 Jun 2017 04:17:27 +0000 (06:17 +0200)] 
Do not use legacy BSD u_* types

Some systems do not have these types available, and they are simply
convenience aliases. Instead use the expanded versions which are more
portable.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=101192
8 years agoTry <linux/a.out.h> if <a.out.h> is not present
Guillem Jover [Fri, 20 Jan 2017 01:20:12 +0000 (02:20 +0100)] 
Try <linux/a.out.h> if <a.out.h> is not present

At least musl ships the former but not the latter.

8 years agoDo not provide funopen() on musl
Guillem Jover [Tue, 10 Jan 2017 03:33:15 +0000 (04:33 +0100)] 
Do not provide funopen() on musl

Fixes: https://bugs.debian.org/818246
8 years agoGracefully handle lack of system <sys/cdefs.h>
Guillem Jover [Tue, 10 Jan 2017 03:27:25 +0000 (04:27 +0100)] 
Gracefully handle lack of system <sys/cdefs.h>

This is the case on musl.

Fixes: https://bugs.debian.org/810589
8 years agoFix the __progname check to avoid the optimizer discarding the symbol
Guillem Jover [Sun, 28 Aug 2016 15:13:20 +0000 (17:13 +0200)] 
Fix the __progname check to avoid the optimizer discarding the symbol

Because we were assigning to another unused variable, when building the
check with optimizations enabled, which is the default when using gcc
as the compiler, the variable was being discarded. Instead pass it to
printf() so that it cannot do so.

8 years agoSupport GCC deprecated attribute for GCC older than 4.5
Guillem Jover [Tue, 10 Jan 2017 03:24:35 +0000 (04:24 +0100)] 
Support GCC deprecated attribute for GCC older than 4.5

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=99190
Based-on-patch-by: Eric Smith <brouhaha@fedoraproject.org>
8 years agoAdd support for RISC-V
Guillem Jover [Wed, 8 Feb 2017 00:49:48 +0000 (01:49 +0100)] 
Add support for RISC-V

8 years agoAdd support for TileGX
Helmut Grohne [Tue, 10 Jan 2017 02:47:52 +0000 (03:47 +0100)] 
Add support for TileGX

Fixes: https://bugs.debian.org/847560
Signed-off-by: Guillem Jover <guillem@hadrons.org>
9 years agoRelease libbsd 0.8.3 0.8.3
Guillem Jover [Sat, 23 Apr 2016 08:13:23 +0000 (10:13 +0200)] 
Release libbsd 0.8.3

9 years agoAdd missing <fcntl.h> includes
Szabolcs Nagy [Sun, 27 Mar 2016 10:37:09 +0000 (12:37 +0200)] 
Add missing <fcntl.h> includes

These are required due to the O_* macro usage, but have passed
undetected on glibc-based systems due to implicit inclusions.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
9 years agotest: Add a unit test for md5
Guillem Jover [Sun, 27 Mar 2016 10:31:58 +0000 (12:31 +0200)] 
test: Add a unit test for md5

9 years agoman: Fix ungrammatical construct
Guillem Jover [Sun, 14 Feb 2016 08:00:57 +0000 (09:00 +0100)] 
man: Fix ungrammatical construct

Warned-by: lintian
9 years agobuild: Support clock_gettime() provided in librt
Guillem Jover [Fri, 12 Feb 2016 21:56:09 +0000 (22:56 +0100)] 
build: Support clock_gettime() provided in librt

In older glibc versions (< 2.17) clock_gettime() is in librt. Add a
check for this to avoid build breakage for programs/libraries that
use libbsd on such systems.

Based-on-patch-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Guillem Jover <guillem@hadrons.org>
9 years agoSwitch URLs from http or git to https
Guillem Jover [Wed, 10 Feb 2016 09:38:51 +0000 (10:38 +0100)] 
Switch URLs from http or git to https

9 years agoFix file descriptor leak in HASHFileChunk helper
Guillem Jover [Sun, 7 Feb 2016 01:53:28 +0000 (02:53 +0100)] 
Fix file descriptor leak in HASHFileChunk helper

This leak only happens on error conditions, so it's not too bad.

Warned-by: coverity
9 years agoFix unportable sizeof() usage
Guillem Jover [Sun, 7 Feb 2016 01:47:22 +0000 (02:47 +0100)] 
Fix unportable sizeof() usage

We are calculating the size of the array, and need to pass the size of
each element, not the size of a pointer to an element. Although this
happens to be the same in many cases, this is not a portable assumption.

Warned-by: coverity
9 years agoRelease libbsd 0.8.2 0.8.2
Guillem Jover [Wed, 27 Jan 2016 14:25:23 +0000 (15:25 +0100)] 
Release libbsd 0.8.2

9 years agoFix heap buffer overflow in fgetwln()
Hanno Boeck [Wed, 27 Jan 2016 14:10:11 +0000 (15:10 +0100)] 
Fix heap buffer overflow in fgetwln()

In the function fgetwln() there's a 4 byte heap overflow.

There is a while loop that has this check to see whether there's still
enough space in the buffer:

if (!fb->len || wused > fb->len) {

If this is true more memory gets allocated. However this test won't be
true if wused == fb->len, but at that point wused already points out
of the buffer. Some lines later there's a write to the buffer:

fb->wbuf[wused++] = wc;

This bug was found with the help of address sanitizer.

Warned-by: ASAN
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93881
Signed-off-by: Guillem Jover <guillem@hadrons.org>
9 years agotest: Add missing <sys/stat.h> include
Hanno Boeck [Wed, 27 Jan 2016 14:06:50 +0000 (15:06 +0100)] 
test: Add missing <sys/stat.h> include

The test in test/strmode.c can fail to compile depending on the
optimization flags used.

The constants that are used in this file (S_IFREG etc.) come from the
<sys/stat.h> include file. It seems gcc ignores this error if one
compiles with "-O2" (default), but if one uses no optimization it fails.

Add the missing include and it works all the time.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93880
Signed-off-by: Guillem Jover <guillem@hadrons.org>
9 years agotest: Fix success return code for arc4random unit test
Guillem Jover [Mon, 11 Jan 2016 01:21:15 +0000 (02:21 +0100)] 
test: Fix success return code for arc4random unit test

9 years agotest: Fix race condition in headers-*.sh
Lukas Fleischer [Thu, 7 Jan 2016 16:26:12 +0000 (17:26 +0100)] 
test: Fix race condition in headers-*.sh

When running tests in parallel (e.g. using `make -j4 check`), the header
tests currently fail due to headers-overlay.sh and headers-system.sh
both generating headers-gen.c simultaneously, resulting in garbled
output. Fix this by using separate C files for the tests.

Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
Signed-off-by: Guillem Jover <guillem@hadrons.org>
9 years agoRelease libbsd 0.8.1 0.8.1
Guillem Jover [Mon, 14 Dec 2015 02:39:48 +0000 (03:39 +0100)] 
Release libbsd 0.8.1

9 years agoAdd support for GNU/Hurd to getentropy()
Guillem Jover [Mon, 14 Dec 2015 02:03:57 +0000 (03:03 +0100)] 
Add support for GNU/Hurd to getentropy()

Reuse the getentropy code for Linux on the Hurd, which has fallbacks
for when the better interfaces are not present. And remove all the code
that is not supported currently on the Hurd. Ideally the Hurd should
get an equivalent interfaces that does not suffer from the same
problems as /dev/urandom.

9 years agotest: Add new unit tests for individual headers usage
Guillem Jover [Sat, 12 Dec 2015 13:26:50 +0000 (14:26 +0100)] 
test: Add new unit tests for individual headers usage

9 years agoTurn <bsd/bsd.h> inert when using LIBBSD_OVERLAY
Guillem Jover [Sun, 13 Dec 2015 23:44:47 +0000 (00:44 +0100)] 
Turn <bsd/bsd.h> inert when using LIBBSD_OVERLAY

Also print a warning stating this fact.

9 years agoAdd missing include to <md5.h>
Guillem Jover [Sun, 13 Dec 2015 23:37:34 +0000 (00:37 +0100)] 
Add missing include to <md5.h>

The header was not self-contained, it was missing definitions for some
types included in <sys/types.h>.

9 years agoUse the non-overlayed libbsd headers when we need our own definitions
Guillem Jover [Sat, 12 Dec 2015 13:27:12 +0000 (14:27 +0100)] 
Use the non-overlayed libbsd headers when we need our own definitions

9 years agoSwitch COPYING to Debian copyright machine readable format 1.0
Guillem Jover [Mon, 7 Dec 2015 01:40:46 +0000 (02:40 +0100)] 
Switch COPYING to Debian copyright machine readable format 1.0

9 years agoRelicense my contribution to BSD-2-clause
Guillem Jover [Mon, 7 Dec 2015 01:45:52 +0000 (02:45 +0100)] 
Relicense my contribution to BSD-2-clause

This avoids having two licenses on the same file.

9 years agoAdd missing copyright and license headers
Guillem Jover [Mon, 7 Dec 2015 00:53:49 +0000 (01:53 +0100)] 
Add missing copyright and license headers

9 years agoFix getentropy implementation to use the correct system hooks
Guillem Jover [Wed, 2 Dec 2015 03:00:58 +0000 (04:00 +0100)] 
Fix getentropy implementation to use the correct system hooks

Include getentropy_<SYSTEM>.c instead of arc4random_<SYSTEM>.c.

9 years agoAdd support for GNU/kFreeBSD for closefrom() and getentropy()
Guillem Jover [Wed, 2 Dec 2015 02:32:13 +0000 (03:32 +0100)] 
Add support for GNU/kFreeBSD for closefrom() and getentropy()

9 years agoUnify most arc4random Unix hooks into a single file
Guillem Jover [Wed, 2 Dec 2015 02:08:17 +0000 (03:08 +0100)] 
Unify most arc4random Unix hooks into a single file

The Unix hook should work for most Unix-like systems, move glibc
specific code there and a FreeBSd specific comment, and remove the rest.
Also change the code to always fallback to use the generic Unix code.

This should cover GNU/Hurd and GNU/kFreeBSD among others.

9 years agoUse local SHA512 header
Guillem Jover [Tue, 1 Dec 2015 02:39:10 +0000 (03:39 +0100)] 
Use local SHA512 header

Actually use the local private SHA512 header instead of relying on the
OpenSSL one for no good reason. Add definition for expected macro
SHA512_DIGEST_LENGTH.

9 years agoRelease libbsd 0.8.0 0.8.0
Guillem Jover [Mon, 30 Nov 2015 02:59:42 +0000 (03:59 +0100)] 
Release libbsd 0.8.0

9 years agoUpdate license and copyright information
Guillem Jover [Mon, 30 Nov 2015 02:53:21 +0000 (03:53 +0100)] 
Update license and copyright information

9 years agoUpdate arc4random module from OpenBSD and LibreSSL
Guillem Jover [Wed, 23 Sep 2015 17:39:47 +0000 (19:39 +0200)] 
Update arc4random module from OpenBSD and LibreSSL

Rework arc4random_stir() and arc4random_addrandom() code over the new
internal API, and documentation in the man page. Adapt the code to the
local build system.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=85827
9 years agoAdd private getentropy module from OpenBSD and LibreSSL
Guillem Jover [Wed, 23 Sep 2015 17:39:47 +0000 (19:39 +0200)] 
Add private getentropy module from OpenBSD and LibreSSL

Adapt the code to the local build system.

9 years agoAdd private SHA512 module from FreeBSD
Guillem Jover [Wed, 23 Sep 2015 18:13:33 +0000 (20:13 +0200)] 
Add private SHA512 module from FreeBSD

9 years agoAdd NIOS2 support to nlist()
Marek Vasut [Mon, 30 Nov 2015 19:39:00 +0000 (20:39 +0100)] 
Add NIOS2 support to nlist()

Add support for the NIOS2 soft-core CPU provided by Altera.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Cc: Ley Foon Tan <lftan@altera.com>
Cc: Thomas Chou <thomas@wytron.com.tw>
Cc: Walter Goossens <waltergoossens@home.nl>
9 years agoman: Rename funopen.3 to funopen.3bsd to avoid clash with funtools
Guillem Jover [Mon, 30 Nov 2015 18:32:48 +0000 (19:32 +0100)] 
man: Rename funopen.3 to funopen.3bsd to avoid clash with funtools

The funtools project ships a man page with the same, name. And although
it mith probably make more sense to rename the man page there, as BSD
systems will certainly not do so, this is the easiest and fastest way
to avoid a file conflict.

9 years agotest: Check asprintf() return code
Guillem Jover [Mon, 30 Nov 2015 22:48:17 +0000 (23:48 +0100)] 
test: Check asprintf() return code