pkgsrc/comms/synce-rra/patches/patch-ah
rillig 6a59efc1e3 Fixed the compiler warnings (here with -Werror) the proper way, by doing
the type casts just before calling the <ctype.h> functions.
2007-10-10 17:12:51 +00:00

22 lines
802 B
Text

$NetBSD: patch-ah,v 1.1 2007/10/10 17:12:52 rillig Exp $
--- lib/contact.c.orig 2007-10-10 17:04:00.000000000 +0000
+++ lib/contact.c 2007-10-10 17:05:37.000000000 +0000
@@ -704,7 +704,7 @@ typedef enum _VcardState
#define myisblank(c) ((c) == ' ' || (c) == '\t')
#define myisnewline(c) ((c) == '\n' || (c) == '\r')
-
+#define myisxdigit(c) isdigit((unsigned char)(c))
#define STR_EQUAL(a,b) (0 == strcasecmp(a,b))
#define STR_IN_STR(haystack, needle) (0 != strcasestr(haystack, needle))
@@ -755,7 +755,7 @@ static char* strdup_quoted_printable(con
{
if ('=' == source[0])
{
- if (isxdigit(source[1]) && isxdigit(source[2]))
+ if (myisxdigit(source[1]) && myisxdigit(source[2]))
{
char hex[3] = {source[1], source[2], '\0'};
*dest++ = strtol(hex, NULL, 16);