diff --git a/psycopg/win32_support.c b/psycopg/win32_support.c index 7a9c8b88..de90e9af 100644 --- a/psycopg/win32_support.c +++ b/psycopg/win32_support.c @@ -30,7 +30,6 @@ #ifdef _WIN32 -#ifndef __MINGW32__ /* millisecond-precision port of gettimeofday for Win32, taken from src/port/gettimeofday.c in PostgreSQL core */ @@ -61,7 +60,7 @@ gettimeofday(struct timeval * tp, void * tzp) return 0; } -/* timeradd missing on MS VC */ +/* timeradd missing on MS VC and mingw */ void timeradd(struct timeval *a, struct timeval *b, struct timeval *c) { @@ -72,7 +71,6 @@ timeradd(struct timeval *a, struct timeval *b, struct timeval *c) c->tv_sec += 1; } } -#endif /* !defined(__MINGW32__) */ /* timersub is missing on mingw & MS VC */ void diff --git a/psycopg/win32_support.h b/psycopg/win32_support.h index b463141e..408c7697 100644 --- a/psycopg/win32_support.h +++ b/psycopg/win32_support.h @@ -36,11 +36,8 @@ #ifdef _WIN32 -#ifndef __MINGW32__ extern HIDDEN int gettimeofday(struct timeval * tp, void * tzp); extern HIDDEN void timeradd(struct timeval *a, struct timeval *b, struct timeval *c); -#elif -#endif extern HIDDEN void timersub(struct timeval *a, struct timeval *b, struct timeval *c); #endif diff --git a/setup.py b/setup.py index ec2b5ae0..a1ce452c 100644 --- a/setup.py +++ b/setup.py @@ -599,7 +599,7 @@ else: if not PLATFORM_IS_WINDOWS: define_macros.append(('PSYCOPG_VERSION', '"' + PSYCOPG_VERSION_EX + '"')) else: - define_macros.append(('PSYCOPG_VERSION', '\\"' + PSYCOPG_VERSION_EX + '\\"')) + define_macros.append(('PSYCOPG_VERSION', '\"' + PSYCOPG_VERSION_EX + '\"')) if parser.has_option('build_ext', 'have_ssl'): have_ssl = int(parser.get('build_ext', 'have_ssl'))