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
Marko Kreen [Sat, 26 Feb 2011 11:08:18 +0000 (13:08 +0200)]
event: use simpler sa_handler prototype
Marko Kreen [Sat, 26 Feb 2011 11:06:22 +0000 (13:06 +0200)]
Use FLEX_ARRAY instead of []
Marko Kreen [Sat, 26 Feb 2011 11:03:22 +0000 (13:03 +0200)]
socket: avoid bsd typedefs, instead define
Marko Kreen [Thu, 24 Feb 2011 20:45:12 +0000 (22:45 +0200)]
regex: minor space saving
Marko Kreen [Thu, 24 Feb 2011 20:24:56 +0000 (22:24 +0200)]
socket_win32: add int <> SOCKET casting macros
they can be made do something smart if needed
Marko Kreen [Thu, 24 Feb 2011 20:14:47 +0000 (22:14 +0200)]
aatree: fix test
Marko Kreen [Thu, 24 Feb 2011 11:36:39 +0000 (13:36 +0200)]
getopt: new compat module
implementation from OpenBSD
Marko Kreen [Thu, 24 Feb 2011 11:36:24 +0000 (13:36 +0200)]
err: add _PRINTF tags
Marko Kreen [Tue, 22 Feb 2011 19:06:46 +0000 (21:06 +0200)]
pgutil: avoid gperf use of long
Marko Kreen [Tue, 22 Feb 2011 19:06:07 +0000 (21:06 +0200)]
regex: allow undefined isblank
Marko Kreen [Tue, 22 Feb 2011 19:05:30 +0000 (21:05 +0200)]
aatree: use uintptr_t instead of long for data
Marko Kreen [Tue, 15 Feb 2011 07:25:17 +0000 (09:25 +0200)]
test_time: allow exact usleep
Marko Kreen [Tue, 15 Feb 2011 06:57:20 +0000 (08:57 +0200)]
win32: WINVER is more proper thing to set than _WIN32_WINNT
Marko Kreen [Tue, 15 Feb 2011 06:56:49 +0000 (08:56 +0200)]
list,statlist: reverse list walking
Marko Kreen [Tue, 15 Feb 2011 06:53:45 +0000 (08:53 +0200)]
find_module: use awk for processing, seems more portable than sed
Marko Kreen [Tue, 15 Feb 2011 06:52:24 +0000 (08:52 +0200)]
test_fileutil: use wb to write file
Marko Kreen [Tue, 15 Feb 2011 06:52:04 +0000 (08:52 +0200)]
test: missing LDFLAGS from link
Marko Kreen [Tue, 15 Feb 2011 06:51:39 +0000 (08:51 +0200)]
socket: inet_pton() and inet_ntop() from openbsd
Marko Kreen [Tue, 15 Feb 2011 06:49:06 +0000 (08:49 +0200)]
build: allow several .c files per module
Marko Kreen [Tue, 1 Feb 2011 12:37:12 +0000 (14:37 +0200)]
test: fileutil, time, crc32 and lookup3 tests
Marko Kreen [Tue, 1 Feb 2011 12:36:34 +0000 (14:36 +0200)]
test_string: parse_word_list() tests
Marko Kreen [Tue, 1 Feb 2011 12:35:59 +0000 (14:35 +0200)]
test_netdb: add socket.h include
Marko Kreen [Tue, 1 Feb 2011 12:35:35 +0000 (14:35 +0200)]
test_mdict: test overwrite and delete
Marko Kreen [Tue, 1 Feb 2011 12:35:01 +0000 (14:35 +0200)]
makefile/sparse: add -Wno-transparent-union
Marko Kreen [Tue, 1 Feb 2011 12:34:29 +0000 (14:34 +0200)]
string: allow empty strings in parse_word_list()
Marko Kreen [Tue, 1 Feb 2011 12:33:23 +0000 (14:33 +0200)]
mdict: fix free on overwrite, add mdict_del()
Marko Kreen [Tue, 1 Feb 2011 12:32:47 +0000 (14:32 +0200)]
fileutil: better error handling for foreach_line()
Marko Kreen [Tue, 1 Feb 2011 12:31:43 +0000 (14:31 +0200)]
test: decrease loop count in aatree/cbtree tests
this should decrease regtest run time
Marko Kreen [Mon, 31 Jan 2011 17:16:06 +0000 (19:16 +0200)]
pgutil: include keywords in kwlookup.g
autogen does not work, because they keywords can be
removed from postgres, but we dont want to remove them
from here.
Currently list is union of 8.3 .. 9.1 keywords.
Marko Kreen [Mon, 31 Jan 2011 17:14:52 +0000 (19:14 +0200)]
endian: expand encdec functions to make them more dox-friendly
Marko Kreen [Mon, 31 Jan 2011 09:53:09 +0000 (11:53 +0200)]
test: shlist tests
Marko Kreen [Mon, 31 Jan 2011 09:51:19 +0000 (11:51 +0200)]
test: strlist tests
Marko Kreen [Mon, 31 Jan 2011 09:50:17 +0000 (11:50 +0200)]
shlist: couple new functions
Marko Kreen [Mon, 31 Jan 2011 09:49:52 +0000 (11:49 +0200)]
shlist: fix shlist_prepend
Marko Kreen [Mon, 31 Jan 2011 09:48:33 +0000 (11:48 +0200)]
cxalloc: fix cx_strdup
Marko Kreen [Fri, 28 Jan 2011 22:02:05 +0000 (00:02 +0200)]
test: mdict tests
Marko Kreen [Fri, 28 Jan 2011 22:00:04 +0000 (00:00 +0200)]
mdict: fix urldecode memleak
Marko Kreen [Thu, 27 Jan 2011 11:20:22 +0000 (13:20 +0200)]
test_endian: fix signedness warning
Marko Kreen [Thu, 27 Jan 2011 11:03:18 +0000 (13:03 +0200)]
test/: hashtab tests
Marko Kreen [Thu, 27 Jan 2011 11:02:02 +0000 (13:02 +0200)]
test_utf8: add more tests
Marko Kreen [Thu, 27 Jan 2011 11:01:21 +0000 (13:01 +0200)]
utf8: make incoming char values unsigned
Marko Kreen [Thu, 27 Jan 2011 11:00:03 +0000 (13:00 +0200)]
hashtab: fix thinko in hashtab_delete()
Marko Kreen [Wed, 26 Jan 2011 12:54:32 +0000 (14:54 +0200)]
logging: LG_STATS loglevel for liveness messages
Marko Kreen [Wed, 26 Jan 2011 12:51:12 +0000 (14:51 +0200)]
test: <endian.h> tests
Marko Kreen [Wed, 26 Jan 2011 12:34:26 +0000 (14:34 +0200)]
Merge branch 'master' of git://github.com/markokr/libusual
Marko Kreen [Wed, 26 Jan 2011 12:31:47 +0000 (14:31 +0200)]
endian: autoconf detection for enc/dec functions
Marko Kreen [Wed, 26 Jan 2011 12:04:29 +0000 (14:04 +0200)]
cfparser: new section callback
Marko Kreen [Wed, 26 Jan 2011 12:04:16 +0000 (14:04 +0200)]
statlist: statlist_last()
Marko Kreen [Wed, 26 Jan 2011 11:09:07 +0000 (13:09 +0200)]
usual.m4: -Wextra check uses wrong variable
Marko Kreen [Wed, 26 Jan 2011 11:08:46 +0000 (13:08 +0200)]
hashtab: cx conversion missed memset
Marko Kreen [Wed, 26 Jan 2011 11:08:03 +0000 (13:08 +0200)]
slab: cx conversion missed memset
Marko Kreen [Fri, 21 Jan 2011 11:33:05 +0000 (13:33 +0200)]
socket: poll compat fix
Marko Kreen [Wed, 8 Dec 2010 15:26:31 +0000 (17:26 +0200)]
gitignore more
Marko Kreen [Fri, 3 Dec 2010 12:21:23 +0000 (14:21 +0200)]
gitignore file
Marko Kreen [Tue, 30 Nov 2010 12:55:17 +0000 (14:55 +0200)]
cfparser: silently ignore CF_NO_RELOAD or CF_READONLY updates.
Marko Kreen [Tue, 30 Nov 2010 09:54:13 +0000 (11:54 +0200)]
cfparser: clarify bit-checks
Marko Kreen [Mon, 29 Nov 2010 16:23:35 +0000 (18:23 +0200)]
event: signal_del/evtimer_del compat
Marko Kreen [Mon, 29 Nov 2010 11:42:27 +0000 (13:42 +0200)]
event: get_version and get_method functions
Marko Kreen [Mon, 29 Nov 2010 11:41:43 +0000 (13:41 +0200)]
daemon: empty logfile means same as NULL
Marko Kreen [Mon, 29 Nov 2010 11:41:08 +0000 (13:41 +0200)]
m4/usual.m4: AC_USUAL_LIBEVENT_OPT macro, for optional libevent
Marko Kreen [Wed, 24 Nov 2010 07:38:34 +0000 (09:38 +0200)]
win32 compat update
Marko Kreen [Wed, 24 Nov 2010 07:37:36 +0000 (09:37 +0200)]
attregex: lost interpretation.dat, compile regex locally
Marko Kreen [Tue, 23 Nov 2010 13:28:42 +0000 (15:28 +0200)]
Coupld portability fixes
Marko Kreen [Sat, 20 Nov 2010 11:38:39 +0000 (13:38 +0200)]
Fix couple bugs in regtests, makefile cleanup
Now the makefile does not depend on top-level makefile,
regtest is built as ordinary executable.
Marko Kreen [Mon, 22 Nov 2010 22:34:19 +0000 (00:34 +0200)]
netdb: compat getaddrinfo_a fixes
Marko Kreen [Mon, 22 Nov 2010 22:33:00 +0000 (00:33 +0200)]
heap: heap size and obj-by-index helpers
Marko Kreen [Thu, 18 Nov 2010 14:10:36 +0000 (16:10 +0200)]
cfparser: API reorg, regtests
Support both dynamic sections and dynamic keys.
Cleanup of both internal and external APIs.
Marko Kreen [Thu, 4 Nov 2010 12:17:28 +0000 (14:17 +0200)]
doc: mention netdb and heap
Marko Kreen [Wed, 17 Nov 2010 12:00:01 +0000 (14:00 +0200)]
logging: restore syslog and syslog_facility params
Marko Kreen [Wed, 10 Nov 2010 15:44:41 +0000 (17:44 +0200)]
cfparser: filename params, with tilde expansion
Patch by Asko Tiidumaa, applied with minor modifications.