Guillem Jover [Mon, 27 May 2013 02:41:58 +0000 (04:41 +0200)]
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.
Casper Dik [Fri, 15 Mar 2013 00:13:58 +0000 (01:13 +0100)]
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.
Guillem Jover [Sat, 25 May 2013 15:11:53 +0000 (17:11 +0200)]
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.
Guillem Jover [Sun, 25 Nov 2012 20:10:53 +0000 (21:10 +0100)]
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.
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.