CONPY-189: Windows build fix for Visual Studio 2022

- Build parameters are now written to config_win.h instead of passing
  them as command line parameters
- Fixed several compiler warnings
This commit is contained in:
Georg Richter
2021-12-21 08:16:02 +01:00
parent aaba6e2e11
commit a839827f59
5 changed files with 14 additions and 9 deletions

View File

@ -392,10 +392,10 @@ static PyObject *Mrdb_GetTimeDelta(MYSQL_TIME *tm)
{
int days, hour, minute, second, second_part;
hour= (tm->neg) ? -tm->hour : tm->hour;
minute= (tm->neg) ? -tm->minute : tm->minute;
second= (tm->neg) ? -tm->second : tm->second;
second_part= (tm->neg) ? -tm->second_part : tm->second_part;
hour= (tm->neg) ? -1 * tm->hour : tm->hour;
minute= (tm->neg) ? -1 * tm->minute : tm->minute;
second= (tm->neg) ? -1 * tm->second : tm->second;
second_part= (tm->neg) ? -1 * tm->second_part : tm->second_part;
days= hour / 24;
hour= hour % 24;
@ -1432,7 +1432,7 @@ int clock_gettime(int dummy, struct timespec *ct)
}
ct->tv_sec = count.QuadPart / g_counts_per_sec.QuadPart;
ct->tv_nsec = ((count.QuadPart % g_counts_per_sec.QuadPart) * 1E09) / g_counts_per_sec.QuadPart;
ct->tv_nsec = (long)(((count.QuadPart % g_counts_per_sec.QuadPart) * 1E09) / g_counts_per_sec.QuadPart);
return 0;
}