[PATCH 0/2] mingw: macro main(), const warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

mingw.h defines a preprocessor macro main(), so that it can wrap the
original function and hoook into initialization.

The real main() function can have different types of its second
parameter (char**, const char**, char*[]).  It is not easy to match
the type and gcc issues a const warning.  My patch fixes that.

There were solutions for the same issue published ([1], [2]), but
none of them appeared in junio/pu.  This new solution should be more
future proof, as it modifies only compat/mingw.h; the *.c files can
have any of the types mentioned above.

I promise to take care of the integration into msysGit if this patch
gets accepted.  To make it easier, I'm submitting a patch that has
been part of msysGit for 3 years.

Karsten Blees (1):
  Win32: move main macro to a function

Stepan Kasal (1):
  mingw: avoid const warning

 compat/mingw.c | 15 +++++++++++++++
 compat/mingw.h | 17 ++++++-----------
 2 files changed, 21 insertions(+), 11 deletions(-)

-- 
1.9.2.msysgit.0.496.g23aa553

[1] a hack to fix the warning, by Pat Thoyts, in msysGit since
1.8.5.2.msysgit.0 (Dec 2013):
https://github.com/msysgit/git/commit/6949537a

[2] more elgant fix:
From: Marat Radchenko <marat@xxxxxxxxxxxxxxxx>
Date: Tue, 29 Apr 2014 13:12:02 +0400
http://article.gmane.org/gmane.comp.version-control.git/247535
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]