many platforms do not have errno support. one example is windows mobile. we should honor NO_ERRNO in our codebase. It is used in a few places, but isn't universal.
Created attachment 345103 [details] [diff] [review] DougT's original patch
Assignee: nobody → crowder
Status: NEW → ASSIGNED
Doug: Some places in the code use "NO_ERRNO_H" and some use "NO_ERRNO", your patch uses NO_ERRNO. Which is canonical?
Talking with jimb, I think the canonical and correct approach for this, with respect to autoconf is to use "HAVE_ERRNO_H", and add a test in configure.in for it: AC_CHECK_HEADERS(errno.h)
we are all over the place: http://mxr.mozilla.org/mozilla-central/search?string=NO_ERRNO Other projects use NO_ERRNO I really don't care what we use, as long as we are most consistent than we currently are. HAVE_ERRNO_H sounds fine.
Adding tedious, ugly, error-prone ifdefs all over is not the answer. We could use an NSPR "prerrno.h" or equivalent. I don't care where it lives, but it should define two-way macros to do the right thing or evaporate appropriately on WINCE. /be
I do not think we want developers to have to remember to include prerrno.h instead of errno.h. If you don't want to allow the autoconf header ifdefs, we could just move errno support back into the windows ce shunt library. I do not think keeping the implementation of errno on windows mobile will be that big of a deal -- and it is a ton better than having to #include "prerrno.h"
(In reply to comment #6) > I do not think we want developers to have to remember to include prerrno.h > instead of errno.h. They can't do that without also remembering to #ifdef, and they won't. We are going to have to do something abnormal no matter what. I'm arguing for fewer lines of it, without #ifdefs. > If you don't want to allow the autoconf header ifdefs, we could just move errno > support back into the windows ce shunt library. I do not think keeping the > implementation of errno on windows mobile will be that big of a deal -- and it > is a ton better than having to #include "prerrno.h" Glad you agree (since that is better than patching #ifdefs all over). /be
K, we're happy with reintroducing errno. I'll reroll the patch in bug 461841 also.
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.