|
10920c30
|
2024-02-12T00:06:56
|
|
build: Make name_from_id man pages conditional instead of id_from_name
The code is only making the name_from_id function conditional, and
assumes id_from_name are always to be included, so we need to match
the logic for the man page inclusion.
|
|
edddd806
|
2024-01-08T02:16:12
|
|
Release libbsd 0.11.8
|
|
df116b55
|
2024-01-07T17:43:12
|
|
Adjust strlcpy() and strlcat() per glibc adoption
These functions were added in glibc 2.38, in anticipation of POSIX
adopting them too.
Closes: #26
|
|
f41d6c12
|
2023-05-26T23:55:40
|
|
build: Refactor GNU .init_array support check into a new m4 function
|
|
30b48ed9
|
2023-05-26T23:50:10
|
|
build: Refactor linker script detection into a new m4 function
|
|
5434ba16
|
2023-04-23T02:05:04
|
|
build: Conditionalize wcslcpy() and wcslcat() functions on macOS
These functions are provided by the system libc.
|
|
dc1bd1a2
|
2023-04-23T02:00:10
|
|
build: Conditionalize only id-from-name functions not the entire pwcache
On macOS the name-from-id functions are present, but not the
id-from-name ones, so we want to provide those instead of suppressing
the entire file.
|
|
edc746ea
|
2023-04-22T22:47:10
|
|
build: Conditionalize getprogname()/setprogname on macOS
These functions are provided by the system libc, so there is no need for
us to provide them.
|
|
8f998d1d
|
2023-04-22T20:23:08
|
|
progname: Include <procinfo.h> if available
We need this header on AIX. Missed transplanting the code from the AIX
porting system.
Fixes: commit 9fa06763a1afe0946a3a20e5bbdba72885cbade5
|
|
d08163b4
|
2023-04-18T03:56:16
|
|
build: Check whether we need libperfstat on AIX
The getentropy() implementation makes use of this library on AIX.
|
|
1186cf88
|
2023-04-18T03:59:17
|
|
build: Annotate droppable functions for musl on next SOVERSION bump
These are already provided by the musl libc, and can thus be dropped on
the next SOVERSION bump.
|
|
6385ccc9
|
2023-04-18T03:58:24
|
|
build: Conditionalize bsd_getopt() on macOS
The system library provides a getopt() with BSD semantics.
|
|
21d12b02
|
2023-04-04T23:59:05
|
|
build: On macOS do not build functions provided by the system
We have never built before on macOS, so we can exclude all the functions
that are currently provided in the system.
Closes: #1
Closes: !3
|
|
bc65806c
|
2023-04-06T23:05:27
|
|
build: Select whether to include funopen() in the build system
This makes sure we include it when expected, alongside the man pages,
and the test cases, and do not accidentally break the ABI if the system
starts providing such interface.
|
|
8b7a4d9d
|
2023-04-07T23:43:55
|
|
build: Move Windows OS detection to the OS features section
This was placed here to make use of the same AS_CASE, but it does not
really fit with the section. Move it to the more appropriate place, and
detangle the AS_CASE.
|
|
ccbfd1c2
|
2023-04-07T23:40:22
|
|
build: Remove __MUSL__ definition from configure
We stopped relying on this macro when we turned the funopen() cpp error
into a warning in commit e50896286cc5718898194edb73fa7262ad9a22db.
|
|
a5faf170
|
2023-04-01T12:46:49
|
|
Only use <stdio_ext.h> if present
|
|
44824aca
|
2023-04-01T12:41:42
|
|
Declare environ if the system does not do so
The environ variable is supposed to be defined by the code using it, but
on glibc-based systems it will get defined if we request it, by including
<unistd.h> and defining _GNU_SOURCE.
|
|
1fb6c3f4
|
2023-04-10T23:10:40
|
|
Use lockf() when flock() is not available
On Solaris flock() is not available, and we should use instead lockf()
or fcntl().
|
|
fe16f386
|
2023-04-10T23:11:33
|
|
test: Use open_memstream() only if available
On Solaris this function is not yet available.
|
|
257800a0
|
2021-02-20T22:23:40
|
|
build: Add support for sanitizer compiler flags
|
|
dec783dc
|
2023-02-12T23:55:09
|
|
build: Fix version script linker support detection
When the linker uses --no-undefined-version either specified by the user
or as the default behavior (such as with newer clang >= 16 releases),
a missing symbol definition will cause a linker error if that symbol is
listed in the version script.
|
|
5dea9da3
|
2022-12-13T03:37:06
|
|
build: Improve C99 compatibility of __progname configure check
The check uses printf, so it needs to include <stdio.h> for
compilers which do not support implicit function declarations.
(They were removed from C99.)
Closes: !23
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
b9bf42dd
|
2022-12-13T03:35:05
|
|
build: Enable -Wall for automake
This will make sure to warn about bogus or deprecated constructs.
|
|
e57c0787
|
2022-12-13T03:34:37
|
|
build: Add missing AM_PROG_AR macro call to configure.ac
Warned-by: autoreconf
|
|
80f1927d
|
2022-12-13T03:31:38
|
|
build: Fix configure.ac indentation
Use the same style as the newly added code, which should make the code
more readable, and produce more conforming C output.
|
|
b7a8bc22
|
2022-12-13T03:10:28
|
|
build: Require automake 1.11
This is a rather old release (from 2009), that provides AM_SILENT_RULES.
|
|
e5089628
|
2022-11-23T23:31:54
|
|
build: Do not require funopen() to be ported
This function cannot be easily and (more importantly) correctly ported
without cooperation from the libc stdio layer. We already document that
users should be prepared to have the function not available on some
platforms and that they should ideally switch their code to other
more portable and better interfaces.
Instead of making the build fail, and requiring porters to add
exceptions for something that most probably cannot be ported correctly
anyway, simply print a warning and let it build. This will not be a
regression because on those systems libbsd would have never been built
before.
Prompted-by: Jens Finkhaeuser <jens@finkhaeuser.de>
|
|
5cfa39e5
|
2022-11-23T23:42:49
|
|
build: Use «yes» instead of «true» for AC_CHECK_FUNCS cache value
This autoconf macro sets the ac_cv_func_ cached variable to «yes» not
«true» so we were checking for an impossible condition.
|
|
084911ce
|
2022-10-06T04:07:52
|
|
Release libbsd 0.11.7
|
|
84acf215
|
2022-03-30T23:09:35
|
|
Release libbsd 0.11.6
|
|
5f9608c7
|
2022-01-25T01:48:29
|
|
Release libbsd 0.11.5
|
|
2975d809
|
2022-01-23T18:54:33
|
|
build: Check for objdump explicitly
We should not assume that something will implicitly check for this tool,
as we need it ourselves, and this is an internal implementation detail
of right now libtool.
Fixes: commit f11ab6722367f1cf62704ed3c827b9b68dcb5397
|
|
54796231
|
2022-01-22T22:41:51
|
|
Release libbsd 0.11.4
|
|
e7cf8c57
|
2021-11-28T22:44:08
|
|
Switch md5 compatibility logic back to direct linking
When using the recent dlsym() based wrapper, we are not requiring any
symbol from libmd, as we resolve those dynamically at run-time. We were
ending up linking against libmd because in another part of the code we
require (depending on the architecture) the SHA512 functions for the
getentropy() local implementation. But that function might be provided
by the system libc on some systems, which means we end up not linking
against libmd at all.
To solve this we go back to the previous simpler solution of linking
directly, which had the main drawback of then making programs fail to
link when not specifying -lmd (on platforms that need it). And then
switch the .so link point from a symlink to a linker script, so that we
can inject the -lmd library as-needed. This is similar to what glibc is
doing.
Fixes: commit 31f034e3862debda8615a449b1c11c4d6920dcc7
|
|
25d35625
|
2021-11-28T22:40:58
|
|
build: Split libmd dependency due to MD5 functions from SHA requirements
To be able to rework the md5 deprecation logic, we need to detangle when
we depend on libmd due to requiring MD5 functions, which might be
otherwise provided by libc, or when we require SHA functions for the
internal getentropy() implementation.
|
|
54f87456
|
2021-11-26T20:01:18
|
|
build: Enable .init_array support when building with LTO
Because these symbols are not otherwise referenced, GCC would like
to remove them.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
731b0a77
|
2021-08-17T02:59:59
|
|
build: Detect sed at configure time
Check whether sed is available and use the implementation matching the
requirements via the SED variable.
|
|
4f68a88f
|
2021-02-19T06:55:17
|
|
build: Add compiler warnings support
Detect as many warnings as possible during configure and enable them
if the user did not supply any, so that any such problem can be spotted
and fixed.
|
|
1fb25b7d
|
2021-02-09T06:14:25
|
|
Release libbsd 0.11.3
|
|
31f034e3
|
2021-02-09T05:57:37
|
|
Switch libmd wrapper to use dlsym()
Switch from the previous versioned symbol implementation which required
users to also link against the message digest provider explicitly, or
they would fail to find the symbols, to an implementation that loads
the symbols from the linked library providing the functions using
dlsym(), thus preserving backwards compatibility.
|
|
a4e0db2b
|
2021-02-09T06:04:38
|
|
build: Use a single variable to track libraries to link against
Using various variables means we have to keep these in sync in various
places. Just use a single variable that we can use anywhere where this
is needed.
|
|
43d34c9d
|
2021-02-09T06:02:46
|
|
build: Fix message digest library checks
They were not failing when not finding the SHA-2 functions and
were hardcoding -lmd regardless of what library had been found.
|
|
edea268c
|
2021-02-08T03:59:56
|
|
Release libbsd 0.11.2
|
|
a4de4d95
|
2021-02-07T02:03:59
|
|
Release libbsd 0.11.1
|
|
2462cd88
|
2021-02-07T00:23:43
|
|
Release libbsd 0.11.0
|
|
847e682f
|
2021-02-07T00:09:30
|
|
Use libmd hashing function implementations instead of embedding our own
This splits the implementation responsibilities, and reduces embedded
code copies, which was one of the driving points with this project to
start with, so it's nice to give a good example.
|
|
37a9b56c
|
2021-02-06T23:43:12
|
|
Import pwcache module from OpenBSD
|
|
3d6b6ead
|
2019-11-16T00:04:18
|
|
build: Detect support for --version-script in ld
|
|
a11c98a6
|
2019-08-07T18:34:09
|
|
Release libbsd 0.10.0
|
|
4bed4839
|
2018-06-14T11:38:32
|
|
build: Detect Windows/MinGW at configure time
Extend the host OS checks to define an OS_WINDOWS automake conditional if
the host is MinGW-like. This will be useful for future Windows-specific
build tweaks.
[guillem@hadrons.org:
- Rename WINDOWS conditional to OS_WINDOWS. ]
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
b0ebb0d4
|
2019-08-06T23:16:42
|
|
build: Use __register_atfork() only if really available
This is a glibc-specific symbol that has no public declaration. But is
being used by the OpenBSD and this implementation as a hack to avoid
having to link against the pthread library. This interface is at least
included in LSB 5.0 [L], and using pthread_atfork() is otherwise
problematic anyway [P].
[L] <https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/baselib---register-atfork.html>
[P] <http://austingroupbugs.net/view.php?id=851>
One problem is that we were using it whenever __GLIBC__ is defined,
which is supposed to be defined only on an actual glibc, but uClibc
defines that macro, but it does not provide the symbol on its noMMU
variant.
We add a new configure check that will try to link a program that uses
that symbol to make sure it is present.
Closes: !2
Reported-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
73aea4f8
|
2019-08-06T23:11:50
|
|
build: Fix check for clock_gettime() within librt
The check was always setting the libraries to link to include -lrt,
as the success case includes the builtin one. Handle the various
values.
|
|
574c7a13
|
2018-06-18T00:36:44
|
|
Protect C language extensions with two leading and trailing underscores
This should make their usage safer against user macros.
|
|
0500a1bd
|
2018-06-14T11:38:32
|
|
Don't require <grp.h>
This is only used in the overlay test and Windows does not provide it.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
1ca09c18
|
2018-05-22T16:03:59
|
|
Release libbsd 0.9.1
|
|
e007233c
|
2018-05-21T04:41:56
|
|
Release libbsd 0.9.0
|
|
0b61c5ff
|
2018-01-13T16:20:35
|
|
Release libbsd 0.8.7
|
|
bbf90ac3
|
2017-07-17T01:01:13
|
|
Release libbsd 0.8.6
|
|
415e3cb2
|
2017-06-24T16:10:14
|
|
Release libbsd 0.8.5
|
|
8bff4b1f
|
2017-06-19T03:16:56
|
|
Release libbsd 0.8.4
|
|
c8a1b08b
|
2017-06-09T05:14:24
|
|
build: Match any glibc and musl ABIs on the host_os AS_CASE
Reported-by: Helmut Grohne <helmut@subdivi.de>
|
|
4fec871c
|
2017-06-09T04:52:45
|
|
build: Quote the arguments to AC_CONDITIONAL
|
|
3945693e
|
2017-06-09T04:52:45
|
|
build: Move AC_TYPE_UID_T close to the other AC_TYPE_* checks
|
|
c253365d
|
2017-06-09T04:52:45
|
|
build: Move configure.ac comment into actual AC_CASE
|
|
8248e5f7
|
2017-06-07T23:09:40
|
|
build: Use src/strlcpy.c in AC_CONFIG_SRCDIR
The src/fgetln.c file contains a function considered obsolete, use one
that is not.
|
|
d6c35f61
|
2017-01-10T04:33:15
|
|
Do not provide funopen() on musl
Fixes: https://bugs.debian.org/818246
|
|
368af99f
|
2016-08-28T17:13:20
|
|
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.
|
|
9bed430e
|
2016-04-23T10:13:23
|
|
Release libbsd 0.8.3
|
|
b7ce33cf
|
2016-02-12T22:56:09
|
|
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>
|
|
2fb148a2
|
2016-01-27T15:25:23
|
|
Release libbsd 0.8.2
|
|
229f8579
|
2015-12-14T03:39:48
|
|
Release libbsd 0.8.1
|
|
2b030da0
|
2015-11-30T03:59:42
|
|
Release libbsd 0.8.0
|
|
874a0e51
|
2015-09-23T19:39:47
|
|
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
|
|
9a9a8b2d
|
2015-09-23T19:39:47
|
|
Add private getentropy module from OpenBSD and LibreSSL
Adapt the code to the local build system.
|
|
58bef83f
|
2015-11-16T01:12:24
|
|
test: Add unit test for arc4random()
|
|
3881c4fc
|
2014-11-02T00:23:00
|
|
Update closefrom() function
Import from sudo. Adapt the build system to detect the required features.
|
|
e390651b
|
2014-07-29T03:00:08
|
|
Release libbsd 0.7.0
|
|
e8d3d041
|
2014-07-20T01:48:20
|
|
build: Remove hard requirement for GNU .init_array section support
In case the support is not available, just stop building the
libbsd-ctor.a library, which is a nice to have thing, but should not
have been a hard requirement from the start. This should allow to
build libbsd on non-glibc based systems using another libc.
|
|
f41fdcf1
|
2013-10-21T05:07:56
|
|
Add funopen() function
This is a wrapper over the glibc fopencookie() function.
We diverge from the FreeBSD, OpenBSD and DragonFlyBSD declarations,
because seekfn() there wrongly uses fpos_t, assuming it's an integral
type, and any code using that on a system where fpos_t is a struct
(such as GNU-based systems or NetBSD) will fail to build. In which case,
as the code has to be modified anyway, we might just as well use the
correct declaration.
|
|
ee04e8de
|
2013-10-10T09:49:04
|
|
build: Set subdir-objects automake option
Bump automake minimal version to 1.9.
|
|
11941746
|
2013-07-14T10:58:20
|
|
Release libbsd 0.6.0
|
|
c5b95902
|
2013-07-11T12:25:54
|
|
Move setproctitle() automatic initialization to its own library
The automatic initialization cannot be part of the main shared library,
because there is no thread-safe way to change the environ global
variable. This is not a problem if the initializaion happens just at
program load time, but becomes one if the shared library is directly or
indirectly dlopen()ed during the execution of the program, which could
have either kept references to the old environ or could change it in
some other thread. This has been observed for example on systems using
Samba NSS modules.
To avoid any other possible fallout, the constructor is split into a
new static library that needs to be linked explicitly into programs
using setproctitle(). As an additional safety measure the pkg-config
linker flags will mark the program as not allowing to be dlopen()ed
so that we avoid the problem described above.
Reported-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=66679
|
|
3077d2ff
|
2013-07-12T22:15:58
|
|
build: Move version ABI from Makefile to configure.ac
It's easier to find there, and the value can be reused in case we have
to provide another shared library.
|
|
6faea4d2
|
2013-05-29T02:23:56
|
|
Force setproctitle() into .init_array section
The GNU .init_array support is an extension over the standard System V
ABI .init_array support, which passes the main() arguments to the init
function.
This support comes in three parts. First the dynamic linker (from glibc)
needs to support it. Then function pointers need to be placed in the
section, for example by using __attribute__((constructor)), that the
compiler (gcc or clang for example) might place in section .ctors and
the linker (from binutils) will move to .init_array on the output
object, or by placing them directly into .init_array by the compiler
when compiling. If this does not happen and the function pointers end
up in .ctors, then they will not get passed the main() arguments, which
we do really need in this case.
But this relies on recent binutils or gcc having native .init_array
support, and not having it disabled through --disable-initfini-array.
To guarantee we get the correct behaviour, let's just place the function
pointer in the .init_array section directly, so we only require a recent
enough glibc.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=65029
|
|
06f0585c
|
2013-05-21T10:31:59
|
|
build: Compress the distribution tarball with xz instead of gzip
|
|
e9933255
|
2013-05-25T17:11:53
|
|
Make setproctitle() available in 0.2 and 0.5 version nodes
Make the 0.5 version the default, so that code wanting the actual
implemented version can get a proper versioned depdendency. For code
linked against the old version, make it available as an alias.
|
|
35785f8d
|
2012-11-25T21:10:53
|
|
Modify setproctitle() to conform to project coding style
Use local getprogname()/setprogname() instead of reimplementing them
locally. Use clearenv() if available, not just on glibc. Use bool
instead of _Bool. Use paranthesis on sizeof. Fold the SPT_MIN macro
into spt_min(). Make spt_init() static. Avoid unnecessary gotos.
|
|
14524b54
|
2012-06-03T07:39:42
|
|
build: Set default compiler variables from configure
This centralizes the setting so there's no duplication anymore,
makes sure the user supplied variables are never overridden, and
are only set when using gcc.
Reported-by: Samuli Suominen <ssuominen@gentoo.org>
|
|
75299746
|
2012-01-03T08:58:01
|
|
Base getprogname() on program_invocation_short_name presence instead of glibc
|
|
d5d91869
|
2012-01-03T09:08:35
|
|
Base fpurge() implementation on __fpurge presence instead of glibc
|
|
f8e80630
|
2012-01-03T08:40:18
|
|
Base fgetln() implementation on getline presence instead of glibc
|
|
23973e22
|
2012-03-23T10:43:33
|
|
build: Add a test suite infrastructure
|
|
943939d0
|
2011-12-31T08:39:44
|
|
Add new closefrom() function
Code taken from sudo, man page from FreeBSD.
|
|
87232260
|
2011-07-06T16:29:26
|
|
Use system __progname variable in progname module if available
|
|
b5cc17d6
|
2011-07-05T23:27:31
|
|
Use getexecname() if available for getprogname()
This function is present on Solaris.
|
|
dcaa93d9
|
2010-12-17T11:13:04
|
|
build: Switch to autotools
|