I get this build error on attempting to build config/nsinstall_win.c on MinGW:
.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
Created attachment 546295 [details] [diff] [review]
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
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
Bugzilla messed it up again. I'll just attach it as a regular text file then...
Created attachment 546298 [details]
text/plain version of the same patch
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:
To get mercurial to export patches in the most appropriate format, this should help you out:
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! :-)
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]
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]
Assuming it works for you, r=me
Pushed to m-i:
Pushed to m-c: