Status

Firefox Build System
General
RESOLVED INVALID
10 years ago
2 months ago

People

(Reporter: dougt, Assigned: Brian Crowder)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

10 years ago
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.
(Assignee)

Comment 1

10 years ago
Created attachment 345103 [details] [diff] [review]
DougT's original patch
Assignee: nobody → crowder
Status: NEW → ASSIGNED
(Assignee)

Comment 2

10 years ago
Doug:  Some places in the code use "NO_ERRNO_H" and some use "NO_ERRNO", your patch uses NO_ERRNO.  Which is canonical?
(Assignee)

Comment 3

10 years ago
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)
(Reporter)

Comment 4

10 years ago
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
(Reporter)

Comment 6

10 years ago
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
(Assignee)

Comment 8

10 years ago
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

Updated

2 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.