osl.git
11 years agoFix target osl_errors.h on MacOS.
Andre Noll [Thu, 5 Jun 2008 08:20:15 +0000 (10:20 +0200)]
Fix target osl_errors.h on MacOS.

The sed on Mac doesn't understand \n.

11 years agoFix an embarassing bug in make_message().
Andre Noll [Wed, 4 Jun 2008 15:35:23 +0000 (17:35 +0200)]
Fix an embarassing bug in make_message().

Outch.

11 years agoFix and document compile options on Darwin.
Andre Noll [Wed, 4 Jun 2008 14:12:14 +0000 (16:12 +0200)]
Fix and document compile options on Darwin.

11 years agoThe linker on MacOS 10.4 does not understand -Wl,-z,defs.
Andre Noll [Wed, 4 Jun 2008 13:44:28 +0000 (15:44 +0200)]
The linker on MacOS 10.4 does not understand -Wl,-z,defs.

11 years agoSimply use the major version of the lib also on MacOS.
Andre Noll [Wed, 4 Jun 2008 13:41:17 +0000 (15:41 +0200)]
Simply use the major version of the lib also on MacOS.

The braindead idea to use letters instead of numbers for the
major version is only a recommendation, so ignore it.

11 years agoMove documentation of exported osl functions from osl.c to osl.h.in.
Andre Noll [Tue, 3 Jun 2008 10:31:14 +0000 (12:31 +0200)]
Move documentation of exported osl functions from osl.c to osl.h.in.

It's better to have this information in osl.h as this is the file
which is visible to the users.

11 years agoAdd errlist.
Andre Noll [Mon, 2 Jun 2008 08:12:47 +0000 (10:12 +0200)]
Add errlist.

Argh, I forgot to check in an important file. Again.

11 years agoLoglevel adjustments.
Andre Noll [Sat, 31 May 2008 17:59:01 +0000 (19:59 +0200)]
Loglevel adjustments.

11 years agoFix loglevel handling.
Andre Noll [Sat, 31 May 2008 17:48:32 +0000 (19:48 +0200)]
Fix loglevel handling.

Use the content of the enviroment variable OSL_LOGLEVEL.

11 years agoFix a design flaw in osl_rbtree_loop() and osl_rbtree_loop_reverse().
Andre Noll [Sat, 31 May 2008 17:18:31 +0000 (19:18 +0200)]
Fix a design flaw in osl_rbtree_loop() and osl_rbtree_loop_reverse().

In case the loop was terminated because the user-supplied loop function
returned a negative value, the old code returned this value back to
the caller of osl_rbtree_loop(). This is bad because osl functions
should only return osl error codes.

Moreover, the return value of the loop function might coincide with an
osl error code making it impossible to distinguish between the two
errors.

The fix is to introduce a new osl error code E_OSL_LOOP which is returned
by osl_rbtree_loop() in case the loop function returned a negative value.
It's up to the caller to save any further information about the error
in the private_data struct.

11 years agoosl.h.in cleanups and improvments.
Andre Noll [Sat, 31 May 2008 15:15:57 +0000 (17:15 +0200)]
osl.h.in cleanups and improvments.

- Add visibility pragmas
- More documentation
- Kill compare function pointers.

11 years agoKill uint32_compare().
Andre Noll [Sat, 31 May 2008 15:14:02 +0000 (17:14 +0200)]
Kill uint32_compare().

The user of the library might as well provide this.

11 years agoMakefile: Activate optimization and -Wuninitialized.
Andre Noll [Sat, 31 May 2008 15:13:02 +0000 (17:13 +0200)]
Makefile: Activate optimization and -Wuninitialized.

11 years agoMakefile: Disallow undefined symbols.
Andre Noll [Sat, 31 May 2008 15:12:18 +0000 (17:12 +0200)]
Makefile: Disallow undefined symbols.

11 years agoSwitch to the new error code handling.
Andre Noll [Sat, 31 May 2008 14:17:27 +0000 (16:17 +0200)]
Switch to the new error code handling.

11 years agoGenerate osl.h from osl.h.in.
Andre Noll [Sat, 31 May 2008 06:32:50 +0000 (08:32 +0200)]
Generate osl.h from osl.h.in.

We need to export the osl error codes to the applications that link
against osl. Prefix these error codes with OSL.

11 years agoAlways compile with -fvisibility=hidden.
Andre Noll [Thu, 29 May 2008 20:39:16 +0000 (22:39 +0200)]
Always compile with -fvisibility=hidden.

And explicitly mark exported functions with
__attribute__((visibility("default"))). This only works with gcc-4,
but hey, let's just require gcc-4.

11 years agoRename para_open() to osl_open().
Andre Noll [Thu, 29 May 2008 20:28:46 +0000 (22:28 +0200)]
Rename para_open() to osl_open().

11 years agoDo not export para_lseek() and para_write_file().
Andre Noll [Mon, 26 May 2008 23:30:18 +0000 (01:30 +0200)]
Do not export para_lseek() and para_write_file().

11 years agoRemove unused for_each_file_in_dir().
Andre Noll [Mon, 26 May 2008 21:15:10 +0000 (23:15 +0200)]
Remove unused for_each_file_in_dir().

11 years agoMake para_write_file() static.
Andre Noll [Mon, 26 May 2008 21:14:38 +0000 (23:14 +0200)]
Make para_write_file() static.

11 years agoMake some functions static.
Andre Noll [Mon, 26 May 2008 21:13:13 +0000 (23:13 +0200)]
Make some functions static.

And remove the "para" prefix while we're at it.

11 years agoKill the VSPRINTF macro.
Andre Noll [Mon, 26 May 2008 21:06:48 +0000 (23:06 +0200)]
Kill the VSPRINTF macro.

It has only one user, make_message(), so move it there.

11 years agoRemove Makefile.deps.
Andre Noll [Mon, 26 May 2008 20:52:25 +0000 (22:52 +0200)]
Remove Makefile.deps.

It's a derived file.

11 years agoGet rid of string.c and string.h.
Andre Noll [Mon, 26 May 2008 20:51:43 +0000 (22:51 +0200)]
Get rid of string.c and string.h.

These function contained only the malloc wrappers which exited on
allocation failures which is not an acceptable behaviour for a
library. We must therefore bite the bullet and check the return
values in the callers.

11 years agoInitial git import.
Andre Noll [Mon, 26 May 2008 19:37:38 +0000 (21:37 +0200)]
Initial git import.

This code is taken straight from the paraslash package.  It needs a
lot more work to transform it into a proper library package.