[haiku-development] Re: Using B_USE_POSITIVE_POSIX_ERRORS in kernel space

  • From: Vivek Roy <vivekroyandroid@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 26 Jul 2017 20:09:28 +0530


It won't just work in the kernel.
What it does is the following:
1) The ENOMEM defines and friends get positive values.
2) Then you have to link against the error mapper lib which replaces POSIX
functions with ones that return positive error codes, or set errno to a
positive value.

All you get is 1) which might have consequences you don't want. You cannot
use 2) in the kernel, since this would likely break the whole thing.

You'll have to patch your code.


Thanks for the quick response. I'll see how can I fix it.

Other related posts: