mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-08-02 19:30:09 +03:00
Add Suport for msys2 enviroment
This commit is contained in:
parent
e50f3129c2
commit
13d352fb18
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
2
setup.py
2
setup.py
|
@ -561,7 +561,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'))
|
||||
|
|
Loading…
Reference in New Issue
Block a user