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.
Marko Kreen [Thu, 4 Nov 2010 12:04:07 +0000 (14:04 +0200)]
heap: fix few conversion bugs
Marko Kreen [Wed, 3 Nov 2010 15:48:26 +0000 (17:48 +0200)]
pgsocket: handle connection lifetime
Marko Kreen [Tue, 12 Oct 2010 11:02:46 +0000 (14:02 +0300)]
logging: fix die(), again
Marko Kreen [Tue, 12 Oct 2010 10:50:15 +0000 (13:50 +0300)]
netdb: compat getaddrinfo_a()
Marko Kreen [Tue, 12 Oct 2010 10:48:53 +0000 (13:48 +0300)]
bits: wrong header ifdef
Marko Kreen [Tue, 12 Oct 2010 10:47:55 +0000 (13:47 +0300)]
heap: convert inline implemenatation to regular one
the minor performance advantages are not worth
more complex use.
Marko Kreen [Sat, 9 Oct 2010 12:03:44 +0000 (15:03 +0300)]
test/: base tests, test both compat and system code
Marko Kreen [Sat, 9 Oct 2010 12:02:53 +0000 (15:02 +0300)]
base: alignof()
Marko Kreen [Sat, 9 Oct 2010 07:14:43 +0000 (10:14 +0300)]
Give parent project list of files to include in distro
Marko Kreen [Thu, 30 Sep 2010 05:04:36 +0000 (22:04 -0700)]
time: make sure USEC is same type as usec_t
Marko Kreen [Tue, 28 Sep 2010 19:07:21 +0000 (12:07 -0700)]
makefile: Show CC flags at the start of compilation
Marko Kreen [Tue, 28 Sep 2010 19:07:02 +0000 (12:07 -0700)]
Allow override of system regex
Marko Kreen [Tue, 28 Sep 2010 18:50:43 +0000 (11:50 -0700)]
bits: add ffs compat, minor test fixes
Marko Kreen [Sun, 26 Sep 2010 04:04:46 +0000 (21:04 -0700)]
test: fix few compat problems
- include <usual/base.h> before system includes
- don't force poll() test, it can conflict with system includes
Marko Kreen [Sun, 26 Sep 2010 04:03:47 +0000 (21:03 -0700)]
base: malloc.h is needed only on darwin
Marko Kreen [Sun, 26 Sep 2010 04:02:56 +0000 (21:02 -0700)]
base: define few magic names to make Solaris work
Marko Kreen [Sun, 26 Sep 2010 04:01:53 +0000 (21:01 -0700)]
configure: add few common libraries to build.
Does not matter for libusual.a but for test executables.
Marko Kreen [Sat, 25 Sep 2010 12:17:18 +0000 (05:17 -0700)]
Don't use -Wextra on older gcc.
Check for -Wno-missing-field-initializers,
gcc without it would be too noisy.
Marko Kreen [Sun, 26 Sep 2010 03:57:05 +0000 (20:57 -0700)]
bits: make fallback fls work for negative values
Marko Kreen [Tue, 21 Sep 2010 04:24:38 +0000 (21:24 -0700)]
bits: move bit-arithmetics to separate file
Marko Kreen [Tue, 21 Sep 2010 03:53:49 +0000 (20:53 -0700)]
Some more doc work
Marko Kreen [Wed, 15 Sep 2010 13:11:52 +0000 (16:11 +0300)]
string: memrchr() definition was lost
Marko Kreen [Wed, 15 Sep 2010 12:15:32 +0000 (15:15 +0300)]
attregex: make it build
Marko Kreen [Wed, 15 Sep 2010 12:04:31 +0000 (15:04 +0300)]
attregex: import AT&T Research regex regression tests
Make sure <usual/regex.[ch]> stays POSIX-compliant.
Homepage: http://www2.research.att.com/~gsf/testregex/
Version: 2009-11-11
Authors: Doug McIlroy & Glenn Fowler
Marko Kreen [Wed, 15 Sep 2010 11:45:13 +0000 (14:45 +0300)]
regex: remove non-standard error codes.
REG_EEND and REG_ESIZE are not in POSIX, and are unused
by this implementation.
ECOLLATE is also unused, but it's standard so keep it.
Marko Kreen [Tue, 14 Sep 2010 21:05:21 +0000 (00:05 +0300)]
test make improvements
Marko Kreen [Wed, 13 Jan 2010 07:32:09 +0000 (09:32 +0200)]
Doxygen-based API docs
Marko Kreen [Sun, 12 Sep 2010 21:11:10 +0000 (00:11 +0300)]
logging: fix die() arg passing
Marko Kreen [Mon, 9 Aug 2010 22:27:01 +0000 (01:27 +0300)]
dict: small dict type, mainly for urlencode/decode
Marko Kreen [Fri, 23 Jul 2010 10:06:24 +0000 (13:06 +0300)]
cxalloc: customizable allocator framework
There is a need to sometimes have different allocation policy
to some generic data structure than usual.
Instead of having each of them having allocator abstraction
on their own and both simple and customisable API, lets
have simple generic allocation API.
Initialized will take another CxMem *cx argument, and when
no customization is needed, put USUAL_ALLOC there.
Marko Kreen [Fri, 23 Jul 2010 10:05:27 +0000 (13:05 +0300)]
event: remove usage of zmalloc
Marko Kreen [Sat, 11 Sep 2010 07:44:15 +0000 (10:44 +0300)]
aatree: make NIL node const.
It really should not be modified.
Marko Kreen [Sat, 11 Sep 2010 07:43:26 +0000 (10:43 +0300)]
string: undef basename, dirname before defining
Helps with testing, otherwise OS defs conflict with ours.
Marko Kreen [Fri, 10 Sep 2010 10:26:22 +0000 (13:26 +0300)]
Draft tgz generation
Marko Kreen [Wed, 8 Sep 2010 17:08:29 +0000 (20:08 +0300)]
pgutil: trim the kwlookup code
No reason to care about unreserved keywords or their exact types.
Only keep the pg_is_reserved_word().
Marko Kreen [Mon, 6 Sep 2010 05:25:43 +0000 (08:25 +0300)]
pgutil: cleaner gperf code
- stop inlining
- remove '#line' directives
Marko Kreen [Mon, 6 Sep 2010 05:20:42 +0000 (08:20 +0300)]
socket: WSAIoctl was called with wrong params
Marko Kreen [Mon, 6 Sep 2010 05:19:57 +0000 (08:19 +0300)]
base: don't define posix_memalign, if it cannot be emulated
Marko Kreen [Mon, 6 Sep 2010 05:19:14 +0000 (08:19 +0300)]
regex: win32 can have STRICT defined
Marko Kreen [Mon, 6 Sep 2010 05:17:29 +0000 (08:17 +0300)]
time: win32 can have usleep
Marko Kreen [Fri, 3 Sep 2010 14:05:49 +0000 (17:05 +0300)]
pgsocket: log db errors
also downgrade query logging to noise
Marko Kreen [Fri, 3 Sep 2010 14:04:49 +0000 (17:04 +0300)]
logging: tab-indent multi-line error messages
Marko Kreen [Fri, 3 Sep 2010 14:04:18 +0000 (17:04 +0300)]
event: fix wrong error code
Marko Kreen [Fri, 3 Sep 2010 11:07:38 +0000 (14:07 +0300)]
test: draft test module for regex
Marko Kreen [Fri, 3 Sep 2010 10:04:06 +0000 (13:04 +0300)]
pgutil: include gperf generated code in git.
It depends on 8.4+, so users with 8.3 cannot generate it by themselves.
Marko Kreen [Thu, 2 Sep 2010 11:34:53 +0000 (14:34 +0300)]
pgutil: add few missing features to pg_parse_array()
- ignore whitespace around values
- support NULL
- rename to pg_parse_array
- skip dimension definitions
- add regtests
Marko Kreen [Thu, 2 Sep 2010 11:28:02 +0000 (14:28 +0300)]
pgutil: support NULL for quote_literal
Marko Kreen [Thu, 2 Sep 2010 11:25:16 +0000 (14:25 +0300)]
strlist: allow storing NULL
Marko Kreen [Wed, 1 Sep 2010 14:26:48 +0000 (17:26 +0300)]
pgutil: move common postgres helper functions here.
Marko Kreen [Tue, 31 Aug 2010 08:32:42 +0000 (11:32 +0300)]
logging: exit process in case logfile is not writable.
Otherwise configuration mistakes can be hard to diagnose.
Marko Kreen [Tue, 31 Aug 2010 08:32:10 +0000 (11:32 +0300)]
daemon: write pidfile twice, to be able to show errors to user
Marko Kreen [Mon, 9 Aug 2010 22:17:58 +0000 (01:17 +0300)]
daemon: signal_pidfile()
Marko Kreen [Mon, 19 Jul 2010 13:52:35 +0000 (16:52 +0300)]
socket: Fix fd_set allocation on win32
Marko Kreen [Mon, 19 Jul 2010 13:38:07 +0000 (16:38 +0300)]
socket: win32 keepalive defs for mingw32
Marko Kreen [Wed, 16 Jun 2010 09:24:32 +0000 (12:24 +0300)]
Move more portability goo over from pgbouncer.
FLEX_ARRAY, __func__, event_loopbreak.
Marko Kreen [Tue, 4 May 2010 11:26:35 +0000 (14:26 +0300)]
rename old 'check' target to 'sparse'
Marko Kreen [Fri, 22 Jan 2010 08:35:01 +0000 (10:35 +0200)]
test: new regtest based on tinytest
Marko Kreen [Tue, 6 Oct 2009 21:49:53 +0000 (00:49 +0300)]
regex: small fallback regex implementation
Marko Kreen [Sat, 1 May 2010 20:27:39 +0000 (23:27 +0300)]
strpool: pool for shared strings
Marko Kreen [Fri, 30 Apr 2010 18:55:57 +0000 (21:55 +0300)]
base: sync Assert() with logging changes
Marko Kreen [Mon, 19 Apr 2010 07:14:58 +0000 (10:14 +0300)]
logging: avoid changing errno.
So user can safely log syscall results without worrying about errno changing.
Marko Kreen [Sat, 24 Apr 2010 11:53:12 +0000 (14:53 +0300)]
Fix warning flags.
-Wformat=2 should turn an more useful flags.
-Wstrict-overflow is too noisy. And =1 is already turned on by -Wall.
Marko Kreen [Mon, 12 Apr 2010 09:16:28 +0000 (12:16 +0300)]
Makefile: check target for sparse checking
Marko Kreen [Mon, 12 Apr 2010 09:14:49 +0000 (12:14 +0300)]
logging: fix signed vs. unsigned cmp warning
Marko Kreen [Mon, 12 Apr 2010 09:13:00 +0000 (12:13 +0300)]
move <sys/param.h> include into <base.h>
then we can detect system defined macros (ALIGN)
Marko Kreen [Mon, 12 Apr 2010 09:10:38 +0000 (12:10 +0300)]
socket: remove unneeded logging.h include
Marko Kreen [Fri, 9 Apr 2010 13:01:47 +0000 (16:01 +0300)]
pgsocket: catch and ignore notices
default notice handler prints them to stderr, disable it
Marko Kreen [Thu, 1 Apr 2010 11:54:18 +0000 (14:54 +0300)]
logging: customizable prefix, context info
Marko Kreen [Wed, 31 Mar 2010 12:58:06 +0000 (15:58 +0300)]
autoconf: make sure 'restrict' keyword is always available
Marko Kreen [Wed, 31 Mar 2010 12:48:13 +0000 (15:48 +0300)]
autoconf: Some gcc versions require AC_PROG_CC_STDC to provide std c.
In particular 4.1.2, to define __STDC_VERSION__
Marko Kreen [Wed, 31 Mar 2010 12:02:07 +0000 (15:02 +0300)]
autoconf: separate warning flags from CFLAGS int WFLAGS
this allows easier CFLAGS customization in user program.
Marko Kreen [Tue, 30 Mar 2010 09:55:13 +0000 (12:55 +0300)]
utf8: fix problems with longer seqs
Marko Kreen [Fri, 19 Mar 2010 13:41:45 +0000 (15:41 +0200)]
slab: avoid shared structures in case of threaded program
- use malloc() for slab headers
- dont keep shared list if _REENTRANT is defined