Closed Bug 301223 Opened 20 years ago Closed 17 years ago

support WinCE in NSPR on the trunk

Categories

(NSPR :: NSPR, enhancement)

Other
Other
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 456449

People

(Reporter: nelson, Assigned: wtc)

Details

There are 5 branches of NSPR that were all created to support WinCE. Some of them are quite complete, others are less so. But the fact that they are on branches, not the trunk, means that their bits have all rotted, and no-one is sure which of the many WinCE branches to use. To solve these issues, I think we need to support WinCE on the trunk of NSPR. Further, I think some of the NSPR additions that were originally made for WinCE should be unconditionally available (on all platforms) on the trunk. For example, On these branches: NSPRPUB_PRE_4_2_WINCE_BRANCH NSPR_PRE_4_2_WINCE_BRANCH WINCE_20020710_BRANCH WINCE_NSPRPUB_RELEASE_4_2_BETA1 NSPR's headers include this function declaration: /* ** Return the address of thread's last os error variable. ** Used to implement errno on platforms that lack it. */ NSPR_API(PRInt32 *) PR_GetOSErrorAddress(void); and this function definition in prerror.c PR_IMPLEMENT(PRInt32 *) PR_GetOSErrorAddress(void) { PRThread *thread = PR_GetCurrentThread(); return &thread->osErrorCode; } Then errno was defined (not in NSPR, but in some "shim" header) as #ifndef errno /* or something like that */ #define errno (* PR_GetOSErrorAddress()) #endif Note that this returns the address of the same tls variable whose value is returned by PR_GetOSError(). I'd like to see that function and its declaration become part of NSPR on the trunk, and not conditionally compiled, but on every platform. (The definition of errno can continue to be handled outside of NSPR.)
I currently use this branch: NSPRPUB_PRE_4_2_WINCE_BRANCH
QA Contact: wtchang → nspr
'errno' and the underlying per-thread implementation will be provided by the mozce shunt library.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.