From 71fdbb13e2d0d28fcecb9e9afc40d244ec9cf0e2 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Wed, 26 Mar 2008 21:17:10 +0000 Subject: [PATCH] strcase wrappers --- include/sigar_private.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/sigar_private.h b/include/sigar_private.h index b77f938f..45ab0df4 100644 --- a/include/sigar_private.h +++ b/include/sigar_private.h @@ -110,6 +110,19 @@ #define strnEQ(s1, s2, n) (strncmp(s1, s2, n) == 0) #endif +#ifdef WIN32 +#define strcasecmp stricmp +#define strncasecmp strnicmp +#endif + +#ifndef strcaseEQ +#define strcaseEQ(s1, s2) (strcasecmp(s1, s2) == 0) +#endif + +#ifndef strncaseEQ +#define strncaseEQ(s1, s2, n) (strncasecmp(s1, s2, n) == 0) +#endif + #ifdef offsetof #define sigar_offsetof offsetof #else