I get this build error on attempting to build config/nsinstall_win.c on MinGW: c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../libmingw32.a(main.o):main .c:(.text+0x106): undefined reference to `WinMain@16' From Bug #411826, I have worked out that it is because MinGW does not support wide mains and have created a patch, based on the other bug's patch, to create a "normal" main and have it wrap around the wide main
Oh, I forgot to mention that I did a rgrep of he source tree, looking for more files using wide mains without a "normal" main counterpart and found that the file at js/src/config/nsinstal_win.c (Which has the exact same contents as the other nsinstall_win.c) also needed to be patched
Created attachment 546296 [details] [diff] [review] LocalFree now frees the correct variable I just noticed that I made LocalFree free the wrong variable. Fixed it up
Attachment #546295 - Attachment is obsolete: true
Created attachment 546297 [details] [diff] [review] Attempted to fix up the patch format Bugzilla did something funny to my patch and made the diffs of two separate files merge in to one. Maybe it was because it didn't have any whitespace between the two. Let me try adding some in
Attachment #546296 - Attachment is obsolete: true
-Sigh- Bugzilla messed it up again. I'll just attach it as a regular text file then...
Welcome to contributing! :-) (In reply to comment #4) > Bugzilla did something funny to my patch and made the diffs of two separate > files merge in to one. Maybe it was because it didn't have any whitespace > between the two. Let me try adding some in The reason Bugzilla is getting confused is that the patch isn't in the correct format, eg it's using: --- js/src/config/nsinstall_win.c +++ js/src/config/nsinstall_win.c.new rather than: --- a/js/src/config/nsinstall_win.c +++ b/js/src/config/nsinstall_win.c To get mercurial to export patches in the most appropriate format, this should help you out: https://developer.mozilla.org/en/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3f When attaching the patch, make sure to pick a reviewer, so that the patch doesn't get missed. You'll need to set the review field to "?" and the email address to whomever you want to ask to review. The best way to pick who to ask is to either look at the hg log and see what r=zzz entries are present (http://hg.mozilla.org/mozilla-central/filelog/tip/config/nsinstall_win.c) or else look at the modules page here: https://wiki.mozilla.org/Modules Hope that helps! :-)
Assignee: nobody → nospam.kotarou.dono
Status: UNCONFIRMED → ASSIGNED
Component: General → Build Config
Ever confirmed: true
QA Contact: general → build-config
Comment on attachment 546297 [details] [diff] [review] Attempted to fix up the patch format Review of attachment 546297 [details] [diff] [review]: -----------------------------------------------------------------
Eh. Guess that didn't work. Could someone give me some more detailed instructions?
That set the reviewer fine - but it was on the old patch, that isn't in the right format. I can manually edit the patch and reupload if you like - but it won't resolve the problem long term. If you take a look at https://developer.mozilla.org/en/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3f and post back if there is anything specific that isn't working :-)
Created attachment 546407 [details] [diff] [review] Another try The thing is, I'm not using Mercurial. I don't have Mercurial and I don't really want to install it. What I'm doing right now is just downloading the "problem" files manually and diffing it against my edited version. I've hand edited it a bit, trying to follow the format of another diff on bugzilla. Hopefully this time it works
(In reply to comment #0) > From Bug #411826, I have worked out that it is because MinGW does not > support wide mains and have created a patch, based on the other bug's patch, > to create a "normal" main and have it wrap around the wide main Things have changed in mingw (BTW, mingw-w64, a fork of mingw, is the right choice for Mozilla compilation). All GCC version that we care about already support wmain. The thing is that it requires -municode switch in linker invocation. It would be great if you could patch Makefile.in to use that switch instead, since we will probably want to remove wrapper hacks anyways.
Comment on attachment 546407 [details] [diff] [review] Another try Assuming it works for you, r=me
Attachment #546407 - Flags: review?(khuey) → review+
Pushed to m-c: http://hg.mozilla.org/mozilla-central/rev/92b574170b33
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
OS: Windows XP → All
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
You need to log in before you can comment on or make changes to this bug.