Windows MSVC port

Extend the windows port so it compiles with the toolchain from Visual Studio 2013
This commit is contained in:
stijn
2014-05-05 12:18:27 +02:00
parent c1c32d65af
commit 01d6be4d51
16 changed files with 407 additions and 8 deletions

View File

@@ -1092,8 +1092,11 @@ mpz_t *mpz_gcd(const mpz_t *z1, const mpz_t *z2) {
*/
mpz_t *mpz_lcm(const mpz_t *z1, const mpz_t *z2)
{
if (z1->len == 0 || z2->len == 0)
return mpz_zero();
// braces below are required for compilation to succeed with CL, see bug report
// https://connect.microsoft.com/VisualStudio/feedback/details/864169/compilation-error-when-braces-are-left-out-of-single-line-if-statement
if (z1->len == 0 || z2->len == 0) {
return mpz_zero();
}
mpz_t *gcd = mpz_gcd(z1, z2);
mpz_t *quo = mpz_zero();