]> jfr.im git - irc/atheme/libmowgli-2.git/log
irc/atheme/libmowgli-2.git
12 years agolibmowgli 2.0.0-beta1. libmowgli-2.0.0-beta1
William Pitcock [Thu, 12 Apr 2012 00:15:14 +0000 (19:15 -0500)] 
libmowgli 2.0.0-beta1.

12 years agoRemove coroutine stuff.
William Pitcock [Thu, 12 Apr 2012 00:14:36 +0000 (19:14 -0500)] 
Remove coroutine stuff.

12 years agocontainer/index: no realloc
William Pitcock [Mon, 9 Apr 2012 04:01:04 +0000 (23:01 -0500)] 
container/index: no realloc

12 years agocore/mowgli_string: cut-and-paste fix
William Pitcock [Mon, 9 Apr 2012 04:00:53 +0000 (23:00 -0500)] 
core/mowgli_string: cut-and-paste fix

12 years agocore/mowgli_string: don't use realloc().
William Pitcock [Mon, 9 Apr 2012 03:56:54 +0000 (22:56 -0500)] 
core/mowgli_string: don't use realloc().

12 years agodns: maybe fix windows compile.
William Pitcock [Mon, 9 Apr 2012 03:51:54 +0000 (22:51 -0500)] 
dns: maybe fix windows compile.

12 years agoconcurrent/atomic: use uintptr_t for representing pointer addresses.
William Pitcock [Mon, 9 Apr 2012 02:06:38 +0000 (21:06 -0500)] 
concurrent/atomic: use uintptr_t for representing pointer addresses.

12 years agoconcurrent/atomic: use GCC pragmas to work around a GCC verifier bug
William Pitcock [Mon, 9 Apr 2012 01:52:08 +0000 (20:52 -0500)] 
concurrent/atomic: use GCC pragmas to work around a GCC verifier bug

12 years agoconcurrent/atomic: fix some prototype warnings
William Pitcock [Mon, 9 Apr 2012 01:42:42 +0000 (20:42 -0500)] 
concurrent/atomic: fix some prototype warnings

12 years agoconcurrent/future: fix prototype strictness
William Pitcock [Mon, 9 Apr 2012 01:37:30 +0000 (20:37 -0500)] 
concurrent/future: fix prototype strictness

12 years agoext/getopt_long: unclobber system namespace
William Pitcock [Mon, 9 Apr 2012 01:29:33 +0000 (20:29 -0500)] 
ext/getopt_long: unclobber system namespace

12 years agoMerge branch 'master' of ssh://git.atheme.org/gitroot/libmowgli-2
Elizabeth J. Myers [Sun, 8 Apr 2012 08:33:01 +0000 (03:33 -0500)] 
Merge branch 'master' of ssh://git.atheme.org/gitroot/libmowgli-2

12 years agoproctitle: fix warning.
Elizabeth J. Myers [Sun, 8 Apr 2012 08:18:25 +0000 (03:18 -0500)] 
proctitle: fix warning.

12 years agoproctitle: change malloc() to mowgli_alloc.
Elizabeth J. Myers [Fri, 6 Apr 2012 03:55:56 +0000 (22:55 -0500)] 
proctitle: change malloc() to mowgli_alloc.

Not sure how I managed this one. "oops."

12 years agohelper: allow setting of the process title.
Elizabeth J. Myers [Fri, 6 Apr 2012 03:53:20 +0000 (22:53 -0500)] 
helper: allow setting of the process title.

Also allow proctitle to discard empty process titles.

12 years agoproctitle: add support for Linux prctl(). Note not all utilities use it.
Elizabeth J. Myers [Fri, 6 Apr 2012 01:19:09 +0000 (20:19 -0500)] 
proctitle: add support for Linux prctl(). Note not all utilities use it.

