|
31e9396b
|
2024-03-13T00:56:07
|
|
build: Only install time struct conversion macros where missing
These macros are available in several systems, and we should not install
the man pages for them, otherwise we might end up shadowing the system
man pages if present.
|
|
3b8416ac
|
2024-03-10T18:01:02
|
|
man: Add links for errc module functions
Reported-by: Alejandro Colomar <alx@kernel.org>
|
|
94d0fb3c
|
2024-03-08T03:05:24
|
|
man: Do not install timeval(3bsd) nor timespec(3bsd)
These are system types, which we should not be documenting. Rewrite the
man pages around the TIMEVAL_TO_TIMESPEC and TIMESPEC_TO_TIMEVAL macros.
|
|
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.
|
|
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.
|
|
a81d0b71
|
2024-02-11T23:55:40
|
|
build: Sort variables and their contents in automake files
This should make it easier to add new entries, and find them afterwards.
|
|
f8cb9d8b
|
2024-02-20T03:57:37
|
|
build: Remove space before shell redirection
This makes it more clear what the redirection applies to.
|
|
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.
|
|
461f10ac
|
2024-02-17T03:07:58
|
|
Sync strtoi()/strtou() implementations from NetBSD
These contain the fixes to the error handling logic.
In NetBSD the manual page for strtou.3 is generated from the strtoi.3
manual page applying some substitutions, the problem is that the
cross-references are then lost. We will still keep them separate.
Reported-by: Alejandro Colomar <alx@kernel.org>
|
|
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.
|
|
97b0fe84
|
2024-01-08T23:57:45
|
|
man: Mention that funopen() can be made available on musl
As musl got fopencookie() implemented in 1.1.19, the funopen() function
can also be provided there. Note this in the documentation.
|
|
e87ae3be
|
2024-01-08T23:40:31
|
|
man: Fix manual page references
When referring to another manual page and their section number, we need
to use Xr instead of Fn, otherwise the section number is interpreted as
a function argument. For functions provided by libbsd itself we should
be using the 3bsd section instead of 3.
|
|
9275d134
|
2024-01-08T23:39:19
|
|
man: Add closefrom(), strlcpy() and strlcat() as superseded functions
These were missing from the list of functions provided by some libc
implementation.
|
|
304a1f83
|
2024-01-08T23:37:43
|
|
doc: Use macOS to refer to the operating system
This is the correct spelling, instead of capitalizing it.
|
|
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
|
|
9d3e59a0
|
2023-10-10T01:53:32
|
|
man: Use VARIANTS instead of ALTERNATIVES in libbsd(7)
Using alternatives seems confusing in this context.
|
|
f02562d6
|
2023-10-10T01:52:37
|
|
man: Markup function references with Xr instead of Fn
These references had man page sections in them, so using Fn meant that
these appeared as function arguments.
|
|
73b25a8f
|
2023-04-23T02:04:47
|
|
build: Sort entries alphabetically
|
|
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.
|
|
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.
|
|
ff46386f
|
2023-03-29T02:32:37
|
|
man: Add HISTORY section to arc4random(3bsd)
|
|
4c6da577
|
2023-03-29T02:28:52
|
|
man: Switch arc4random(3bsd) man page from OpenBSD to NetBSD
This gets rid of the last BSD-4-clause licensed file in the project.
The man page will probably need to be adapted to the current
implementation, but that can be done piecemeal afterwards.
Closes: #7
|
|
5962e03c
|
2023-03-03T01:27:31
|
|
man: Fix BSD and glibc versions
The versions used in the BSD macros are unknown, so they emit warnings,
extend or reduce them to use the two digit form. Correct the glibc
version when closefrom(3) got introduced.
|
|
59a21c7f
|
2023-02-20T00:11:10
|
|
man: Update STANDARDS and HISTORY sections
Include BSD versions when functions were introduced. Add mention
whether these are BSD extensions.
|
|
23377191
|
2022-12-07T04:06:37
|
|
man: Prune unneeded <sys/types.h> include in setproctitle(3)
FreeBSD first declared the function in unistd.h in 2000:
https://cgit.freebsd.org/src/commit/include/unistd.h?id=9feac5c21886
No other #include line was needed to use the function, but the man page
unnecessarily instructed users to include sys/types.h until 2022-11-29:
https://cgit.freebsd.org/src/commit/?id=5b6f0a5012e9bc37dcb32b57b41e2443a46da620
libbsd first declared the function in unistd.h in 2010 with commit
3fed78e5b08f78256e533788b4bcd6502b0949d7 and inherited the bug from
FreeBSD's man page.
No need to do anything for backwards compat.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
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>
|
|
00b538ff
|
2022-11-23T23:28:34
|
|
build: Terminate lists in variables with «# EOL»
This means we can add a trailing «\» to every element, so that they
can be removed without requiring modification of other lines, and can
be easily sorted.
Replace the old usage of $(nil) which could possibly end up with junk
added if such variable is ever defined, in the environment.
|
|
3538d38f
|
2022-10-06T03:59:33
|
|
man: Discourage using the library in non-overlay mode
This makes code using it non-portable, and requires the namespeced
headers from libbsd, instead of any generic system headers. It also
requires more code changes than the overlay mode.
|
|
28298ac0
|
2022-10-05T01:35:08
|
|
doc: Switch references from pkg-config to pkgconf
The former used to be the reference implementation, but it has been
stagnant to the point of not showing much signs of life. Switch to
the currently active and more complete implementation for references.
|
|
b466b14a
|
2022-08-03T01:23:09
|
|
man: Document that some arc4random(3) functions are now in glibc 2.36
|
|
1f6a48b2
|
2022-08-03T02:03:05
|
|
Sync arc4random(3) implementation from OpenBSD
Closes: #12
|
|
f4baceb8
|
2022-08-03T03:05:52
|
|
man: Rewrite gerprogname(3bsd) from scratch
This gets rid of one of the last man pages with a BSD-4-clause license.
|
|
f35c5458
|
2022-08-03T02:21:16
|
|
man: Lowercase man page title
While using fully uppercase man page titles has been the usual
convention for a very long time, it is rather ugly and something that
some other projects are switching away from.
|
|
c9c78fdf
|
2022-04-04T11:49:52
|
|
man: Use -compact also for alternative functions in libbsd(7)
The other function lists use the compact mode, let's be uniform about
this.
|
|
f7465b93
|
2022-03-30T22:56:43
|
|
man: Document when functions were added to musl in libbsd(7)
The explicit_bzero(3) and reallocarray(3) functions are also present on
musl libc, mention it in the superseded section.
|
|
7aed0edf
|
2021-12-02T00:35:05
|
|
man: Add missing comma in .Dd for tree(3)
Reported-by: Thorsten Glaser <tg@mirbsd.de>
|
|
fafcc397
|
2021-11-30T04:00:54
|
|
man: Update tree(3) man page from OpenBSD
This man page has a BSD-3-clause-author license instead of the old
BSD-4-clause license.
|
|
428be9e0
|
2021-10-07T23:08:42
|
|
man: Fix .Nx macro usage
Its arguments are used as version numbers, so we need continue the
content on the next line.
|
|
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.
|
|
d563a174
|
2021-02-18T23:38:30
|
|
man: Call the libbsd-ctor library by its name instead of bsd-ctor
|
|
785cf9d1
|
2021-02-18T23:38:30
|
|
man: Fix pkg-config(1) references in libbsd(7) man page
|
|
46760262
|
2021-02-07T20:47:00
|
|
Update <sys/queue.h> from FreeBSD
This brings <sys/queue.h> to the most up-to-date version from FreeBSD,
incorporating 18 commits from the past 5 years (2015-02-24 - 2021-01-25):
$ git log --oneline 9090a24aed70..8d55837dc133 sys/sys/queue.h share/man/man3/queue.3
Only minimal changes compared to the FreeBSD version have been applied
(queue.3 -> queue.3bsd, _LIBBSD_ prefix).
[guillem@hadrons.org: Remove reference to kernel mode in man page. ]
Closes: !12
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
18ebabf2
|
2021-02-07T10:56:51
|
|
man: Update libbsd(7) man page with updates in 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
|
|
45dd5229
|
2021-02-07T01:27:51
|
|
man: Remove empty line in reallocarray(3bsd)
Warned-by: lintian
Fixes: commit 01f0d1ea1e71f1018a009ebd9203dd48e6d90c45
|
|
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>
|
|
eac4ce0c
|
2020-09-20T03:30:20
|
|
man: Add a timespec(3bsd) alias to timeval(3bsd)
Even though man-pages project now includes man pages for system data
types, we still include these for any other system that does not have
them, to provide a self-contained project with code and documentation.
|
|
5ecff0c9
|
2020-09-16T23:41:28
|
|
man: Add missing LIBRARY section
|
|
59f6a956
|
2019-08-12T23:25:20
|
|
man: Add missing doc-operating-system-NetBSD string variable
Fixes: commit 99320b9168ffb0112def1a712e8d59441d1b46d9.
|
|
3aaedb12
|
2019-06-15T14:33:32
|
|
nlist: Check whether the nl argument is not NULL
This prevents programming errors.
Reported-by: Daniel Hodson <daniel@elttam.com.au>
Based-on-patch-by: Daniel Hodson <daniel@elttam.com.au>
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
2c754f43
|
2019-07-31T03:49:43
|
|
man: Add man page sections to function references
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
ee4d2497
|
2019-03-10T10:03:12
|
|
man: Fix typo
Closes: !5
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
8d2afa3a
|
2019-07-31T03:49:24
|
|
man: Fix typos
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
e9f6faf3
|
2019-07-31T03:02:38
|
|
man: Replace references to a.out(5) with elf(5)
The a.out(5) support in nlist(3) got removed some time ago, and
there is now only elf(5) support.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
99320b91
|
2019-06-13T23:43:57
|
|
man: Define doc-operating-system-NetBSD string variables
This way we do not depend on the installed groff being new enough.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
71c710e9
|
2019-06-13T23:42:49
|
|
man: Use major.minor version for .Nx macros
The macro only recognizes this version form, and not just major alone.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
21f4052c
|
2019-06-13T23:36:09
|
|
man: Add doc-str-Lb-libbsd aliases for str-Lb-libbsd
groff(1) has changed the internal layout for the .Lb doc strings, but to
preserve backwards compatibility we cannot simply rename them, we need
to create new aliases so that these will work with old and new macros.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
a8531ad0
|
2018-05-22T13:08:56
|
|
man: Fix comma splice
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
c4b0fd2c
|
2018-05-22T13:08:55
|
|
man: Fix name of the function injected by libbsd-ctor
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
3cabf46b
|
2018-05-21T03:15:59
|
|
Deprecate fgetwln()
This function has the same problems as fgetln() which is already marked
as deprecated.
|
|
6f68c930
|
2018-05-21T00:22:38
|
|
Switch strtonum() implementation from strtoll() to strtoi()
Import from NetBSD.
|
|
e13b1a33
|
2018-05-21T00:20:49
|
|
Import strtoi() and strtou() functions from NetBSD
|
|
2d7de186
|
2018-05-21T03:09:05
|
|
Update vis/unvis modules from NetBSD
|
|
3efad641
|
2018-05-21T01:56:33
|
|
Update readpassphrase() from OpenBSD
|
|
21edbb4f
|
2018-05-21T00:31:15
|
|
Update fmtcheck() from NetBSD
|
|
facbddb6
|
2018-05-20T19:18:18
|
|
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.
|
|
993828d8
|
2018-05-21T01:11:46
|
|
Add flopenat() function from FreeBSD
|
|
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.
|
|
b4f7c065
|
2017-08-05T13:42:56
|
|
man: Document on what other BSDs arc4random(3) is present
|
|
9532cb39
|
2017-06-23T05:59:35
|
|
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
|
|
a4dd754c
|
2017-06-22T04:58:09
|
|
man: Ship and install libbsd(7)
Fixes: https://bugs.freedesktop.org/101543
|
|
0071b979
|
2017-06-05T05:43:26
|
|
Import <sys/time.h> for some of its macros
Fixes: https://bugs.freedesktop.org/94320
|
|
ab5db68b
|
2017-06-19T03:02:32
|
|
build: Add missing \ at end of line
Fixes: commit 934b7a0ccbdc60313102f153eadc2f46853a505b
|
|
c74ca099
|
2017-06-07T22:46:07
|
|
man: Use .In intead of .Fd macros for includes
|
|
ba9e2a5a
|
2017-06-05T06:33:47
|
|
man: Add new libbsd(7) library overview man page
|
|
6a5a5158
|
2017-06-07T05:00:34
|
|
man: Add missing man pages
This adds man pages for byteorder(3), errc(3) and fpurge(3), including
all their aliases.
|
|
934b7a0c
|
2017-06-05T06:32:36
|
|
man: Add missing aliases
|
|
f20e6972
|
2017-06-05T06:43:22
|
|
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.
|
|
e86c1b5f
|
2016-02-14T09:00:57
|
|
man: Fix ungrammatical construct
Warned-by: lintian
|
|
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
|
|
f3b11554
|
2015-11-30T19:32:48
|
|
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.
|
|
45443583
|
2015-09-23T19:37:37
|
|
Add explicit_bzero() function from OpenBSD
|
|
53d989a2
|
2014-12-13T21:28:36
|
|
Switch fparseln() implementation from fgetln() to getline()
|
|
c7e01e98
|
2014-11-01T00:22:28
|
|
Sync queue(3) from FreeBSD
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=85147
|
|
a6fe103c
|
2014-10-31T17:29:54
|
|
Add new man page for reallocarray(3)
Import man page from OpenBSD.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=85622
|
|
02b55488
|
2014-08-12T12:32:34
|
|
Use stdint integer types instead of BSD legacy ones
|
|
36aca8c0
|
2014-06-26T21:43:55
|
|
Add stringlist module from NetBSD
|
|
e8f93003
|
2014-06-26T21:32:11
|
|
Add getbsize() function
Import code from DragonFlyBSD and man page from FreeBSD.
|
|
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.
|
|
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
|
|
30349f89
|
2013-05-25T15:35:39
|
|
Update radixsort module from NetBSD
Merge some interesting changes.
|
|
96a2dae3
|
2013-05-25T15:31:45
|
|
Update setmode module from NetBSD
Merge some interesting changes.
|
|
a97ce513
|
2012-11-23T21:19:45
|
|
Add new fgetwln() function
Man page taken from FreeBSD.
|
|
ee0489eb
|
2012-08-07T08:44:30
|
|
Add new fparseln() function
Taken from NetBSD.
[guillem@hadrons.org:
- Import from NetBSD instead of FreeBSD to get a 3-clause BSD license,
instead of a 4-clause one.
- Define compatibility macros.
- Change library from libc to libbsd and header in man page.
- Add copyright information to COPYING.
- Add symbol to map file. ]
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
1be0bdb2
|
2012-11-25T21:13:38
|
|
Add new strnstr() function
Taken from FreeBSD.
|
|
ff0d700d
|
2012-11-23T17:16:43
|
|
Add new wcslcat() and wcslcpy() functions
Taken from FreeBSD.
|