|
32671144
|
2014-11-01T00:21:30
|
|
Add __offsetof, __rangeof and __containerof to sys/cdefs.h
Import and adapt from FreeBSD.
|
|
0e4e3ab2
|
2014-11-01T00:20:23
|
|
Add __DECONST, __DEVOLATILE and __DEQUALIFY macros to sys/cdefs.h
Import from FreeBSD.
|
|
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
|
|
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>
|
|
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.
|
|
faa005cb
|
2014-06-27T02:05:11
|
|
Add reallocarray() function from OpenBSD
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
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.
|
|
a88bb838
|
2014-03-06T22:10:36
|
|
Add OpenRISC support to nlist()
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
8d16c3df
|
2013-10-11T05:43:42
|
|
Add timeconv module from FreeBSD
Inline license information from FreeBSD root dir COPYRIGHT file.
|
|
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.
|
|
86cbff38
|
2013-10-11T05:11:42
|
|
Handle glibc partial header inclusions
The glibc headers use selective inclusions through the __need_NAME
mechanism to avoid circular dependencies.
The problem is that if we are being overlaid, and have been requested
a partial inclusion, when we pass control to the system header, then
we might miss definitions needed by our own header, resulting in build
failures.
Workaround that by catching current partial requests, and skip the
current inclusion.
|
|
ee04e8de
|
2013-10-10T09:49:04
|
|
build: Set subdir-objects automake option
Bump automake minimal version to 1.9.
|
|
61b2dbb8
|
2013-07-15T01:44:30
|
|
Fix dehumanize_number() to correctly detect overflows
Do not allow numbers greated than INT64_MAX and smaller than INT64_MIN.
Clarify the positive sign value by prefixing it with an explicit +.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=66909
|
|
11941746
|
2013-07-14T10:58:20
|
|
Release libbsd 0.6.0
|
|
948bcf1d
|
2013-07-13T02:11:20
|
|
Warn when setproctitle() gets called before initialization
Try to give a helpful message in case the program is not initializing
the setproctitle() machinery.
|
|
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.
|
|
1bf0a555
|
2013-06-08T17:43:42
|
|
Release libbsd 0.5.2
|
|
ad613d9d
|
2013-06-07T07:11:50
|
|
Create a shallow copy of environ before replacing it in setproctitle()
Because clearenv() or setenv() might free the environ array of pointers,
we should make sure to copy it so that we can access it later on when
doing the deep copy via setenv().
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=65470
|
|
e084ce3f
|
2013-06-07T04:46:29
|
|
Specify setproctitle_stub() signature manually if typeof is missing
Do not stop exporting the function in the version node even if typeof
is not available, as that would break ABI.
|
|
50e4c55a
|
2013-06-08T17:55:19
|
|
Try to check if setproctitle() constructor got passed arguments
|
|
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
|
|
367e0365
|
2013-06-08T08:15:21
|
|
test: Try setting and getting an environment variable after setproctitle()
|
|
dc8b0978
|
2013-05-30T04:09:25
|
|
build: Ignore automake 1.13+ test suite generated files
|
|
46633647
|
2013-05-27T06:52:05
|
|
Release libbsd 0.5.1
|
|
df5aebd7
|
2013-05-27T06:49:57
|
|
test: Mark a literal integer as long long
This fixes build failures on 32-bit architectures.
|
|
95878823
|
2013-05-21T04:34:34
|
|
Release libbsd 0.5.0
|
|
01f146c2
|
2013-05-27T04:41:58
|
|
build: Handle the ChangeLog as a distributed-only file
The ChangeLog file is distributed, and cannot be regenerated outside
of the git repository, so do not remove it in DISTCLEANFILES, and move
the generation code into dist-hook, which also avoids unnecessary
computation during normal builds.
|
|
509841b5
|
2013-05-25T15:44:57
|
|
build: Use AM_V_at for mkdir
|
|
06f0585c
|
2013-05-21T10:31:59
|
|
build: Compress the distribution tarball with xz instead of gzip
|
|
7c4caa67
|
2013-05-25T15:36:11
|
|
Fix comparison between signed and unsigned integer compiler warnings
|
|
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.
|
|
a4812cdf
|
2013-03-15T01:13:58
|
|
Fix getpeereid() compilation on Solaris
The code in getpeereid() is unlikely to compile as ucred_t is an opaque
struct (ucred_t * works but ucred_t does not). Either you need to give
a pointer initialized to NULL and getpeerucred() allocates a new ucred
or you call it with an allocated ucred as in this patch.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
d3a09e1c
|
2012-12-27T11:19:20
|
|
Switch dehumanize_number() to use expand_number()
The function is a duplicate of expand_number(), but covering less
prefixes and with a slightly different function signature.
Spotted-by: Peter da Silva <resuna@gmail.com>
|
|
330b569f
|
2013-05-26T04:34:57
|
|
test: Add new humanize unit test
|
|
8c26c40a
|
2012-11-27T14:23:26
|
|
test: Add setproctitle() unit test
|
|
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.
|
|
c984dacd
|
2012-11-27T14:24:13
|
|
Implement sendmail semantics for setproctitle()
Prefix the title with "progname: ", and skip it if the format string
starts with '-' (which gets skipped on output too).
|
|
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.
|
|
2a0260d0
|
2012-11-28T11:09:02
|
|
Add a setproctitle() implementation
Taken from libnostd.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
f8d52ead
|
2012-11-23T18:33:23
|
|
Add x32 support to nlist()
|
|
cf683a27
|
2012-11-23T18:32:35
|
|
Add arm64 (aka aarch64) to nlist()
|
|
7196b4dc
|
2013-05-23T02:05:19
|
|
test: Add new fgetln() and fgetwln() unit test
|
|
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>
|
|
cb7bc0d8
|
2012-11-25T22:09:43
|
|
Add file buffer pool support to fgetln()
This avoids buffer overwrites during concurrent or intermixed calls to
fgetln() when using more than one different stream (currently 32), which
the original interface supports natively by using an internal buffer
from the FILE structure. Although this workaround is rudimentary, it
should cover most of the theoretically problematic cases.
|
|
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.
|
|
38627648
|
2013-05-21T04:13:55
|
|
Coalesce identical BSD-2-clause licenses
|
|
918a4dba
|
2012-06-27T09:15:15
|
|
Release libbsd 0.4.2
|
|
444bd1fb
|
2012-06-21T10:16:14
|
|
man: Use minus signs and hyphens consistently
Any string that can be copy & pasted into a terminal, for example,
needs to correctly use minus signs (escaped dashes), instead of the
default hyphen.
|
|
1d69ae1c
|
2012-06-04T05:47:26
|
|
man: Recode flopen(3) to UTF-8
Spotted-by: Eric Smith <eric@brouhaha.com>
|
|
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>
|
|
c21d788f
|
2012-06-01T08:20:37
|
|
Release libbsd 0.4.1
|
|
fdcae577
|
2012-06-01T08:17:42
|
|
build: Set runtimelibdir to libdir
This makes sure the install-exec-hook under src works as expected even
when no runtimelibdir was specified, otherwise the symlinks end up
pointing to non-existing targets.
Reported-by: Ryan Mullen <rmmullen@gmail.com>
|
|
e9e4a60d
|
2012-06-01T08:15:00
|
|
build: Use MKDIR_P variable instead of literal «mkdir -p»
|
|
309c82a0
|
2012-05-29T04:38:07
|
|
Release libbsd 0.4.0
|
|
cd67cb14
|
2012-05-29T07:17:46
|
|
Use implicit <md5.h> from overlay instead explicit <bsd/md5.h>
This was assuming an installed <bsd/md5.h> on the system, due to the
build system not including -Iinclude/ anymore.
Regression introduced in commit 901ed630fc64fca828e031bc8fa6780db9f05db1.
|
|
ddefaae3
|
2012-04-24T04:05:48
|
|
Do not quote man page titles
|
|
e7f39760
|
2012-03-23T10:31:42
|
|
Add email address to my name
|
|
e59ac2c9
|
2012-03-23T10:11:57
|
|
Clarify that the 4-clause BSD licenses are only for man pages
|
|
1b5b1cd5
|
2012-04-24T04:20:58
|
|
Move mdX.3 man page to section 3bsd
This makes sure there will be no collisions on systems where a mdX.3
provided by a third party is already present.
|
|
7cfa7e43
|
2012-01-12T19:13:16
|
|
Add new man page for tree(3)
Taken from FreeBSD.
|
|
7620fef7
|
2012-01-12T20:56:24
|
|
Remove UC Berkeley advertising clause
As per <ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change>.
|
|
08139dd5
|
2012-01-12T19:13:16
|
|
Add new man pages for bitstring(3) and queue(3)
Taken from FreeBSD.
|
|
d90ce079
|
2011-05-14T14:18:57
|
|
Add new man pages for getprogname(3) and setprogname(3)
Taken from FreeBSD.
|
|
c1d086c2
|
2011-05-14T14:18:57
|
|
Add new man page for setproctitle(3)
Taken from FreeBSD.
|
|
e37293a1
|
2012-01-12T18:16:55
|
|
Add <bitstring.h> for compatibility with NetBSD and OpenBSD
|
|
34bf1068
|
2012-03-23T10:43:33
|
|
test: Add a unit test for endian encoder/decoder
|
|
4eab0cc3
|
2012-01-03T05:29:36
|
|
Add inline endian encoding/decoding functions
Taken from FreeBSD.
Signed-off-by: Guillem Jover <guillem@hadrons.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
|
|
786d1439
|
2012-03-24T20:37:55
|
|
test: Add new overlay unit test
|
|
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>
|
|
f71d8e05
|
2012-03-21T04:10:37
|
|
Remove bogus deprecation warning from <getopt.h>
|
|
0b96e1a2
|
2012-01-03T07:32:53
|
|
Remove deprecated compatibility includes in headers
|
|
109cafb3
|
2012-01-03T07:32:37
|
|
Remove deprecated headers
|
|
64348583
|
2011-12-31T04:30:48
|
|
Add new expand_number() function
Taken from FreeBSD.
[guillem@hadrons.org:
- Include <stdint.h> in <bsd/libutil.h>. ]
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
943939d0
|
2011-12-31T08:39:44
|
|
Add new closefrom() function
Code taken from sudo, man page from FreeBSD.
|
|
3d614131
|
2011-12-31T06:01:27
|
|
Base errc() and warnc() on vwarnc() and verrc() respectively
|
|
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.
|
|
abf14c39
|
2012-03-24T20:37:55
|
|
test: Add new headers unit test
|
|
23973e22
|
2012-03-23T10:43:33
|
|
build: Add a test suite infrastructure
|
|
980f04f7
|
2012-01-03T08:58:52
|
|
build: Do not define already defined _GNU_SOURCE
The macro is defined by configure on config.h which is now implicitly
included by all source files.
|
|
8d2f12d7
|
2012-01-03T08:45:05
|
|
build: Include <config.h> through -include for all source files
|
|
88004b30
|
2011-12-31T07:31:47
|
|
build: Set -Wno-unused-parameter to default CFLAGS
|
|
dcaa93d9
|
2010-12-17T11:13:04
|
|
build: Switch to autotools
|
|
0aa777f4
|
2011-12-31T07:35:52
|
|
Move .pc and .map files to src/
|
|
540ab03b
|
2011-12-31T06:50:40
|
|
Move man pages to man/
|
|
93321224
|
2011-12-11T07:57:05
|
|
Rename version script from Versions to libbsd.map
|
|
2fb7200d
|
2011-10-23T19:27:44
|
|
Fix typos in source comments
Found by codespell.
|
|
0acd86f6
|
2011-07-05T21:01:57
|
|
build: Use -isystem instead of -I
|
|
901ed630
|
2011-07-05T21:01:18
|
|
build: Do not add -Iinclude/ to MK_CPPFLAGS
The source code should not be using any of the headers there.
|
|
059f89ca
|
2011-07-05T20:59:04
|
|
Add missing semicolon to bsd_getopt() declaration
Accidentally lost in commit 4a6303ba3b64504ab0077b9cfebd2a4b918d531d.
|