> Hi, > > What is the reason to the change of return -EIO (etc) to return > RETERROR(EIO)?
I already explained it I think, we have error codes defined as negative values, as BeOS did. see http://dev.haiku-os.org/browser/haiku/trunk/headers/os/support/Errors.h doing return -EINVAL would then actually return a positive number, meaning valid length or something but not error. Even worse, on some values it overflows the 32bit signed int back to - something. While standards do say POSIX errors should be >0, at least one of them changed its mind from !=0 (opengroup, on the errno page IIRC). So they should be either reverted or severely beaten. Besides, it's much saner IMO as it avoids missing a -, or adding one when there's no need, as I already saw in OSS :) The only simple way of getting it work is to #define RETERR() to return the error always negative regardless of the sign. Cause we're not changing our error codes anytime soon :D It works fine in ffmpeg for example. François. _______________________________________________ oss-devel mailing list oss-devel@mailman.opensound.com http://mailman.opensound.com/mailman/listinfo/oss-devel