libbz2 can't use fdopen on windows ce

RESOLVED FIXED

Status

()

RESOLVED FIXED
10 years ago
8 years ago

People

(Reporter: blassey, Assigned: hiro)

Tracking

({mobile})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

Created attachment 383657 [details] [diff] [review]
skip over it the way strict ansi does
Attachment #383657 - Flags: review?(benjamin)
Blocks: 458950
(Assignee)

Comment 1

10 years ago
WinCE has _wfdopen.

http://msdn.microsoft.com/en-us/library/ms861280.aspx

But the document is wrong. The first argument of its function seems void*.

from stdlib.h in Pocket PC SDK. 

_CRTIMP FILE*  __cdecl _wfdopen(void*, const wchar_t*);
(Assignee)

Comment 2

10 years ago
Created attachment 384746 [details] [diff] [review]
Use _wfdopen

WinCE has also _setmode and _O_BINARY.
(Assignee)

Comment 3

10 years ago
#include <windows.h>
#include <stdlib.h>

int
wmain (int argc, wchar_t *argv)
{
    FILE *fp;
    fp = _wfdopen(_fileno(stdout), L"a");
    fwrite("test\n", strlen("test\n"), 1, fp);
    fclose(fp);
}


This test program outputs "test" string on Emulator. So we can use _wfdopen.

Updated

10 years ago
Attachment #384746 - Flags: review+

Updated

10 years ago
Attachment #383657 - Flags: review?(benjamin) → review-
pushed http://hg.mozilla.org/mozilla-central/rev/a152ab60e76d
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Assignee: nobody → hiikezoe
You need to log in before you can comment on or make changes to this bug.