Re: [PATCH] Modify mingw_main() workaround to avoid link errors
- From
Steffen Prohaska <prohaska@zib.de>
- Date
- Jul 26, 2008, 16:07 UTC
- Message-ID
- <65E5BA28-DAB0-4731-A6DA-DBE646367FBF@zib.de>
- In-Reply-To
- <alpine.DEB.1.00.0807261515290.26810@eeepc-johanness>
On Jul 26, 2008, at 3:17 PM, Johannes Schindelin wrote:
Show 6 quoted lines
> On Sat, 26 Jul 2008, Steffen Prohaska wrote: > >> -#define main(c,v) main(int argc, const char **argv) \ >> +#define main(c,v) dummy_decl_mingw_main(); \ > > What is this dummy_*() statement supposed to do?
Avoid compile errors. The original statement is
int main( ...
But we want
static int mingw_main( ...
So we need to first get rid of the original int, before we can start the static decl. We get rid by completing the original int with the dummy_decl_mingw_main(); to a full function decl.
Steffen