haiku/src/libs
Ingo Weinhold 39d58e2f49 Experimental approach to tackle the problem with Be's negative error codes and
ported software:
* If the macro B_USE_POSITIVE_POSIX_ERRORS is defined the POSIX error code
  constants (ENOMEM, EINTR,...) will have positive values.
* Introduced the macros B_TO_{POSITIVE,NEGATIVE}_ERROR() which do convert a
  given error code to a positive/negative value.
* Added static library libposix_error_mapper.a that overrides all POSIX
  functions (save the ones I forgot to add :-)) directly meddling with error
  codes (having them as parameter or returning them) dealing with the
  positive<->negative error code conversions. The functions have hidden
  visibility, so they affect only the shared object they are linked into.
* So ideally all one has to do is to build a ported software with
  -DB_USE_POSITIVE_POSIX_ERRORS and -lposix_error_mapper and be good with
  respect to error code problems.
* Potential issues:
  - When mixing ported and Haiku native code, i.e. using Haiku native code in
    a ported software or using a ported library in a Haiku native application
    care must be taken to convert error codes where the two interface. That's
    what the B_TO_{POSITIVE,NEGATIVE}_ERROR() macros are supposed to be used
    for.
  - A ported static library can obviously not be linked directly against
    -lposix_error_mapper. The shared object linking a against the ported static
    library has to do that. The previous point applies when that causes mixing
    with Haiku native code.
  - When dependent ported libraries are used probably all of them should use
    the error mapping.

Comments welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-22 15:43:03 +00:00
..
agg simplified translation(), more robust too 2006-08-04 23:49:14 +00:00
alm Patch by Vasilis Kaoutsis: Fixed warnings. 2008-05-28 15:30:27 +00:00
bsd gcc4 complains about missing proto for strcpy(). 2008-04-25 12:47:07 +00:00
compat * Applied cleaned patch by Adrian: the gDevices[] can now have empty entries, 2009-03-18 16:36:51 +00:00
crypt Added the BSD-ish libcrypt.h for your convenience. 2006-08-07 22:48:08 +00:00
edit * Imported libutil.a and libedit.a from FreeBSD 6.1 release. 2006-08-07 16:55:45 +00:00
expat Preparations for removing __BEOS__ from the compiler defines. 2008-10-23 21:46:26 +00:00
fluidsynth Preparations for removing __BEOS__ from the compiler defines. 2008-10-23 21:46:26 +00:00
freetype2 updated freetype to 2.3.8 2009-01-18 12:13:00 +00:00
icon * Cleanup in the Gradient department. No fuctional change. 2009-02-15 15:15:49 +00:00
iconv * renamed libiconv_config.h back to config.h - now that it no longer triggers 2008-11-13 16:24:33 +00:00
libtelnet Accidently built libtelnet.a as a shared library. 2006-12-13 14:34:00 +00:00
linprog ALM/linprog patch by Christof Lutteroth: 2008-03-10 21:43:32 +00:00
lp_solve * Moved public headers to headers/libs/lp_solve. 2008-02-06 10:37:19 +00:00
ncurses Preparations for removing __BEOS__ from the compiler defines. 2008-10-23 21:46:26 +00:00
pdflib Preparations for removing __BEOS__ from the compiler defines. 2008-10-23 21:46:26 +00:00
png updated libpng to 1.2.34 2009-01-17 18:43:09 +00:00
posix_error_mapper Experimental approach to tackle the problem with Be's negative error codes and 2009-03-22 15:43:03 +00:00
print Fixing all headers/namespaces/name lookup problems that hinder a GCC 4.3.2 2009-01-23 03:05:15 +00:00
stdc++ Change the vfork() declaration to match the prototype, and thus fix the build. 2006-12-15 08:42:34 +00:00
termcap Added home and end key xterm capabilities. 2008-06-19 14:21:45 +00:00
util * Added BSD specific errno.h for EDOOFUS (yeah, I know, great error code...) 2008-02-03 16:20:16 +00:00
zlib Preparations for removing __BEOS__ from the compiler defines. 2008-10-23 21:46:26 +00:00
Jamfile Experimental approach to tackle the problem with Be's negative error codes and 2009-03-22 15:43:03 +00:00