[issue393] confstr() should return 0, not -1, on errors

Guy Harris issues at chlamydia.fs.ei.tum.de
Mon Dec 4 11:21:33 PST 2006

Guy Harris <guy at alum.mit.edu> added the comment:

Not with top-of-tree FreeBSD, it isn't - the top-of-tree FreeBSD code 
returns 0:


The documentation, until recently, said it returned -1, but I filed a 
bug about that:


and it was recently fixed:


As for NetBSD, I filed a bug on the code:


which is now closed - they changed the code and the man page.

Similar changes were made to OpenBSD in response to bug mail I sent:



so DragonFly is now inconsistent with the top of the tree of FreeBSD, 
NetBSD, and OpenBSD, and its code is inconsistent with the 5.x and 6.x 
releases of FreeBSD.
> I don't have
> a reference to POSIX.2 to verify the original specification.
Perhaps POSIX.2 said it returned -1 (I think my POSIX.2 is at work), but 
what counts now is the Single UNIX Specification, and, as per the URL I 
think I sent in my mail:


it says it returns 0 on errors.

DragonFly issue tracker <issues at chlamydia.fs.ei.tum.de>

More information about the Bugs mailing list