Windows MSVC: Fix Compiler Warning: getpid

Fix a compiler warning when using PSYCOPG_DEBUG on MSVC where getpid is
undefined.
This commit is contained in:
Jason Erickson 2011-02-23 15:16:35 -07:00 committed by Daniele Varrazzo
parent 631883f62f
commit 961e855bbd

View File

@ -51,6 +51,10 @@ extern HIDDEN int psycopg_debug_enabled;
#else /* !__GNUC__ or __APPLE__ */ #else /* !__GNUC__ or __APPLE__ */
#ifdef PSYCOPG_DEBUG #ifdef PSYCOPG_DEBUG
#include <stdarg.h> #include <stdarg.h>
#ifdef _WIN32
#include <process.h>
#define getpid _getpid
#endif
static void Dprintf(const char *fmt, ...) static void Dprintf(const char *fmt, ...)
{ {
va_list ap; va_list ap;