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.
Marko Kreen [Thu, 19 Jan 2012 11:17:51 +0000 (13:17 +0200)]
cfparser: use strtol() in set_int
This allows octal and hex prefixes, also error detection.
Marko Kreen [Thu, 19 Jan 2012 11:16:48 +0000 (13:16 +0200)]
base_win32: dummy chown, getgrnam
Marko Kreen [Thu, 22 Dec 2011 17:31:32 +0000 (19:31 +0200)]
antimake: Remove unused AM_TARGET_RELOC_VARIABLES
Current code relocates all target variables.
Marko Kreen [Thu, 22 Dec 2011 17:29:28 +0000 (19:29 +0200)]
antimake: Don't clean EXTRA targets.
As they are not build, not point cleaning.
Marko Kreen [Tue, 20 Dec 2011 22:01:21 +0000 (00:01 +0200)]
antimake: fix typo in am-check-distfiles
Marko Kreen [Tue, 20 Dec 2011 21:43:49 +0000 (23:43 +0200)]
make dox: drop last-update line
Pointless, as everything will be regenerated on rebuild.
Marko Kreen [Tue, 20 Dec 2011 21:27:08 +0000 (23:27 +0200)]
Update build tests
Marko Kreen [Tue, 20 Dec 2011 21:05:26 +0000 (23:05 +0200)]
test/compile: avoid unused warning
Marko Kreen [Tue, 20 Dec 2011 21:00:59 +0000 (23:00 +0200)]
std-autogen: more random workarounds
Marko Kreen [Tue, 20 Dec 2011 20:58:19 +0000 (22:58 +0200)]
antimake: add SHELL replacement
libtool needs to get right shell, may not work with default one.
Marko Kreen [Tue, 20 Dec 2011 19:36:25 +0000 (21:36 +0200)]
usual.m4: fix bad quoting in --as-needed check
Marko Kreen [Tue, 20 Dec 2011 19:04:23 +0000 (21:04 +0200)]
build: work with older autotools
- AC_PROG_SED|MKDIR_P can be missing
- Avoid nosub_top_builddir being empty
- aclocal wants space after -I
Marko Kreen [Tue, 20 Dec 2011 15:45:24 +0000 (17:45 +0200)]
std-autogen: add comment explaining purpose
Marko Kreen [Tue, 20 Dec 2011 15:43:26 +0000 (17:43 +0200)]
antimake: use version vars recursively
This makes sure we don't pass newer version
test accidentally, without passing older version test.
Marko Kreen [Tue, 20 Dec 2011 15:34:26 +0000 (17:34 +0200)]
std-autogen: add -f to libtoolize
otherwise config.sub can be missing
Marko Kreen [Tue, 20 Dec 2011 14:56:20 +0000 (16:56 +0200)]
antimake: minor fixes
- Move 'ProcessTargets' before 'clean' so ifdefs in latter
can see changes to CLEANFILES.
- Make EMBED_LIBUSUAL support srcdir != builddir
Marko Kreen [Tue, 13 Dec 2011 13:51:12 +0000 (15:51 +0200)]
std-autogen: bring in our own copy of install-sh
older autotools fail to install it into source tree.
Marko Kreen [Tue, 13 Dec 2011 09:27:34 +0000 (11:27 +0200)]
regex: fix off-by-one error in regerror()
Marko Kreen [Mon, 12 Dec 2011 22:39:54 +0000 (00:39 +0200)]
antimake: automatically use WFLAGS
Marko Kreen [Mon, 12 Dec 2011 21:59:00 +0000 (23:59 +0200)]
string: always use own basename+dirname.
Cannot use libc versions as its uncertains whether they modify
input or not. So it's simpler to always use own verisions.
Marko Kreen [Mon, 12 Dec 2011 11:37:29 +0000 (13:37 +0200)]
test_netdb: accept ENOSYS
This allows the test to pass when no-op getaddrinfo is used.
Marko Kreen [Tue, 29 Nov 2011 19:53:30 +0000 (21:53 +0200)]
Tests & demos for antimake
Marko Kreen [Tue, 29 Nov 2011 19:48:17 +0000 (21:48 +0200)]
Update build system to use Antimake
Additional features:
- install headers with filtering, to hide HAVE_* symbols
- libusual.pc for pkg-config
Marko Kreen [Tue, 29 Nov 2011 18:55:49 +0000 (20:55 +0200)]
antimake: New build system.
Emulates Automake syntax on plain GNU Make.
Marko Kreen [Tue, 29 Nov 2011 20:48:19 +0000 (22:48 +0200)]
Stop using AC_USE_SYSTEM_EXTENSIONS
It tries to do too much too early.
Marko Kreen [Tue, 29 Nov 2011 18:42:50 +0000 (20:42 +0200)]
base: make CUSTOM_ALIGN use uintptr_t
For cases where long is shorter than ptr.
Marko Kreen [Thu, 8 Sep 2011 15:32:28 +0000 (17:32 +0200)]
cfparser: cf_set_filename - fix off-by-one error
Final string was terminated in wrong place
Marko Kreen [Wed, 29 Jun 2011 08:00:57 +0000 (01:00 -0700)]
Merge pull request #1 from toofishes/master
A few cleanups and changes when I was trying to build pgbouncer from git
Dan McGee [Tue, 21 Jun 2011 22:26:29 +0000 (17:26 -0500)]
Add a _NORETURN macro
Signed-off-by: Dan McGee <dan@archlinux.org>
Dan McGee [Tue, 21 Jun 2011 22:25:52 +0000 (17:25 -0500)]
Fix autoconf warnings
Usages of AC_LINK_IFELSE, AC_COMPILE_IFELSE, etc. should be using the
AC_LANG_SOURCE() macro around source code fragments. Autoconf 2.66 or so
and up spit warnings if this macro is not used during configure
regeneration.
Signed-off-by: Dan McGee <dan@archlinux.org>
Dan McGee [Tue, 21 Jun 2011 22:25:46 +0000 (17:25 -0500)]
Add missing macro definition
Signed-off-by: Dan McGee <dan@archlinux.org>
Marko Kreen [Thu, 5 May 2011 18:23:02 +0000 (21:23 +0300)]
time: better autodetection on win32
Seems like the posix functions are slowly added to mingw/msvcrt
so we cannot blindly assume with #ifdef WIN32 whats there.
Add proper autodetection for gettimeofday(), localtime_r(), getrusage()
Remove double detection for recvmsg and sendmsg.
Marko Kreen [Thu, 5 May 2011 06:12:01 +0000 (09:12 +0300)]
base_win32: remove duplicate sigval/sigevent declaration
Marko Kreen [Fri, 29 Apr 2011 14:57:42 +0000 (17:57 +0300)]
socket: include <sys/uio.h> to get iovec
Needed on OpenBSD. In addition to readv/writev, the
iovec is used also by sendmsg()/recvmsg().
Reported-by: Pierre-Emmanuel André
Marko Kreen [Fri, 29 Apr 2011 14:56:12 +0000 (17:56 +0300)]
signal: separate sigval from sigevent
On OpenBSD sigval is defined but sigevent is not.
Tie sigval with siginfo's SI_QUEUE.
Reported-by: Pierre-Emmanuel André
Marko Kreen [Fri, 29 Apr 2011 14:52:57 +0000 (17:52 +0300)]
endian: ignore system Xtoh/htoX defines
At least OpenBSD defines only subset of them. As this
may happen on other OS'es too, the best way to avoid
future problems is to ignore system defines completely.
Reported-by: Pierre-Emmanuel André
Marko Kreen [Wed, 20 Apr 2011 17:06:31 +0000 (20:06 +0300)]
find_modules.sh/awk: replace split() with index()+substr()
heirloom/oawk does not support split-by-regex, seems
thats too modern construct (post-1978). Internet says
thats where Solaris is.
Also simplify quoting a little.
Marko Kreen [Wed, 6 Apr 2011 14:27:02 +0000 (17:27 +0300)]
make boot: install additional files needed for ACX_PTHREAD
- move logic out to autogen.sh, more standard
- use libtoolize to fetch config.sub, config.guess, install-sh
- don't use autoreconf, it's broken in some autoconf versions
Dimitri Fontaine [Wed, 6 Apr 2011 13:40:10 +0000 (15:40 +0200)]
make distclean now rips out config.status, too
Marko Kreen [Sun, 27 Mar 2011 20:57:11 +0000 (23:57 +0300)]
netdb: some cleanup
- gaia_thread: simplify the lock loop
- gaia_lookup: pass proper sigval to function
- include <string.h>, for memcpy()
- depend on HAVE_PTHREAD not HAVE_PTHREAD_H - to avoid
messing with non-threaded errno.
Marko Kreen [Fri, 25 Mar 2011 23:09:43 +0000 (01:09 +0200)]
AC_USUAL_GETADDRINFO_A: use LINK instead of COMPILE
Marko Kreen [Fri, 25 Mar 2011 21:17:43 +0000 (23:17 +0200)]
usual.m4: special handling for getaddrinfo_a()
AC_USUAL_GETADDRINFO_A:
- check glibc version
- setup pthreads
Marko Kreen [Fri, 25 Mar 2011 20:36:54 +0000 (22:36 +0200)]
AC_USUAL_LIBEVENT: check also for evdns_base_new
Marko Kreen [Fri, 25 Mar 2011 19:35:19 +0000 (21:35 +0200)]
AC_USUAL_PORT_CHECK: Use AC_USE_SYSTEM_EXTENSIONS
This gets rid of _GNU_SOURCE and __EXTENSIONS__
Unfortunately it does not handle _XPG4_2 and WINVER...
Marko Kreen [Fri, 25 Mar 2011 07:13:56 +0000 (09:13 +0200)]
netdb: non-blocking compat getaddrinfo_a()
Lauch single thread that does lookups. It must not multi-thread
as thread-safety of libc getaddrinfo() is uncertain.
Marko Kreen [Fri, 25 Mar 2011 07:13:35 +0000 (09:13 +0200)]
netdb: require glibc 2.9 for getaddrinfo_a()
Marko Kreen [Wed, 23 Mar 2011 15:35:25 +0000 (17:35 +0200)]
netdb: disable getaddrinfo_a() on older glibc
RHEL/CentOS glibc 2.5 is broken
Debian's glibc 2.3 (etch) and 2.7 (lenny) work
Marko Kreen [Sun, 20 Mar 2011 19:12:54 +0000 (21:12 +0200)]
find_modules: replace $(cmd) with backticks, more portable
Marko Kreen [Fri, 4 Mar 2011 08:19:25 +0000 (10:19 +0200)]
usual.m4: turn on uninitialized variable warnings on clang
You need gcc-3.4 or clang 2.9 with -Wuninitialized-experimental
to get them..
Marko Kreen [Wed, 2 Mar 2011 21:56:18 +0000 (23:56 +0200)]
ctype: expect worst on cross-compile
Marko Kreen [Mon, 28 Feb 2011 20:01:36 +0000 (22:01 +0200)]
fileutil: load_file() fixes
- report actually read bytes. Eg: different on win32
due to dos line endings.
Reported-by: Rich Schaaf
- free buffer on error
Marko Kreen [Mon, 28 Feb 2011 20:01:12 +0000 (22:01 +0200)]
event: fix debug code with new heap api
Marko Kreen [Sun, 27 Feb 2011 18:46:11 +0000 (20:46 +0200)]
cfparser: fix docstring
Marko Kreen [Sun, 27 Feb 2011 18:45:16 +0000 (20:45 +0200)]
regex: replace switch with list
Marko Kreen [Sun, 27 Feb 2011 00:08:11 +0000 (02:08 +0200)]
ctype: new compat module
Make sure <ctype.h> functions accept 'char' values.
On arches where plain 'char' is signed, <ctype.h> functions
need to work on negative values.
Some OSes do it already (Linux), some don't (BSD, Windows).
Marko Kreen [Sat, 26 Feb 2011 23:57:08 +0000 (01:57 +0200)]
heap: internal api cleanup
Marko Kreen [Sat, 26 Feb 2011 23:56:14 +0000 (01:56 +0200)]
getopt: move optreset into function
Marko Kreen [Sat, 26 Feb 2011 23:55:45 +0000 (01:55 +0200)]
lookup3: tests for big-endian
Marko Kreen [Sat, 26 Feb 2011 11:13:26 +0000 (13:13 +0200)]
gitignore: gcov files
Marko Kreen [Sat, 26 Feb 2011 11:13:08 +0000 (13:13 +0200)]
signal: compat sigevent struct
Marko Kreen [Sat, 26 Feb 2011 11:08:41 +0000 (13:08 +0200)]
safeio: needs time.h