|
03fccd15
|
2022-10-05T12:08:31
|
|
include: Adjust reallocarray() per glibc adoption
On glibc 2.29 reallocarray() was moved to _DEFAULT_SOURCE.
Closes: !20
Based-on-patch-by: Callum Farmer <gmbr3@opensuse.org>
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
6b6e686b
|
2022-10-05T12:08:31
|
|
include: Adjust arc4random() per glibc adoption
Some arc4random functions were added in glibc 2.36.
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
2f9eddc2
|
2022-10-05T02:05:46
|
|
include: Simplify glibc version dependent macro handling
We test once whether __GLIBC__ is not defined, so we do not need to test
whether it is on the OR branch afterwards. We decouple the glibc version
restriction check from the _*_SOURCE variable, as that contains an
implicit opposite version check.
|
|
01f0d1ea
|
2020-12-31T12:46:03
|
|
Add recallocarray() and freezero() from OpenBSD
Add recallocarray(), introduced in OpenBSD 6.1, and freezero(),
introduced in OpenBSD 6.2. The former is imported as-is from OpenBSD,
while the latter is the non-malloc-internal branch of the same code (and
also the OpenSSH portable variant).
Both of these originated in OpenBSD, but have also been implemented by
IllumOS, cf. https://www.illumos.org/issues/8546
Documentation for these functions is in malloc(3) upstream, the relevant
parts of which were previously imported in reallocarray(3bsd). Update
reallocarray(3bsd) with the changes that were introduced since, and add
the relevant bits for recallocarray() and freezero(), plus aliases.
[guillem@hadrons.org: Update copyright in COPYING. ]
Closes: !10
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
8c5a83d6
|
2020-09-20T03:32:57
|
|
Fix coding style
|
|
1f8a3f7b
|
2018-03-06T01:39:45
|
|
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>
|
|
11ec8f1e
|
2018-03-06T01:41:35
|
|
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
|
|
22fbd623
|
2017-09-02T19:55:50
|
|
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.
|
|
07c76b66
|
2017-06-05T06:17:27
|
|
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
|
|
02b55488
|
2014-08-12T12:32:34
|
|
Use stdint integer types instead of BSD legacy ones
|
|
63783511
|
2014-08-10T12:34:44
|
|
Fix arc4random() and arc4random_stir() prototypes
These two functions accept no arguments. The prototypes should reflect
this. This change lets the compiler warn about certain (admittedly
silly) mistakes.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
faa005cb
|
2014-06-27T02:05:11
|
|
Add reallocarray() function from OpenBSD
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
e8f93003
|
2014-06-26T21:32:11
|
|
Add getbsize() function
Import code from DragonFlyBSD and man page from FreeBSD.
|
|
e7f39760
|
2012-03-23T10:31:42
|
|
Add email address to my name
|
|
866f73af
|
2012-01-03T05:39:22
|
|
Move overlay inclusions outside of header protection
Glibc tends to include standard headers with special definitions
that make few declarations or macros visible, this stomps over the
overlay #include_next <> logic.
Based-on-patch-by: Robert Millan <rmh@debian.org>
|
|
0b96e1a2
|
2012-01-03T07:32:53
|
|
Remove deprecated compatibility includes in headers
|
|
0bf3d391
|
2011-05-28T10:39:54
|
|
Include the correct deprecated headeres when using the overlay
|
|
755d86be
|
2011-05-27T21:39:14
|
|
Rename LIBBSD_CLEAN_INCLUDES to LIBBSD_DISABLE_DEPRECATED
|
|
17a9a847
|
2011-05-25T07:36:19
|
|
Rename transparent support to overlay
This affects the pkg-config file now named libbsd-overlay.pc, and the
macro to use the overlay LIBBSD_OVERLAY.
|
|
8b6a7477
|
2011-02-23T12:38:42
|
|
Conditionalize temporary compatibility inclusions
These inclusions were in place for backward compatibility purposes,
when the headers were split so that code using them would not break.
Make it possible for applications to disable them by defining
LIBBSD_CLEAN_INCLUDES so that buildability can be tested and fixed
before they get removed in a subsequent release.
|
|
520682e5
|
2011-02-23T14:04:57
|
|
Add support for transparent compilation
This means that software being ported should not need to be modified in
the usual case, as the libbsd headers will take over the standard
namespace and fill the missing gaps, and include the system headers.
To use this the new libbsd-transparent.pc file can be used through
pkg-config, which should end up doing the right thing.
|
|
741eb587
|
2011-02-22T20:44:21
|
|
Add missing prototypes for arc4random_buf and arc4random_uniform
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=34511
|
|
be6ab549
|
2011-02-25T18:17:16
|
|
Add new mergesort function
Taken from FreeBSD.
|
|
4b95e82a
|
2011-02-25T18:48:10
|
|
Add new radixsort and sradixsort functions
Taken from FreeBSD.
|
|
acb7c42d
|
2010-07-30T08:00:41
|
|
Add reallocf function
|
|
30c79408
|
2010-01-21T14:34:55
|
|
Make setprogname and getprogname arguments and return value const
This is more correct as the strings are not going to be changed, and it
matches the function signatures on other BSDs.
Suggested-by: Aurelien Jarno <aurel32@debian.org>
|
|
7a70f1b0
|
2009-12-11T23:24:31
|
|
Move fmtcheck and fgetln declarations to <bsd/stdio.h>
This is were they are located on the BSDs.
|
|
ca28f280
|
2009-12-11T23:21:14
|
|
Move setmode and getmode declarations to <bsd/unistd.h>
This is were they are located on the BSDs.
|
|
3c9182b8
|
2009-12-11T23:12:26
|
|
Move arc4random declarations to <bsd/stdlib.h>
This is were they are located on the BSDs.
|
|
538bc879
|
2009-10-24T00:17:57
|
|
Add dehumanize_number function
Taken from NetBSD.
|
|
56ddcfe6
|
2009-10-11T21:07:53
|
|
Add strtonum function
Taken from FreeBSD.
|
|
cb1346e5
|
2009-05-25T09:25:13
|
|
Export public functions as extern C
|
|
1f0b016e
|
2009-05-20T04:20:21
|
|
Use UTF-8 copyright symbols for non-imported files
|
|
38829bdc
|
2008-07-09T09:07:03
|
|
Add new setmode and getmode functions from FreeBSD
|
|
b0f64624
|
2008-07-09T07:16:20
|
|
Add missing license headers
With permission from Robert Millan and Aurelien Jarno.
|
|
3462d126
|
2006-03-29T13:55:22
|
|
Add heapsort
|
|
5bd83402
|
2006-03-17T19:55:21
|
|
Add getprogname and setprogname
|
|
67e48af0
|
2006-02-14T07:01:21
|
|
Remove unused includes and protect header
|
|
dedb8169
|
2005-12-20T20:29:47
|
|
Added manpages and fixed fmtcheck
|