Closed
Bug 479382
Opened 17 years ago
Closed 17 years ago
libmar doesn't build on windows ce (uses posix file io)
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: blassey, Assigned: blassey)
References
Details
(Keywords: fixed1.9.1)
Attachments
(1 file, 1 obsolete file)
|
3.88 KB,
patch
|
benjamin
:
review+
beltzner
:
approval1.9.1+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Comment 1•17 years ago
|
||
Assignee: nobody → bugmail
Attachment #363642 -
Flags: review?(benjamin)
Comment 2•17 years ago
|
||
I know I've said it before, but maybe we should think about creating a first class library that emulates these basic CRT function instead of putting preprocessor cruft all through the codebase.
Comment 3•17 years ago
|
||
nspr would be a good place for such basic CRT functions -- inlined, even.
Comment 4•17 years ago
|
||
Except that libmar can't depend on NSPR...
Comment 5•17 years ago
|
||
Comment on attachment 363642 [details] [diff] [review]
gets us building on wince
>diff --git a/modules/libmar/src/mar_create.c b/modules/libmar/src/mar_create.c
>+#ifdef WINCE
>+ flags = (file_data.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ?
>+ 0x0444 : 0x666;
These flags don't look right. Don't you mean 0444, not 0x0444 ? Permissions are typically written in octal, not hex.
>+ size = (file_data.nFileSizeHigh * MAXDWORD) + file_data.nFileSizeLow;
I think you want file_data.nFileSizeHigh * (MAXDWORD + 1) + file_data.nFileSizeLow;
>diff --git a/modules/libmar/src/mar_extract.c b/modules/libmar/src/mar_extract.c
> /* Ensure that the directory containing this file exists */
> static int mar_ensure_parent_dir(const char *path)
> {
> char *slash = strrchr(path, '/');
>+#ifdef WINCE
>+ unsigned short wide_path[MAX_PATH];
use wchar_t or WCHAR
Attachment #363642 -
Flags: review?(benjamin) → review-
| Assignee | ||
Comment 6•17 years ago
|
||
(In reply to comment #5)
>
> >+ size = (file_data.nFileSizeHigh * MAXDWORD) + file_data.nFileSizeLow;
>
> I think you want file_data.nFileSizeHigh * (MAXDWORD + 1) +
> file_data.nFileSizeLow;
"The size of the file is equal to (nFileSizeHigh * MAXDWORD) + nFileSizeLow."
according to: http://msdn.microsoft.com/en-us/library/ms915521.aspx
and "The size of the file is equal to (nFileSizeHigh * (MAXDWORD+1)) + nFileSizeLow."
according to: http://msdn.microsoft.com/en-us/library/aa365740%28VS.85%29.aspx
The former is windows ce documentation, and the later is Win32 desktop.
I'm going to assume the former is a typo, since the later makes more sense.
| Assignee | ||
Comment 7•17 years ago
|
||
Attachment #363642 -
Attachment is obsolete: true
Attachment #365993 -
Flags: review?(benjamin)
Updated•17 years ago
|
Attachment #365993 -
Flags: review?(benjamin) → review+
| Assignee | ||
Updated•17 years ago
|
Keywords: checkin-needed
Comment 8•17 years ago
|
||
Comment on attachment 365993 [details] [diff] [review]
patch v.2
[Checkin: Comment 8]
http://hg.mozilla.org/mozilla-central/rev/0720a4f0eeec
Attachment #365993 -
Attachment description: patch v.2 → patch v.2
[Checkin: Comment 8]
Updated•17 years ago
|
Status: NEW → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Version: unspecified → Trunk
| Assignee | ||
Updated•17 years ago
|
Attachment #365993 -
Flags: approval1.9.1?
Comment 9•17 years ago
|
||
Attachment #365993 -
Flags: approval1.9.1? → approval1.9.1+
| Assignee | ||
Comment 10•17 years ago
|
||
Keywords: fixed1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•