Some utilities use argv[0] instead. :(.

12 years agofuture: fix compilation with GCC 4.5 and earlier.
William Pitcock [Fri, 6 Apr 2012 00:07:41 +0000 (19:07 -0500)] 
future: fix compilation with GCC 4.5 and earlier.

12 years agoproctitle: fix on Linux and remove needless function.
Elizabeth J. Myers [Thu, 5 Apr 2012 07:56:24 +0000 (02:56 -0500)] 
proctitle: fix on Linux and remove needless function.

12 years agoeventloop/helper: fix braindamage caused by rebasing
William Pitcock [Thu, 5 Apr 2012 05:52:33 +0000 (00:52 -0500)] 
eventloop/helper: fix braindamage caused by rebasing

12 years agoeventloop/helper: use socketpair() instead of pipe().
William Pitcock [Thu, 5 Apr 2012 05:49:33 +0000 (00:49 -0500)] 
eventloop/helper: use socketpair() instead of pipe().

Socketpair is more useful because we only need one socketpair verses two pipes for bidirectional
I/O.

12 years agoproctitle: fix warning.
Elizabeth J. Myers [Sun, 8 Apr 2012 08:18:25 +0000 (03:18 -0500)] 
proctitle: fix warning.

12 years agoatomic: add synchronize, undef internal symbol spam
Patrick McFarland [Sun, 8 Apr 2012 08:06:13 +0000 (04:06 -0400)] 
atomic: add synchronize, undef internal symbol spam

12 years agoproctitle: change malloc() to mowgli_alloc.
Elizabeth J. Myers [Fri, 6 Apr 2012 03:55:56 +0000 (22:55 -0500)] 
proctitle: change malloc() to mowgli_alloc.

Not sure how I managed this one. "oops."

12 years agohelper: allow setting of the process title.
Elizabeth J. Myers [Fri, 6 Apr 2012 03:53:20 +0000 (22:53 -0500)] 
helper: allow setting of the process title.

Also allow proctitle to discard empty process titles.

12 years agoproctitle: add support for Linux prctl(). Note not all utilities use it.
Elizabeth J. Myers [Fri, 6 Apr 2012 01:19:09 +0000 (20:19 -0500)] 
proctitle: add support for Linux prctl(). Note not all utilities use it.

Some utilities use argv[0] instead. :(.

12 years agofuture: fix compilation with GCC 4.5 and earlier.
William Pitcock [Fri, 6 Apr 2012 00:07:41 +0000 (19:07 -0500)] 
future: fix compilation with GCC 4.5 and earlier.

12 years agoproctitle: fix on Linux and remove needless function.
Elizabeth J. Myers [Thu, 5 Apr 2012 07:56:24 +0000 (02:56 -0500)] 
proctitle: fix on Linux and remove needless function.

12 years agoeventloop/helper: fix braindamage caused by rebasing
William Pitcock [Thu, 5 Apr 2012 05:52:33 +0000 (00:52 -0500)] 
eventloop/helper: fix braindamage caused by rebasing

12 years agoeventloop/helper: use socketpair() instead of pipe().
William Pitcock [Thu, 5 Apr 2012 05:49:33 +0000 (00:49 -0500)] 
eventloop/helper: use socketpair() instead of pipe().

Socketpair is more useful because we only need one socketpair verses two pipes for bidirectional
I/O.

12 years agofuturetest: fix indentfail
Patrick McFarland [Thu, 5 Apr 2012 05:00:33 +0000 (01:00 -0400)] 
futuretest: fix indentfail

12 years agoMerge branch 'develop' of git://caspar.adterrasperaspera.com/libmowgli-2
Elizabeth J. Myers [Thu, 5 Apr 2012 02:54:16 +0000 (21:54 -0500)] 
Merge branch 'develop' of git://caspar.adterrasperaspera.com/libmowgli-2

12 years agoproctitle: fix error with API.
Elizabeth J. Myers [Thu, 5 Apr 2012 02:31:16 +0000 (21:31 -0500)] 
proctitle: fix error with API.

12 years agoext: add proctitle setting functions to set process titles portably
Elizabeth J. Myers [Thu, 5 Apr 2012 02:27:55 +0000 (21:27 -0500)] 
ext: add proctitle setting functions to set process titles portably

12 years agofuture: Make it clear non-normal behavior is a consistency failure
Patrick McFarland [Wed, 4 Apr 2012 09:56:37 +0000 (05:56 -0400)] 
future: Make it clear non-normal behavior is a consistency failure

12 years agofuture: clean up syntax style slightly
Patrick McFarland [Wed, 4 Apr 2012 03:00:34 +0000 (23:00 -0400)] 
future: clean up syntax style slightly

12 years agofuture: Improve cancel method
Patrick McFarland [Wed, 4 Apr 2012 02:51:38 +0000 (22:51 -0400)] 
future: Improve cancel method

12 years agoImprove futures to be more paranoid about potential failures
Patrick McFarland [Wed, 4 Apr 2012 02:36:32 +0000 (22:36 -0400)] 
Improve futures to be more paranoid about potential failures

12 years agoMake struct private
Patrick McFarland [Wed, 4 Apr 2012 01:22:29 +0000 (21:22 -0400)] 
Make struct private

12 years agomachine: fix compile error.
Elizabeth J. Myers [Mon, 2 Apr 2012 01:09:49 +0000 (20:09 -0500)] 
machine: fix compile error.

12 years agoremove remnants of futex check as it's not necessary anymore.
Elizabeth J. Myers [Mon, 2 Apr 2012 01:04:20 +0000 (20:04 -0500)] 
remove remnants of futex check as it's not necessary anymore.

12 years agoAdd missing coroutine_private.h.
William Pitcock [Mon, 2 Apr 2012 01:02:05 +0000 (20:02 -0500)] 
Add missing coroutine_private.h.

12 years agomowgli_strlcpy/strlcat: use libbsd implementation
William Pitcock [Mon, 2 Apr 2012 00:24:49 +0000 (19:24 -0500)] 
mowgli_strlcpy/strlcat: use libbsd implementation

12 years agoRemove something I added 5 years ago
Patrick McFarland [Sun, 1 Apr 2012 19:19:52 +0000 (15:19 -0400)] 
Remove something I added 5 years ago

12 years agoAdded AVR32, SuperH, and VMS to machine.h
Patrick McFarland [Sun, 1 Apr 2012 12:27:48 +0000 (08:27 -0400)] 
Added AVR32, SuperH, and VMS to machine.h

12 years agodns: some optimisations and shuffling.
Elizabeth J. Myers [Sun, 1 Apr 2012 03:14:34 +0000 (22:14 -0500)] 
dns: some optimisations and shuffling.

Note the mowgli_dns_init function now takes a const mowgli_ops_t * ptr
to specify custom ops.

12 years agothread: make ops tables const.
Elizabeth J. Myers [Sat, 31 Mar 2012 16:52:44 +0000 (11:52 -0500)] 
thread: make ops tables const.

GCC will then optimise each op in the table into a jmp.

12 years agoMerge branch 'master' of ssh://git.atheme.org/gitroot/libmowgli-2
Elizabeth J. Myers [Sat, 31 Mar 2012 03:08:57 +0000 (22:08 -0500)] 
Merge branch 'master' of ssh://git.atheme.org/gitroot/libmowgli-2

12 years agodns_evloop: use a heap instead of mowgli_alloc for storing reslist
Elizabeth J. Myers [Sat, 31 Mar 2012 03:08:22 +0000 (22:08 -0500)] 
dns_evloop: use a heap instead of mowgli_alloc for storing reslist
entries.

12 years agodns: use mowgli_eventloop_get_time() instead of touching struct members
William Pitcock [Sat, 31 Mar 2012 02:36:04 +0000 (21:36 -0500)] 
dns: use mowgli_eventloop_get_time() instead of touching struct members

12 years agocoroutine: some initial bits of this module, incomplete
William Pitcock [Sat, 31 Mar 2012 02:34:55 +0000 (21:34 -0500)] 
coroutine: some initial bits of this module, incomplete

12 years agodns_evloop: some optimisations.
Elizabeth J. Myers [Sat, 31 Mar 2012 01:55:47 +0000 (20:55 -0500)] 
dns_evloop: some optimisations.

12 years agogitignore: update, and add windows files that should be ignored.
Elizabeth J. Myers [Fri, 30 Mar 2012 17:27:30 +0000 (12:27 -0500)] 
gitignore: update, and add windows files that should be ignored.

12 years agofix warning in example and remove useless debug logging.
Elizabeth J. Myers [Fri, 30 Mar 2012 17:25:54 +0000 (12:25 -0500)] 
fix warning in example and remove useless debug logging.

12 years agovio: let socket close itself after an error if it wants.
Elizabeth J. Myers [Fri, 30 Mar 2012 17:13:36 +0000 (12:13 -0500)] 
vio: let socket close itself after an error if it wants.

12 years agoMerge branch 'develop' of git://caspar.adterrasperaspera.com/libmowgli-2
Elizabeth J. Myers [Fri, 30 Mar 2012 06:00:49 +0000 (01:00 -0500)] 
Merge branch 'develop' of git://caspar.adterrasperaspera.com/libmowgli-2

12 years agoMerge branch 'master' of ssh://git.atheme.org/gitroot/libmowgli-2
Elizabeth J. Myers [Fri, 30 Mar 2012 05:59:56 +0000 (00:59 -0500)] 
Merge branch 'master' of ssh://git.atheme.org/gitroot/libmowgli-2

12 years agodns: misc. fixes to make it work and an example program.
Elizabeth J. Myers [Fri, 30 Mar 2012 05:59:16 +0000 (00:59 -0500)] 
dns: misc. fixes to make it work and an example program.

12 years agothread/mutex: pair mutex-owning mutex_ops with each mutex by reference
William Pitcock [Thu, 29 Mar 2012 20:22:32 +0000 (15:22 -0500)] 
thread/mutex: pair mutex-owning mutex_ops with each mutex by reference

12 years agothread: remove unneeded 'initialized' variable
William Pitcock [Thu, 29 Mar 2012 20:17:51 +0000 (15:17 -0500)] 
thread: remove unneeded 'initialized' variable

12 years agoMake atomic.h use machine.h instead of the autoconf macro
Patrick McFarland [Thu, 29 Mar 2012 20:00:44 +0000 (16:00 -0400)] 
Make atomic.h use machine.h instead of the autoconf macro

12 years agodns: mowgli_alloc should allocate an object of size mowgli_dns_t, not mowgli_dns_ops_t.
William Pitcock [Thu, 29 Mar 2012 19:56:31 +0000 (14:56 -0500)] 
dns: mowgli_alloc should allocate an object of size mowgli_dns_t, not mowgli_dns_ops_t.

12 years agoAdd endian checking to machine.h
Patrick McFarland [Thu, 29 Mar 2012 12:07:21 +0000 (08:07 -0400)] 
Add endian checking to machine.h

12 years agodns: renaming, and some windows portability gunk.
Elizabeth J. Myers [Thu, 29 Mar 2012 11:35:47 +0000 (06:35 -0500)] 
dns: renaming, and some windows portability gunk.

12 years agoDNS stuff, round deux. This is preliminary stuff, I am not done.
Elizabeth J. Myers [Thu, 29 Mar 2012 11:00:15 +0000 (06:00 -0500)] 
DNS stuff, round deux. This is preliminary stuff, I am not done.

12 years agoFix install process, fix missing include rename
Patrick McFarland [Thu, 29 Mar 2012 10:23:41 +0000 (06:23 -0400)] 
Fix install process, fix missing include rename

12 years agovio: add listen/accept API to OpenSSL.
Elizabeth J. Myers [Thu, 29 Mar 2012 07:04:17 +0000 (02:04 -0500)] 
vio: add listen/accept API to OpenSSL.

It hasn't been tested yet, but should work.

12 years agovio_openssl: get rid of nasty const discarding.
Elizabeth J. Myers [Thu, 29 Mar 2012 04:18:08 +0000 (23:18 -0500)] 
vio_openssl: get rid of nasty const discarding.

12 years agolinebuf: accomodations for edge-triggered interfaces.
Elizabeth J. Myers [Thu, 29 Mar 2012 04:09:51 +0000 (23:09 -0500)] 
linebuf: accomodations for edge-triggered interfaces.

12 years agovio: set NEED{READ,WRITE} for edge-triggered interfaces.
Elizabeth J. Myers [Thu, 29 Mar 2012 03:55:13 +0000 (22:55 -0500)] 
vio: set NEED{READ,WRITE} for edge-triggered interfaces.

On epoll in edge-triggered mode and other edge-triggered interfaces, the fd
won't show up in subsequent batches until all data has been read or the fd is
re-added or other such crap. Signal this to the caller that more reading or
writing may be necessary.

12 years agovio: convert ugly non-syntactic macros to functions.
Elizabeth J. Myers [Thu, 29 Mar 2012 03:42:11 +0000 (22:42 -0500)] 
vio: convert ugly non-syntactic macros to functions.

12 years agoChange mutex.h and thread.h to use the new machine.h defines
Patrick McFarland [Wed, 28 Mar 2012 19:23:46 +0000 (15:23 -0400)] 
Change mutex.h and thread.h to use the new machine.h defines

12 years agoCreate machine.h to make it easier to do platform specific code
Patrick McFarland [Wed, 28 Mar 2012 19:18:47 +0000 (15:18 -0400)] 
Create machine.h to make it easier to do platform specific code

12 years agoChange mowgli_thread to use create/init/deinit/destroy API style
Patrick McFarland [Wed, 28 Mar 2012 15:24:45 +0000 (11:24 -0400)] 
Change mowgli_thread to use create/init/deinit/destroy API style

12 years agoRename all boostrap _init() functions to _boostrap()
Patrick McFarland [Wed, 28 Mar 2012 08:51:29 +0000 (04:51 -0400)] 
Rename all boostrap _init() functions to _boostrap()

12 years agoMade atomic ops more type safe and sane
Patrick McFarland [Tue, 27 Mar 2012 07:42:22 +0000 (03:42 -0400)] 
Made atomic ops more type safe and sane

12 years agorandom: fix tempering.
Elizabeth J. Myers [Mon, 26 Mar 2012 06:54:10 +0000 (01:54 -0500)] 
random: fix tempering.

The tempering stage was slightly off; two bit shifts were supposed to be left, not right.
Source: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/mt19937ar.c

12 years agovio: make sendto/write functions take const void * args.
Elizabeth J. Myers [Sun, 25 Mar 2012 16:16:10 +0000 (11:16 -0500)] 
vio: make sendto/write functions take const void * args.

These are the semantics of send() and sendto().

12 years agomutex: get rid of tracking of all mutexes and atfork stuff.
Elizabeth J. Myers [Sat, 24 Mar 2012 20:41:20 +0000 (15:41 -0500)] 
mutex: get rid of tracking of all mutexes and atfork stuff.

It's more trouble than it's worth and doesn't really get you anything.

Also whilst I was here I got rid of vestigal futex stuff from Linux.

12 years agoRevert "mowgli_mutex_lock_all: only lock already unlocked mutexes."
Elizabeth J. Myers [Sat, 24 Mar 2012 20:34:54 +0000 (15:34 -0500)] 
Revert "mowgli_mutex_lock_all: only lock already unlocked mutexes."

This reverts commit 3fb2ad2f3e75adaba439085870921c46bcd9ebe7.

12 years agomowgli_mutex_lock_all: only lock already unlocked mutexes.
Elizabeth J. Myers [Sat, 24 Mar 2012 23:41:46 +0000 (18:41 -0500)] 
mowgli_mutex_lock_all: only lock already unlocked mutexes.

This avoids deadlocks where something else already has a mutex on the object.
This was causing the helper code to lock up on Linux glibc and OS X waiting for
a lock that wouldn't be released.

12 years agomutex: add some debug logging.
Elizabeth J. Myers [Sat, 24 Mar 2012 19:38:17 +0000 (14:38 -0500)] 
mutex: add some debug logging.

12 years agolibmowgli: fix function name for sun
Elizabeth J. Myers [Sat, 24 Mar 2012 22:54:09 +0000 (17:54 -0500)] 
libmowgli: fix function name for sun

12 years agomowgli_writef: thou shalt not call send() on a file descriptor you are
Elizabeth J. Myers [Sat, 24 Mar 2012 17:18:50 +0000 (12:18 -0500)] 
mowgli_writef: thou shalt not call send() on a file descriptor you are
not sure is a socket.

It results in FPE on Linux. However, windows doesn't let you write() to
a winsock handle, so uh... best way to handle it is to use an ifdef
(since write works on sockets on Unix anyhow, in theory).

12 years agoAdd atomic ops and futures
Patrick McFarland [Sat, 24 Mar 2012 11:39:50 +0000 (07:39 -0400)] 
Add atomic ops and futures

12 years agocore/init: guard against multiple invocations of mowgli_init_real().
William Pitcock [Sat, 24 Mar 2012 04:42:50 +0000 (23:42 -0500)] 
core/init: guard against multiple invocations of mowgli_init_real().

Some broken linkers will call the constructor multiple times for whatever reason.

12 years agoAbort on mowgli_throw_exception_fatal().
William Pitcock [Sat, 24 Mar 2012 04:41:22 +0000 (23:41 -0500)] 
Abort on mowgli_throw_exception_fatal().

This allows us to have some level of GDB integration.

12 years agoReplace all uses of strdup() with mowgli_strdup().
William Pitcock [Sat, 24 Mar 2012 04:14:34 +0000 (23:14 -0500)] 
Replace all uses of strdup() with mowgli_strdup().

12 years agocore/alloc: add mowgli_strdup_using_policy() and mowgli_strdup().
William Pitcock [Sat, 24 Mar 2012 04:07:25 +0000 (23:07 -0500)] 
core/alloc: add mowgli_strdup_using_policy() and mowgli_strdup().

With tagged allocations, using system strdup() can cause a crash in codepaths which use mowgli_free().

12 years agoeventloop: disable windows-specific eventloop for right now
William Pitcock [Fri, 23 Mar 2012 16:23:23 +0000 (11:23 -0500)] 
eventloop: disable windows-specific eventloop for right now

12 years agovio: move some files around to match standard naming convention.
Elizabeth J. Myers [Wed, 21 Mar 2012 18:47:06 +0000 (13:47 -0500)] 
vio: move some files around to match standard naming convention.

12 years agoext/program_opts: reinclude patrick mcfarland's fix
William Pitcock [Wed, 21 Mar 2012 13:42:19 +0000 (08:42 -0500)] 
ext/program_opts: reinclude patrick mcfarland's fix

12 years agoRevert "Replace include guards with #pragma once, fix program_opts weirdness"
William Pitcock [Wed, 21 Mar 2012 13:41:38 +0000 (08:41 -0500)] 
Revert "Replace include guards with #pragma once, fix program_opts weirdness"

This reverts commit 6165fadf520753bce398d887acb3d1eab1a26829.

12 years agoUpdate buildsys.
Jonathan Schleifer [Wed, 21 Mar 2012 12:24:47 +0000 (13:24 +0100)] 
Update buildsys.

12 years agoFix enum type safety bug, rename tag to type
Patrick McFarland [Tue, 20 Mar 2012 09:41:49 +0000 (05:41 -0400)] 
Fix enum type safety bug, rename tag to type

12 years agoReplace include guards with #pragma once, fix program_opts weirdness
Patrick McFarland [Tue, 20 Mar 2012 06:55:34 +0000 (02:55 -0400)] 
Replace include guards with #pragma once, fix program_opts weirdness

12 years agoMerge branch 'master' of ssh://git.atheme.org/gitroot/libmowgli-2
Elizabeth J. Myers [Tue, 20 Mar 2012 22:28:27 +0000 (17:28 -0500)] 
Merge branch 'master' of ssh://git.atheme.org/gitroot/libmowgli-2

12 years agovio: whoo, OpenSSL works.
Elizabeth J. Myers [Tue, 20 Mar 2012 22:28:10 +0000 (17:28 -0500)] 
vio: whoo, OpenSSL works.

12 years agovio-openssl: set SSL handle to connect state for connect calls.
Elizabeth J. Myers [Tue, 20 Mar 2012 21:45:25 +0000 (16:45 -0500)] 
vio-openssl: set SSL handle to connect state for connect calls.

12 years agovio-openssl: fix typo
Elizabeth J. Myers [Tue, 20 Mar 2012 21:27:00 +0000 (16:27 -0500)] 
vio-openssl: fix typo

12 years agovio/linebuf: some SSL correctness fixes.
Elizabeth J. Myers [Tue, 20 Mar 2012 21:19:27 +0000 (16:19 -0500)] 
vio/linebuf: some SSL correctness fixes.

It still doesn't work, but it doesn't crash anymore. :p