|
9cbd935d
|
2024-03-06T02:12:56
|
|
build: Match also gnu* for GNU/Hurd on the glibc ABI selection
The GNU/Hurd system does not specify a kernel part, so we need to match
on both *-gnu* and gnu* (to avoid overmatching with just *gnu*).
|
|
70f49a70
|
2024-02-28T04:50:34
|
|
Release libbsd 0.12.1
|
|
08188f3c
|
2024-02-28T04:37:44
|
|
build: Install err.h if either of the err or errc modules are built
Both modules expose their functions in err.h, so we need to install it
whenever any of them is being built.
Reported-by: Alejandro Colomar <alx@kernel.org>
|
|
644062da
|
2024-02-27T05:52:53
|
|
Release libbsd 0.12.0
|
|
32d18dcf
|
2024-02-09T04:32:12
|
|
Add explicit time32 and time64 support
Handle the three potential system scenarios:
- system time_t is time64
- system time_t is time32 and supports time64
- system time_t is time32 and does not support time64
Add the explicit time32 and time64 functions when necessary and map
them accordingly for each of these cases.
|
|
605614d6
|
2024-02-12T03:00:06
|
|
build: Add support for AIX
|
|
ec7f5ee9
|
2024-02-12T01:04:37
|
|
Add vasprintf() and asprintf() functions missing on AIX
These functions are used by code in the library, even though these
functions started as GNU extensions, they are present in all BSDs,
so we expose them as part of our interface on AIX.
|
|
5392f0c1
|
2024-02-12T02:55:08
|
|
build: Add support for Solaris
|
|
be4aced4
|
2024-02-11T23:55:40
|
|
build: Make almost all exposed interfaces use the new ABI selection
Explicitly select what to include as part of the target ABI, instead of
letting autoconfiguration potentially break ABI if the system grows
functionality provided by the library.
Make almost all the library selectable per target. Do not install manual
pages for interfaces not included in the library. Control inclusion of
symbols in map file via pre-processor macros, and move the comments
describing the ABI selection to configure.ac.
For now the header files are included as is and filtered through
pre-processor conditionals. Eventually they might get switched to be
autogenerated at build time.
|
|
27503a10
|
2024-02-14T04:59:44
|
|
build: Rework ABI selection logic
Add a new LIBBSD_SELECT_ABI m4 macro, and use it to setup the ABI
interfaces to expose and the various variables and conditionals
to be used by the build system.
Switch to set the initial values to unknown and then set every one
of the selections explicitly by supported target.
Update comments for rationale for things to DROP, or for why some
selections are enabled.
|
|
99739877
|
2024-02-14T04:59:44
|
|
build: Rename ABI selection variables from need_ to abi_
This should make the purpose of these variables more clear.
|
|
0bdbc078
|
2024-02-21T02:29:15
|
|
build: Revert accidental testing aid change
This was accidentally included in the commit, but should have only been
used during development.
Fixes: commit de124dcafac678351366b0572938398ea7ae93e4
Changelog: silent
|
|
de124dca
|
2024-02-20T04:28:01
|
|
build: Make digest function checks conditional on their use
The digest function checks where unconditionally requiring the functions
to exist or they would error out. But these functions are not required
on all systems, they depend on the ABI to be exposed.
|
|
1d287295
|
2024-02-20T04:13:59
|
|
build: Move ABI selection at the top of configure.ac
Merge the existing host_os block for the OS detection with the ABI
selection one, as these are related. This way we will be able to make
some of the latter checks conditional on the selected ABI.
|
|
c8e5338a
|
2024-02-21T02:05:57
|
|
build: Rename LIBBSD_ABI to SOVERSION
This matches the semantics of the variable, and makes it independent of
the project, just as the package variables.
|
|
b6d6da4c
|
2024-02-20T04:40:32
|
|
build: Refactor function checks into a new libbsd-funcs.m4 file
These are complex enough to clutter the main configure.ac. Move them
into their own file.
|
|
9fab225f
|
2024-02-17T05:25:01
|
|
Split errc family of functions from err ones
On most systems the err family of functions is already present, but are
missing the errc family of functions, which are also present on some
other systems. Splitting them into separate files will make it easer to
conditionally include one or the other.
|
|
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
|
|
9a9a8b2d
|
2015-09-23T19:39:47
|
|
Add private getentropy module from OpenBSD and LibreSSL
Adapt the code to the local build system.
|
|
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
|
|
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
|