Marko Kreen [Tue, 2 Apr 2013 20:04:55 +0000 (23:04 +0300)]
cfparser: require that first section must be present
otherwise, when run on empty file, the main section defaults
are not filled in and program may crash.
Marko Kreen [Tue, 2 Apr 2013 20:01:09 +0000 (23:01 +0300)]
socket: getpeercreds() - getpeereid() + pid
Most OSes have also way to get pid of unix socket peer.
Provide generic API for fetching it.
Make compat getpeereid() wrap it, so all compat goo
is in one place.
Marko Kreen [Tue, 2 Apr 2013 19:19:50 +0000 (22:19 +0300)]
antimake: follow symlinks when searching extensions
Marko Kreen [Sun, 6 Jan 2013 20:06:00 +0000 (22:06 +0200)]
m4/usual: fix ctype removal
Marko Kreen [Sun, 6 Jan 2013 20:03:12 +0000 (22:03 +0200)]
amext-msvc: random cleanups
Marko Kreen [Sun, 6 Jan 2013 20:02:24 +0000 (22:02 +0200)]
antimake: safer test result print
Marko Kreen [Sun, 6 Jan 2013 19:21:15 +0000 (21:21 +0200)]
antimake: keep per-object mkdir always quiet
Marko Kreen [Sun, 6 Jan 2013 19:20:09 +0000 (21:20 +0200)]
base_win32: missing win32 includes
Marko Kreen [Sun, 6 Jan 2013 11:58:47 +0000 (13:58 +0200)]
msvc cleanup
Marko Kreen [Sun, 6 Jan 2013 11:58:32 +0000 (13:58 +0200)]
antimake: use printf instead of echo
Marko Kreen [Sun, 6 Jan 2013 11:57:24 +0000 (13:57 +0200)]
antimake: dont use readpath when loading extensions
Seems it's not reliable.
Marko Kreen [Sun, 6 Jan 2013 10:52:30 +0000 (12:52 +0200)]
msvc fixes
Marko Kreen [Sun, 6 Jan 2013 10:52:10 +0000 (12:52 +0200)]
antimake: mkdir is not needed in ar_lib
Marko Kreen [Sun, 6 Jan 2013 11:53:44 +0000 (13:53 +0200)]
ctype: always activate macros
autoconf check is pointless, because compiler
can still complain about wrong usage.
So activate wrappers always, also remove arg,
so they are also used where function pointers are needed.
Marko Kreen [Sun, 6 Jan 2013 10:49:17 +0000 (12:49 +0200)]
amext-msvc: cleaups, safer mkdir
Marko Kreen [Sun, 6 Jan 2013 10:48:38 +0000 (12:48 +0200)]
wchar: compat mbsnrtowcs(), tests
Marko Kreen [Sat, 5 Jan 2013 23:09:06 +0000 (01:09 +0200)]
test: clean fmod_test
Marko Kreen [Sat, 5 Jan 2013 23:04:25 +0000 (01:04 +0200)]
test/Makefile: cleanup
* regtest_compat is now EXTRA target
* regtest_system is built against libusual.a
Marko Kreen [Sat, 5 Jan 2013 23:03:16 +0000 (01:03 +0200)]
antimake: make sure DEPENDENCIES and nodist_SOURCES exist before build starts.
Old way tied them to final link, which is too late.
Marko Kreen [Sat, 5 Jan 2013 22:33:08 +0000 (00:33 +0200)]
antimake: clean also EXTRA targets
Marko Kreen [Sat, 5 Jan 2013 22:29:29 +0000 (00:29 +0200)]
antimake: call hooks also for EXTRA targets
Marko Kreen [Sat, 5 Jan 2013 22:06:04 +0000 (00:06 +0200)]
antimake: don't clean LDADD/LIBADD files
Marko Kreen [Sat, 5 Jan 2013 19:04:11 +0000 (21:04 +0200)]
MSVC support
* Antimake extension 'msvc'
* Hardcoded config <usual/config.msvc.h>
* More guarded headers
Usage:
1. Install coreutils and make from gnuwin32
2. Make sure VC env variables are loaded (PATH)
3. Copy build_msvc.mk to build.mk
It would be nice to make it work with MSYS/MINGW32 + VC,
but their filename mangling makes it messy.
Marko Kreen [Sat, 5 Jan 2013 21:50:40 +0000 (23:50 +0200)]
ctype: provide isblank() if missing
Marko Kreen [Sat, 5 Jan 2013 21:40:22 +0000 (23:40 +0200)]
base_win32: type specifiers from inttypes.h
Marko Kreen [Sat, 5 Jan 2013 21:24:36 +0000 (23:24 +0200)]
tests: remove headers already included by base.h
Marko Kreen [Sat, 5 Jan 2013 16:51:51 +0000 (18:51 +0200)]
antimake: support LIBDIR
Now different extension can be used for static libraries.
Marko Kreen [Sat, 5 Jan 2013 18:45:30 +0000 (20:45 +0200)]
Drop Setup.mk
There are better ways to use libusual now.
Marko Kreen [Sat, 5 Jan 2013 18:40:51 +0000 (20:40 +0200)]
Sync test output with current 'make install'
Marko Kreen [Sat, 5 Jan 2013 18:28:35 +0000 (20:28 +0200)]
make install: handle subdirs properly
Marko Kreen [Sat, 5 Jan 2013 18:20:05 +0000 (20:20 +0200)]
antimake temos: sync with crc module move
Marko Kreen [Sat, 5 Jan 2013 16:00:59 +0000 (18:00 +0200)]
antimake: make OBJEXT include '.'
Now the usage is same as EXEEXT.
Marko Kreen [Sat, 5 Jan 2013 15:56:22 +0000 (17:56 +0200)]
antimake: convert mkdir and printf to functions.
Then it's possible to examine and change arguments.
Marko Kreen [Thu, 14 Jun 2012 06:16:36 +0000 (09:16 +0300)]
Avoid libtool, build simple static library
Marko Kreen [Wed, 13 Jun 2012 22:36:33 +0000 (01:36 +0300)]
cfparser,cxalloc: avoid use of struct field specifiers.
Seems msvc does not support them..
Marko Kreen [Wed, 13 Jun 2012 22:33:43 +0000 (01:33 +0300)]
logging: Use __VA_ARGS__ for vararg macros
It's more portable (msvc), seems the (args... + ## args) style
is GNU extension.
Marko Kreen [Sat, 16 Jun 2012 12:27:30 +0000 (15:27 +0300)]
antimake: show mkdir commands if in verbose mode
Marko Kreen [Sat, 16 Jun 2012 12:26:44 +0000 (15:26 +0300)]
antimake: use JoinPath when calculating feat file name
Marko Kreen [Fri, 4 Jan 2013 23:05:48 +0000 (01:05 +0200)]
wchar: allow missing mbsnrtowcs()
Marko Kreen [Fri, 4 Jan 2013 22:53:20 +0000 (00:53 +0200)]
pthread: missing HAVE_PTHREAD_H check
Marko Kreen [Fri, 4 Jan 2013 21:19:34 +0000 (23:19 +0200)]
Remove remaining C++ comments from source tree.
I like to use them for debugging, to show that this
comment is temporary, but that also means they
should not stay around.
Marko Kreen [Fri, 4 Jan 2013 07:51:05 +0000 (09:51 +0200)]
find_modules: test with various awks
Marko Kreen [Fri, 4 Jan 2013 07:50:21 +0000 (09:50 +0200)]
find_modules: older awks might not have 'in'
Marko Kreen [Wed, 13 Jun 2012 22:29:54 +0000 (01:29 +0300)]
dlfcn: new module for dlopen compat functions
Marko Kreen [Wed, 13 Jun 2012 22:21:22 +0000 (01:21 +0300)]
cf_set_time_usec: Use explicit cast for float->int conversion
Marko Kreen [Wed, 13 Jun 2012 22:17:43 +0000 (01:17 +0300)]
test/compile: fix daemonize() argument type
Marko Kreen [Thu, 3 Jan 2013 22:34:12 +0000 (14:34 -0800)]
Merge pull request #4 from fdr/c89-comments
Use C89 compatible comments
Marko Kreen [Sat, 29 Dec 2012 17:21:13 +0000 (19:21 +0200)]
usual/fnmatch: fnmatch compat
Marko Kreen [Mon, 31 Dec 2012 12:18:49 +0000 (14:18 +0200)]
usual/wchar: wide-char utilities.
Marko Kreen [Sat, 29 Dec 2012 16:37:52 +0000 (18:37 +0200)]
usual/hashing/siphash: SipHash-2-4
New secure hash.
Marko Kreen [Sat, 22 Dec 2012 22:47:44 +0000 (00:47 +0200)]
Move simple hashes under separate subdirectory.
There may be more of them.
Marko Kreen [Sun, 23 Dec 2012 10:05:34 +0000 (12:05 +0200)]
find_module: avoid big regex
Marko Kreen [Mon, 29 Oct 2012 17:14:40 +0000 (19:14 +0200)]
crypto: Add Keccak (SHA3) algorithm
It is based on Keccak reference implementation, but cleaned
up for SHA3-only usage.
Marko Kreen [Mon, 29 Oct 2012 16:13:46 +0000 (18:13 +0200)]
crypto: SHA2 digests
Separate module for both SHA-256 and SHA-512.
Marko Kreen [Mon, 29 Oct 2012 06:33:35 +0000 (08:33 +0200)]
crypto/digest: common framework for digests
The digests will be easier to use (and test) if they share
common wrapper API.
Marko Kreen [Sun, 28 Oct 2012 21:48:18 +0000 (23:48 +0200)]
crypto: reorder arguments in _final()
The old one was final(dst, ctx) which is some sort of historical
accident. Lets get rid of it. Then all operations on hash context
take context as first argument.
Marko Kreen [Sun, 28 Oct 2012 21:04:35 +0000 (23:04 +0200)]
Move crypto files
There will be more, so give them subdirectory.
Marko Kreen [Sun, 28 Oct 2012 21:30:01 +0000 (23:30 +0200)]
find_modules: work with subdirs
Marko Kreen [Tue, 30 Oct 2012 20:48:17 +0000 (22:48 +0200)]
makefile: asm and size tagets
Marko Kreen [Tue, 30 Oct 2012 20:47:55 +0000 (22:47 +0200)]
test_regex: skip test that glibc fails
Marko Kreen [Tue, 30 Oct 2012 20:13:33 +0000 (22:13 +0200)]
test_endian: fix uint64 check
Marko Kreen [Thu, 1 Nov 2012 16:34:33 +0000 (18:34 +0200)]
No need to keep CXX around.
Marko Kreen [Wed, 28 Nov 2012 13:00:19 +0000 (15:00 +0200)]
antimake: fix final target name calculation
Marko Kreen [Thu, 1 Nov 2012 16:33:20 +0000 (18:33 +0200)]
Another fix for dep flags.
Just test the exact flags that antimake will use.
For unknown reasons, autoconf corrupts $@ so it's
hard to pass the flags down. Currently just keep
them in sync with antimake.
Marko Kreen [Sun, 28 Oct 2012 21:30:32 +0000 (23:30 +0200)]
Fix test makefile for extensions
Marko Kreen [Sun, 28 Oct 2012 21:41:01 +0000 (23:41 +0200)]
usual.m4: unbreak compiler dependency generation check
Marko Kreen [Wed, 18 Jul 2012 18:06:01 +0000 (21:06 +0300)]
cfparser: CF_UINT
Support 'unsigned int' variables.
Marko Kreen [Sun, 8 Jul 2012 09:44:36 +0000 (12:44 +0300)]
antimake: JoinPath: Handle '..' under root directory
Marko Kreen [Sat, 7 Jul 2012 16:54:01 +0000 (19:54 +0300)]
antimake: Fix DoEmbed to use two target lists properly
The EXTRA list was added wrongly and with extra ','
which hided the problem.
Marko Kreen [Sat, 7 Jul 2012 16:35:09 +0000 (19:35 +0300)]
antimake: use show-config instead manual grep in test
Marko Kreen [Sat, 7 Jul 2012 15:19:49 +0000 (18:19 +0300)]
antimake: Convert JoinPath back to plain string based processing
The hack with $(abspath) + $(relpath) is too fragile as local
filesystem issues can confuse it.
New implementation also tries to work with ./, ../ properly.
Reported-By: Marcus Engene
Marko Kreen [Sat, 7 Jul 2012 15:19:30 +0000 (18:19 +0300)]
mbuf: mbuf_consumed() function
Marko Kreen [Tue, 5 Jun 2012 14:27:41 +0000 (17:27 +0300)]
antimake: postpone varoverride in BigTargetBuild
If variables are overrided immediately, they don't
see changes made inside BigTargetBuild.
Marko Kreen [Tue, 5 Jun 2012 13:40:03 +0000 (16:40 +0300)]
antimake: improvements from dev repo
- aclocaldir
- More tracing macros
- Rework O= support to use make functions instead shell
- Add hooks concept
- Add externally loadable features concept
- Move libusual hacks from antimake.mk to amext-libusual.mk
- amext-modes.mk: add more ways to compile one target
To load 'libusual' or 'modes' extension, add AM-FEATURES to makefile:
AM_FEATURES = libusual modes
Marko Kreen [Tue, 5 Jun 2012 11:42:56 +0000 (14:42 +0300)]
Check for glibtoolize, allow overrides from env
Marko Kreen [Tue, 5 Jun 2012 11:38:13 +0000 (14:38 +0300)]
cfparser: CF_TIME - use strtod() instead atof()
It will give better error handling.
Marko Kreen [Tue, 5 Jun 2012 11:37:48 +0000 (14:37 +0300)]
test_fileutil: fix signedness warnings
Marko Kreen [Tue, 5 Jun 2012 10:46:59 +0000 (13:46 +0300)]
test_regex.c: fix invalid memset
Daniel Farina [Sat, 19 May 2012 16:54:35 +0000 (12:54 -0400)]
Use C89 compatible comments
These will cause clang -std=c89 to fail on recent versions of the
Macintosh, and fit the style of the rest of the code better anyway.
As to why these assets are commented out is not well explained, given
that as an Assert statement one would naively assume they have no
affect on production-built code.
Signed-off-by: Daniel Farina <drfarina@acm.org>
Marko Kreen [Thu, 10 May 2012 20:57:36 +0000 (23:57 +0300)]
hmac: style cleanups, wire up docs
Marko Kreen [Wed, 18 Apr 2012 12:29:32 +0000 (15:29 +0300)]
socket_ntop.c: avoid 'uninitialized' warning on older compilers
Marko Kreen [Thu, 10 May 2012 20:10:55 +0000 (13:10 -0700)]
Merge pull request #2 from fdr/hmac
Hmac-SHA1 module from Dan Farina
Dan Farina [Thu, 10 May 2012 09:42:27 +0000 (02:42 -0700)]
Whitespace and typos
Signed-off-by: Dan Farina <drfarina@acm.org>
Dan Farina [Thu, 10 May 2012 09:42:11 +0000 (02:42 -0700)]
Add HMAC-SHA1
Signed-off-by: Dan Farina <drfarina@acm.org>
Marko Kreen [Thu, 5 Apr 2012 14:01:27 +0000 (17:01 +0300)]
base: static_assert(expr, msg)
Provide static_assert() macro. On newer compilers
it tries to use built-in implementation, on older
ones compat one.
The detection does not need to be too strict as there
is always fallback implementation available.
Include <assert.h>, as that is where C1x will provide it.
Marko Kreen [Thu, 5 Apr 2012 13:45:22 +0000 (16:45 +0300)]
base: compiler detection for internal usage
Marko Kreen [Thu, 5 Apr 2012 13:35:46 +0000 (16:35 +0300)]
base: CONCAT macros for token merge
Marko Kreen [Thu, 5 Apr 2012 13:26:05 +0000 (16:26 +0300)]
safeio: ignore EINTR on close()
Seems the retry is dangerous at least on Linux, BSDs and Solaris.
This should be enough to prove it's not good idea.
Marko Kreen [Thu, 5 Apr 2012 13:21:39 +0000 (16:21 +0300)]
find_module: ignore 'config' module
This avoids including it in source tarball.
Marko Kreen [Fri, 16 Mar 2012 21:28:59 +0000 (23:28 +0200)]
std-autogen: avoid linking, instead copy autoconf files
This enables building source tarballs with build systems
that do not flatten the symlinks on tarball build,
eg: python distutils.
Marko Kreen [Wed, 14 Mar 2012 10:37:13 +0000 (12:37 +0200)]
antimake: add 2 missing values for relocation
EXTRA_tgt_SOURCES & tgt_DEPENDENCIES were missing.
Marko Kreen [Tue, 6 Mar 2012 21:03:42 +0000 (23:03 +0200)]
antimake: relocate EXTRA targets last
Doing them before real ones makes them invisible later.
Marko Kreen [Sun, 4 Mar 2012 12:34:22 +0000 (14:34 +0200)]
antimake: refresh demos
Marko Kreen [Sun, 4 Mar 2012 09:07:14 +0000 (11:07 +0200)]
antimake: stop converting filenames in flag variables
The variables tgt_LDFLAGS / tgt_CPPFLAGS / tgt_CFLAGS
may contain complex flags, where some words
look like filenames. Convering those breaks build.
Keep converting only variables that definitely contain
filenames: _SOURCES / _LIBADD / _LDADD.
Marko Kreen [Sun, 4 Mar 2012 09:02:54 +0000 (11:02 +0200)]
antimake: make JoinPath to always output clean names
When /./ or ../ are left in path name, the dependencies
will be wrong.
As it's too hard to do the join with plain string operations,
use $(abspath) and then convert path back to relative.
Marko Kreen [Sun, 4 Mar 2012 08:11:52 +0000 (10:11 +0200)]
signal: Use sigqueue() to detect sival existence
SI_QUEUE is not enough on HPUX. Hopefully
this works better.
Marko Kreen [Sun, 26 Feb 2012 12:46:57 +0000 (14:46 +0200)]
attregex: import testregex.c v2010-06-10
Marko Kreen [Sun, 26 Feb 2012 12:43:41 +0000 (14:43 +0200)]
uregex: allow \-escape before any non-letter
Escape strictness makes hard to safely escape untrusted
strings - by putting '\' before any non-letter.
This applies only to extended regex syntax. No such
clear rule for basic regexes.
Marko Kreen [Thu, 19 Jan 2012 11:49:02 +0000 (13:49 +0200)]
cfparser: better error handling for set_int
Marko Kreen [Thu, 19 Jan 2012 11:18:32 +0000 (13:18 +0200)]
usual.m4: drop -Wuninitialized-experimental
Does not work and throws flags warnings on newer clang.