Refactor type handling oml2-scaffold

All declaration and mapping of various types, be they OML, C or popt(3),
are now declared once in a hash of hashes, which is then extended with
deprecated values for backward compatibility.

Also, warn when using :real or :float.

Finally, generate code showing off all the valid, currently supported,
types.

refs: #715

Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au>
Enforce coding style in marshalling tests

Also, move marshalling tests into libshared tests, where they belong.

Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au>
Add full marshalling test for GUID

Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au>
Refactor *_get_table_list

Make both backends code look a lot more similar, and use prepared
statements. This means the SQLite3 backends now actively uses the schema
metadata information to recreate its data structures.

Also extend doxumentation about some dependency functions which
behaviour wasn't entirely clear from their documentation.

refs: #168, #1051 @10h, #372

Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au>
Add type tests for text protocol

test_coverage++

refs: #1047 @1h

Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au>
Include oml_util.h instead of re#define'ing LENGTH

Also, update license boilerplate, and add doxygen description for the
few files I had open.

refs: #372, #1100 @0.15

Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au>
Fix warning in server when PG is not enabled

Signed-off-by: Olivier Mehani <shtrom@ssji.net>
Add xstrdup as a convenience macro around xstrndup

Signed-off-by: Olivier Mehani <shtrom@ssji.net>
Update some boilerplates

refs: #1100

Signed-off-by: Olivier Mehani <shtrom@ssji.net>
Cleanup and doxument writers subsystem

Also, propagate changes and find some more code duplication.  The
propagation geos rather far...

Finally, move oml_lock_persistent() where it belongs, as part of the
propagations.

ref: #1057 @2h
ref: #372, #1100, #1101

Signed-off-by: Olivier Mehani <shtrom@ssji.net>
Use find_mp_field to find MP field in omlc_inject_metadata

Signed-off-by: Olivier Mehani <shtrom@ssji.net>
Cleanup and doxument net_stream.c

refs: #1100 @0.25, #372 @0.25

Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au>
Add ASCII dump for to_octets

@2h
refs: #1100

Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au>
Revert "revertme! Try to make system tests reliable"

This reverts commit 4399b3eeb13be96a077169e32308c45655750207.

refs: #1072
Make BufferedWriter keep the lock when writing

BufferedWriter::processChain() tries to write the contents of an
MBuffer of the chain out to the stream. Prior to doing the writing, it
actually released the lock on the full BufferedWriter object, which
means that the chain could actually be modified, and particularly, the
MBuffer from which the function was currently writing into the stream.
Additionaly, despite not having the lock, it still did fiddle with the
MBuffer state itself.

The tests were failing due to that, and it's surprisingly lucky that
this never failed in real life. That said, having a single giant lock on
the BufferedWriter might not be the most efficient as, if the MBuffer
needs to be protected, the rest of the chain could still continue to be
used, and content at least added.

Therefore, this fix probably has performance drawbacks. A side question
is also whether the sleep(3) call in the middle of the while loop after
the call to self->writeFunc() is very wise; exiting with status 0 should
probably be enough there.

fixes: #1072 @6h, and probably many others
refs: #1104

Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au>
Add, test and document low-level bool support in OmlValue*

refs: #1035

Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au>
Add scaffold support for bools

refs: #1035

Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au>
Specify bool binary marshalling, and test it

refs: #1035

Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au>
Implement OML_BOOL_VALUE marshalling

That was easy.

refs: #1035

Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au>
Test for bool in text protocol

refs: #1035 @0.2

Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au>