Strake [Tue, 7 Aug 2012 13:44:30 +0000 (08:44 -0500)]
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. ]
Guillem Jover [Sun, 25 Nov 2012 21:09:43 +0000 (22:09 +0100)]
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.
Guillem Jover [Sun, 3 Jun 2012 05:39:42 +0000 (07:39 +0200)]
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.
Guillem Jover [Fri, 1 Jun 2012 06:17:42 +0000 (08:17 +0200)]
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.
Guillem Jover [Tue, 3 Jan 2012 04:39:22 +0000 (05:39 +0100)]
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.
Guillem Jover [Wed, 25 May 2011 19:02:40 +0000 (21:02 +0200)]
Define _SYS_CDEFS_H and _SYS_CDEFS_H after including <sys/cdefs.h>
This makes sure the “standard” inclusion protectors are in place, as at
least some FreeBSD kernel headers expect these to be defined to do some
sanity checks.
Guillem Jover [Wed, 23 Feb 2011 11:39:58 +0000 (12:39 +0100)]
Conditionalize <time.h> inclusion from <bsd/bsd.h>
This was added long time ago to fix some software which was implicitly
depending on the header through some other header, and to avoid having
to modify such software. Conditionalize it on LIBBSD_CLEAN_INCLUDES,
so that buildability can be tested for its future removal.
Guillem Jover [Wed, 23 Feb 2011 11:38:42 +0000 (12:38 +0100)]
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.
Guillem Jover [Wed, 23 Feb 2011 10:07:30 +0000 (11:07 +0100)]
Move all header files to /usr/include/bsd/ and deprecate /usr/include/
First stage of the transition to avoid possible clashes with other
software by moving out of the way the remaining headers from
/usr/include/.
At least nlist.h is known to cause file conflicts with some libelf
implementations. libutil.h is not really complete and might cause
confusion if software detects its availability w/o someone actually
checking. And lastly vis.h is not known to cause any problem and it's
complete, but better be safe than sorry.
The compatibility headers will be removed in a later release.
Guillem Jover [Wed, 23 Feb 2011 13:04:57 +0000 (14:04 +0100)]
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.
Guillem Jover [Fri, 25 Feb 2011 12:52:59 +0000 (13:52 +0100)]
Initialize __progname to program_invocation_short_name
As we do not have cooperation from the crt0 code to set __progname, we
have to set it ourselves from getprogname() in case it's NULL. On GNU
systems we can use program_invocation_short_name which is actually set
on crt0.
Guillem Jover [Sun, 31 Jan 2010 13:13:24 +0000 (14:13 +0100)]
build: Use proper user variables during build
To compile we need to use CPPFLAGS and CFLAGS, to link CFLAGS and
LDFLAGS. Rename MK_CFLAGS to MK_CPPFLAGS as those are only relevant
at compilation time.
Eric Smith [Sat, 30 Jan 2010 21:13:18 +0000 (22:13 +0100)]
build: Install shared library with 755 permission
The Makefile should install the shared library with 755 permission
rather than 644. That's standard practice, and required when building
RPMs on Fedora to get a debuginfo package.