Joachim Nilsson
be08bcd09d
strndupa.h: #error if building with non-GCC on non-GNU systems
...
At the moment only GCC is supported on non-GNU systems, unfortunately.
GNU systems usually have GLIBC, or another library with strndupa().
This strndupa() implementation requires GCC for the builtin alloca API.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-04 15:12:02 +02:00
Joachim Nilsson
1495a3f858
Add compat strndupa() implementation from libnostd
...
This patch adds compat support, to *BSD and other UNIX, for the GLIBC
strndupa() function. The implementation is taken from libnostd written
by William Ahern.
http://www.25thandclement.com/~william/projects/libnostd.html
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-04 15:07:17 +02:00
Joachim Nilsson
5eb816b4c0
Update ChangeLog and README with new strdupa()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-03 23:12:50 +02:00
Joachim Nilsson
59869b876e
strdupa.h: #error if building with non-GCC on non-GNU systems
...
At the moment only GCC is supported on non-GNU systems, unfortunately.
GNU systems usually have GLIBC, or another library with strdupa(). This
strdupa() implementation requires GCC for the builtin alloca API.
Followup to pull-request #4
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-02 19:51:43 +02:00
Joachim Nilsson
113c3487bd
Add info on building directly from GIT
...
Followup to pullrequest #4
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-02 19:44:49 +02:00
Joachim Nilsson
de73e268d3
Merge branch 'abs0-master'
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-05-30 22:32:43 +02:00
Joachim Nilsson
b57c257f09
Cleanup of old shared rules.mk file, now only used by unit tests.
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-05-30 22:31:59 +02:00
Joachim Nilsson
94d42b3df7
Add compat strdupa() implementation from libnostd
...
This patch adds compat support, to *BSD and other UNIX, for GLIBC
strdupa() function, used in mkpath(). The implementation is taken
from http://www.25thandclement.com/~william/projects/libnostd.html
by William Ahern.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-05-30 22:29:30 +02:00
Joachim Nilsson
94ad65a121
Factor out string functions to lite/strlite.h
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-05-30 22:27:41 +02:00
Joachim Nilsson
613d397161
Fix mkpath() to handle relative dirs
...
After input from both StackOverflow and Valery Frolov.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-05-23 09:15:50 +02:00
Joachim Nilsson
7df1b75fa0
Bump version for v1.6.0 release
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-05-13 07:22:25 +02:00
Joachim Nilsson
9b1b7ca4cf
ChangeLog: Fix Markdown links in v1.6.0 release
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-05-13 07:21:45 +02:00
Joachim Nilsson
1e064b8b4d
Update ChangeLog for v1.6.0 release
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-05-12 21:13:10 +02:00
Joachim Nilsson
18dde87f0a
Add NetBSD fparseln(3) v1.10
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-05-09 19:14:05 +02:00
Joachim Nilsson
fcb38c9cc5
Constify fisdir() argument
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-05-09 19:10:05 +02:00
Joachim Nilsson
ab69ae8374
Add OpenBSD reallocarray(3) v1.2
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-05-09 00:37:05 +02:00
Joachim Nilsson
95f7a91a8a
Bump version for v1.6.0 release cycle
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-05-09 00:33:16 +02:00
Joachim Nilsson
aab5a1145c
Remove Emacs version-control handling
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-05-07 22:35:49 +02:00
Joachim Nilsson
fe1a3a731d
Update ChangeLog and bump version for v1.5.1 release
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-04-17 16:27:02 +02:00
Joachim Nilsson
cd073f5221
fcopyfile: Westermo fixes and code simplification
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-04-17 16:17:00 +02:00
Joachim Nilsson
1a9d3bd91b
Spellcheck
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-04-17 01:25:46 +02:00
Joachim Nilsson
8cc267f259
Markdown formatting
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-04-17 01:03:53 +02:00
Joachim Nilsson
35d396ec27
Is --> Are, a --> an ...
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-04-17 01:02:09 +02:00
Joachim Nilsson
7e91307138
Add Table of Contents
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-04-17 00:54:22 +02:00
Joachim Nilsson
2b8f54fbc7
Update build & install instructions
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-04-17 00:53:57 +02:00
Joachim Nilsson
2e58dd3203
Simplify configure script
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-04-17 00:47:21 +02:00
Joachim Nilsson
41392f7e85
Remove bogus autoconf version requirement
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-04-17 00:46:58 +02:00
Joachim Nilsson
e4329d6c25
Add some integration tips when using GNU autotools
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-04-17 00:46:14 +02:00
Joachim Nilsson
7113b3d1d8
Add basic TODO file to keep track of stuff
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-04-11 01:24:53 +02:00
Joachim Nilsson
9b6ef1f053
pidfile(): Activate use of utimensat() to update atime+mtime
...
Due to problems with the unit tests the use of utimensat() in pidfile()
was disabled, and forgotten. This patch enables it, but beware, this
thing is QUICK on any system with a L2 cache or better.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-04-11 01:18:57 +02:00
Joachim Nilsson
efc70e3a75
Update ChangeLog and bump version for v1.5.0 release
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-03-20 02:24:26 +01:00
Joachim Nilsson
147df0c6da
ABI revision bump
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-03-20 02:21:33 +01:00
Joachim Nilsson
7f89000c6c
pidfilefn.c: Update unittests, add mtime test and prettyfy output
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-03-20 02:15:35 +01:00
Joachim Nilsson
7607148d46
Build unit tests with -g -O0 for debugging
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-03-20 02:14:55 +01:00
Joachim Nilsson
979f76aea7
pidfile(): Use utimensat() to update atime+mtime
...
This patch update the `-lite` patch to OpenBSD `pidfile()` by changing
the update atime+mtime patch from writing the PID again to instead use
utimensat(). Less overhead and nanosecond resolution.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-03-20 02:14:30 +01:00
Joachim Nilsson
ac41fa70aa
Update ChangeLog and bump version to v1.5.0-dev
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-03-13 01:59:41 +01:00
Joachim Nilsson
5f820b17b6
Change namespace for header files libite/lite.h --> lite/lite.h
...
The `libite/` namespace for header files has been the same since the
first public release in v1.0.0. This patch surprisingly changes it to
the less surprising `lite/`. Hopefully there aren't that many users of
this library out there yet, apart from myself.
Apologies if you are affected!
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-03-13 01:58:56 +01:00
Joachim Nilsson
53b715c094
Remove surprise from pkg-config output
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-03-13 00:38:53 +01:00
Joachim Nilsson
1b4cd7b20b
Update ChangeLog and bump version for v1.4.4 release
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-02-23 14:23:12 +01:00
Joachim Nilsson
8e379ca358
Update ChangeLog
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-02-22 19:11:29 +01:00
Joachim Nilsson
12241dcdfe
libite.pc.in: Remove spurious @LTLIBINTL@ after copy-paste from libConfuse
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-02-20 22:26:24 +01:00
Joachim Nilsson
0ce1b3bf44
Add pkg-config support
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-02-20 22:03:25 +01:00
Joachim Nilsson
38ff0af61a
Update ChangeLog with details on issue #3
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-02-15 18:20:25 +01:00
Joachim Nilsson
00737a5b74
Merge pull request #3 from askerin/tempfile-archfix
...
Tempfile() is dependent on $ARCH
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-02-12 16:15:53 +01:00
Joachim Nilsson
1b8b164ed4
Test build with both GCC and Clang (LLVM)
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-02-12 16:15:15 +01:00
Joachim Nilsson
9f279c0fec
Disable sudo for build while auto-tests are reintegrated
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-02-12 16:14:59 +01:00
Joachim Nilsson
0a57f2128f
Update ChangeLog and bump version for v1.4.3 release
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-02-02 09:37:40 +01:00
Joachim Nilsson
e254db48a8
Remove AUTHORS file from distribution, doesn't exist
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-02-02 08:40:14 +01:00
Joachim Nilsson
0fe429dcbe
Update ChangeLog in preparation for v1.4.3 release
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-02-02 08:25:16 +01:00
Joachim Nilsson
f1a2e01775
Makefile.am: Update to install and distribute README.md, LICENSE, etc.
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-02-02 08:24:15 +01:00
Joachim Nilsson
e5eef2ae59
Remove confusing symlinks, it's a brave Markdown world
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-02-02 08:22:13 +01:00
Joachim Nilsson
f9caffc9b7
Update ChangeLog and bump version for v1.4.2 release
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-23 11:29:50 +01:00
Joachim Nilsson
604b503b84
Fix issue #2 : GCC6 -Wmisleading-indentation causing FTBFS in pimd
...
- Add function comment
- Fix misleading indentaion
- Fix coding sttle
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-23 11:16:53 +01:00
Joachim Nilsson
5fc248522c
Update ChangeLog and bump version for v1.4.1 release
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-22 01:07:35 +01:00
Joachim Nilsson
c0b8bab164
Use pkginclude_HEADERS for libite include files
...
The v1.4.0 release installs the header files in $(prefix)/include, this
patch installs them in the proper $(prefix)/include/$(PACKAGE) dir.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-22 01:03:19 +01:00
Joachim Nilsson
c0e9c0431a
Bump version for 1.4.1-dev cycle
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-22 01:01:22 +01:00
Joachim Nilsson
efdd61648a
Update ChangeLog and bump version for release v1.4.0
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-22 00:05:01 +01:00
Joachim Nilsson
2e8e64fd2a
Step ABI version 2:0:0 --> 2:1:0
...
Slight change in how `pidfile()` behaves, now exporting __pidfile_name.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-22 00:01:19 +01:00
Joachim Nilsson
c4109e7e74
Add Niels Provos' famous splay and red-black tree implementation
...
This is the OpenBSD sys/tree.h r1.14
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-21 23:51:40 +01:00
Joachim Nilsson
5d07594709
Update pidfile() documentation and add unit test for __pidfile_name
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-21 23:30:08 +01:00
Joachim Nilsson
253460b4b8
Make pidfile() name accessible (read-only) to daemon as __pidfile_name
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-21 23:28:59 +01:00
Joachim Nilsson
acc59e0c1f
Remove AM_MAINTAINER_MODE from configure script, not recommended anymore
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-21 22:32:23 +01:00
Joachim Nilsson
90374fc237
README: Add a Build & Install section
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-18 20:11:19 +01:00
Joachim Nilsson
7f375b6e9d
Remove -Werror due to O_TMPFILE is missing on older kernels
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-14 21:49:49 +01:00
Joachim Nilsson
e4236db2bd
Ignore all generated files from build system
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-14 21:43:02 +01:00
Joachim Nilsson
42a5a906fc
ChangeLog: Prepare for upcoming v1.4.0 release
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-14 21:28:08 +01:00
Joachim Nilsson
10b28127f5
Update .gitignore, add bogus m4/.gitignore to make Travis-CI happy
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-14 21:27:04 +01:00
Joachim Nilsson
d265a05422
Update build script for Travis-CI with GNU configure and build system
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-14 18:56:01 +01:00
Joachim Nilsson
f07c05138d
Initial conversion to the GNU configure and build system
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-14 17:40:26 +01:00
Joachim Nilsson
e1f8224666
Update ChangeLog and bump version for release v1.3.0
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-07 02:58:06 +01:00
Joachim Nilsson
84650d8836
Update include file boiler plate
...
We're not in Kansas anymore, Toto.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-07 02:58:06 +01:00
Joachim Nilsson
b4fbd54a8c
Update copyright years
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-07 02:58:06 +01:00
Joachim Nilsson
c14c6a1e62
pidfile.c: Add LITE #ifdef pidfile and comment LITE mtime extension
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-07 02:58:06 +01:00
Joachim Nilsson
8aecba2b7a
strtonum.c: Update to OpenBSD v1.7, style tweaks
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-07 02:58:06 +01:00
Joachim Nilsson
74dcaddc55
strlcat.c: Update to OpenBSD v1.14, readability fixes
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-07 02:57:59 +01:00
Joachim Nilsson
c5a36ff7bd
strlcpy.c: Update to OpenBSD v1.12, readability fixes
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-07 02:57:51 +01:00
Joachim Nilsson
3371e42035
queue.h: Update to OpenBSD v1.43 -- NOTE: Removes CIRCLEQ support!
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-07 02:03:10 +01:00
Joachim Nilsson
4e57a78255
README: Update section on OpenBSD Functions as well
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-06 13:35:35 +01:00
Joachim Nilsson
ce3bd4ec8a
README: Update documentation for pidfile() fn
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-06 13:31:32 +01:00
Joachim Nilsson
805571a7ef
ChangeLog: Fix missing README link
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-05 13:34:41 +01:00
Joachim Nilsson
36435997bf
ChangeLog: Fix Markdown links
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-05 13:33:34 +01:00
Joachim Nilsson
f961889724
Add documentation for new macros and prepare ChangeLog for v1.3.0
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-05 13:27:40 +01:00
Joachim Nilsson
e42aca8856
Makefile: Split install-dev taget into install-dev and install-data
...
This makes it possible to skip installing any unnecessary cruft.
Useful for embedded targets.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-05 13:14:37 +01:00
Joachim Nilsson
16611f3e5f
Add ChangeLog to project and bump version for new release cycle
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-01-05 13:13:26 +01:00
Joachim Nilsson
975df87d6b
Update unit test for pidfile()
...
Add ocular verification step for mtime update when pidfile() is
called more than once.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2015-12-17 00:15:18 +01:00
Joachim Nilsson
148027674a
pidfile: Only update mtime i called multiple times
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2015-12-16 18:40:34 +01:00
Joachim Nilsson
12ed342d55
Bump version for v1.2.0 release
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2015-11-23 00:32:56 +01:00
Joachim Nilsson
23badc990d
lfile: Improve unittest/example with /etc/group + passwd
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2015-10-26 00:50:18 +01:00
Joachim Nilsson
ca53e097c3
lfile: Initialize strtok_r() save pointer
...
Must initialize the save pointer in the parser context, otherwise
strtok_r() will fail on statically built embedded targets.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2015-10-26 00:16:36 +01:00
Joachim Nilsson
a7b5c240c1
Add UNIX lfile_t parser API to lite.h
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2015-10-25 23:25:17 +01:00
Joachim Nilsson
c4eb5cb124
Add simple parser for UNIX configuration files.
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2015-10-25 22:50:10 +01:00
Joachim Nilsson
db08b20f23
Make sure we don't inherit LDFLAGS from environment.
...
To pass custom LDFLAGS to libite, use EXTRA_LDFLAGS.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2015-10-22 18:35:35 +02:00
Joachim Nilsson
8779f54125
Do not allow VERSION to be overloaded by build system.
...
When integrating libite as a component in another piece of software,
that build system may set VERSION as an environment variable. We do
not want that version to be set as the version of libite.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2015-10-03 09:13:37 +02:00
Joachim Nilsson
bd9a618ea3
Bump version for v1.1.1 patch release.
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2015-09-27 00:59:54 +02:00
Joachim Nilsson
3f89fafe24
Fix macro definitions for compat APIs
...
Seems cpp is a bit uptight about spaces.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2015-09-27 00:56:20 +02:00
Joachim Nilsson
ebec48d671
Silence annoying warnings from GNU ar
...
In (very) modern versions of binutils, for instance v2.25.1 shipped in
Ubuntu 15.10, ar complains about the VERY common `crus` argument. This
patch silences this noise:
$ make -j5
ARCHIVE libite.a
ar: `u' modifier ignored since `D' is the default (see `U')
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2015-09-27 00:55:26 +02:00
Joachim Nilsson
4d6c32f81a
Bump version to v1.1.0 and drop default optimization.
...
User of library will likely want to have better control over the default
optimization level. Either way, defaulting to -Os is a lot more "risky"
than, say -O2.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2015-09-16 17:25:43 +02:00
Joachim Nilsson
25c725c240
Bump SONAME to libite.so.2 so for upcoming Finit v2.0
...
We need to lock down the ABI and do a new release on behalf of
Finit. Finit will have support for using an externally built
libite and libuev, so Finit must lock down to a known ABI.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2015-09-16 17:23:49 +02:00
Joachim Nilsson
039a92b292
progress.c: Merge in latest changes from troglobit/toolbox@d845e67
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2015-08-24 23:52:26 +02:00
Joachim Nilsson
5ae5bfb767
Bump version to indicate new feature status, v1.1.0-beta1
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2015-08-23 19:37:08 +02:00