Skip to content
Browse files

No strcasecmp function with MSVC

The MSVC compiler does not have the strcasecmp(x, y) function, which is a
case insensitve string compare function.  Instead, MSVC has a similar function,
lstrcmpi(x, y).  Modified config.h to use this function when building with
MSVC.
  • Loading branch information...
1 parent 442a060 commit dd7ee7093a54213cb5e39fe65a085019f11f5593 @jerickso jerickso committed with Jun 5, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 psycopg/config.h
View
2 psycopg/config.h
@@ -136,6 +136,8 @@ static int pthread_mutex_init(pthread_mutex_t *mutex, void* fake)
* in libxml2 code */
#define isinf(x) ((_fpclass(x) == _FPCLASS_PINF) ? 1 \
: ((_fpclass(x) == _FPCLASS_NINF) ? -1 : 0))
+
+#define strcasecmp(x, y) lstrcmpi(x, y)
#endif
#endif

0 comments on commit dd7ee70

Please sign in to comment.
Something went wrong with that request. Please try again.