haiku/headers/os
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
..
add-ons * Rewrote InputServerDevice.h header. 2008-10-19 15:48:34 +00:00
app Adding const for gcc2 as well shouldn't cause any issues. Thanks Axel! 2009-02-01 23:28:37 +00:00
arch tag warnings with M68K: 2007-10-25 12:43:05 +00:00
be_apps Added the public header to allow apps to take advantage of the services daemon's app restart capabilities 2007-01-06 02:27:52 +00:00
bluetooth - Drop R5 compatibility by removing first 4 bytes in the IOCTLs containing the size of the command. 2009-03-21 21:38:00 +00:00
device Moved _joystick_info definition to JoystickTweaker.h, since there is no point to keep it public. Removed default parameter in the second version of Open(), otherwise the two functions can't be used unambiguously. Should fix bug #2904 2008-10-23 08:18:48 +00:00
drivers * Renamed src/system/kernel/device_manager/io_requests.{h,cpp} to 2009-03-08 17:30:37 +00:00
game correct spelling 2008-10-31 22:33:06 +00:00
interface Added method to draw an arrow shape like that of the BScrollBar. 2009-03-21 17:22:56 +00:00
kernel * When a team debugger is installed automatically, the thread causing that is 2009-02-23 22:59:45 +00:00
mail fix a bit of gcc4 build 2007-10-15 22:35:52 +00:00
media * Implement basic support for the BSound parts of BSoundPlayer. Only one sound 2009-03-01 23:22:30 +00:00
midi * Rewrote BeBuild.h which had "a few" consequences (got rid of all those class 2007-10-15 20:13:55 +00:00
midi2 style cleanup 2006-09-21 13:04:59 +00:00
net - Changed BNetBuffer to a simpler (and R5 compatible) implementation. 2009-01-17 21:28:10 +00:00
opengl Preparations for removing __BEOS__ from the compiler defines. 2008-10-23 21:46:26 +00:00
storage Added a way to remove the application flags from the BAppFileInfo. The 2009-03-21 21:16:23 +00:00
support Experimental approach to tackle the problem with Be's negative error codes and 2009-03-22 15:43:03 +00:00
translation * Rewrote BeBuild.h which had "a few" consequences (got rid of all those class 2007-10-15 20:13:55 +00:00
AppKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
Be.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
BeBuild.h "_IMPORT" was not defined, but most (all?) BeOS software that could be compiled 2008-09-10 20:29:50 +00:00
DeviceKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
GameKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
InterfaceKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
KernelKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
MailKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
MediaKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
MidiKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
NetKit.h * Rewrote NetKit.h, and added the libnetapi headers. 2008-06-24 09:03:44 +00:00
NetworkKit.h Official place for socket.h is sys/ 2007-07-14 09:26:22 +00:00
OpenGLKit.h Removed GLX headers: was never there anyway! 2005-06-26 21:48:15 +00:00
StorageKit.h StorageKit.h still included the Alias.h header file I removed with the previous commit. 2007-07-06 12:52:01 +00:00
SupportKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
TranslationKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00