head 1.4; access; symbols pkgsrc-2026Q2:1.4.0.2 pkgsrc-2026Q2-base:1.4 pkgsrc-2026Q1:1.3.0.118 pkgsrc-2026Q1-base:1.3 pkgsrc-2025Q4:1.3.0.116 pkgsrc-2025Q4-base:1.3 pkgsrc-2025Q3:1.3.0.114 pkgsrc-2025Q3-base:1.3 pkgsrc-2025Q2:1.3.0.112 pkgsrc-2025Q2-base:1.3 pkgsrc-2025Q1:1.3.0.110 pkgsrc-2025Q1-base:1.3 pkgsrc-2024Q4:1.3.0.108 pkgsrc-2024Q4-base:1.3 pkgsrc-2024Q3:1.3.0.106 pkgsrc-2024Q3-base:1.3 pkgsrc-2024Q2:1.3.0.104 pkgsrc-2024Q2-base:1.3 pkgsrc-2024Q1:1.3.0.102 pkgsrc-2024Q1-base:1.3 pkgsrc-2023Q4:1.3.0.100 pkgsrc-2023Q4-base:1.3 pkgsrc-2023Q3:1.3.0.98 pkgsrc-2023Q3-base:1.3 pkgsrc-2023Q2:1.3.0.96 pkgsrc-2023Q2-base:1.3 pkgsrc-2023Q1:1.3.0.94 pkgsrc-2023Q1-base:1.3 pkgsrc-2022Q4:1.3.0.92 pkgsrc-2022Q4-base:1.3 pkgsrc-2022Q3:1.3.0.90 pkgsrc-2022Q3-base:1.3 pkgsrc-2022Q2:1.3.0.88 pkgsrc-2022Q2-base:1.3 pkgsrc-2022Q1:1.3.0.86 pkgsrc-2022Q1-base:1.3 pkgsrc-2021Q4:1.3.0.84 pkgsrc-2021Q4-base:1.3 pkgsrc-2021Q3:1.3.0.82 pkgsrc-2021Q3-base:1.3 pkgsrc-2021Q2:1.3.0.80 pkgsrc-2021Q2-base:1.3 pkgsrc-2021Q1:1.3.0.78 pkgsrc-2021Q1-base:1.3 pkgsrc-2020Q4:1.3.0.76 pkgsrc-2020Q4-base:1.3 pkgsrc-2020Q3:1.3.0.74 pkgsrc-2020Q3-base:1.3 pkgsrc-2020Q2:1.3.0.70 pkgsrc-2020Q2-base:1.3 pkgsrc-2020Q1:1.3.0.50 pkgsrc-2020Q1-base:1.3 pkgsrc-2019Q4:1.3.0.72 pkgsrc-2019Q4-base:1.3 pkgsrc-2019Q3:1.3.0.68 pkgsrc-2019Q3-base:1.3 pkgsrc-2019Q2:1.3.0.66 pkgsrc-2019Q2-base:1.3 pkgsrc-2019Q1:1.3.0.64 pkgsrc-2019Q1-base:1.3 pkgsrc-2018Q4:1.3.0.62 pkgsrc-2018Q4-base:1.3 pkgsrc-2018Q3:1.3.0.60 pkgsrc-2018Q3-base:1.3 pkgsrc-2018Q2:1.3.0.58 pkgsrc-2018Q2-base:1.3 pkgsrc-2018Q1:1.3.0.56 pkgsrc-2018Q1-base:1.3 pkgsrc-2017Q4:1.3.0.54 pkgsrc-2017Q4-base:1.3 pkgsrc-2017Q3:1.3.0.52 pkgsrc-2017Q3-base:1.3 pkgsrc-2017Q2:1.3.0.48 pkgsrc-2017Q2-base:1.3 pkgsrc-2017Q1:1.3.0.46 pkgsrc-2017Q1-base:1.3 pkgsrc-2016Q4:1.3.0.44 pkgsrc-2016Q4-base:1.3 pkgsrc-2016Q3:1.3.0.42 pkgsrc-2016Q3-base:1.3 pkgsrc-2016Q2:1.3.0.40 pkgsrc-2016Q2-base:1.3 pkgsrc-2016Q1:1.3.0.38 pkgsrc-2016Q1-base:1.3 pkgsrc-2015Q4:1.3.0.36 pkgsrc-2015Q4-base:1.3 pkgsrc-2015Q3:1.3.0.34 pkgsrc-2015Q3-base:1.3 pkgsrc-2015Q2:1.3.0.32 pkgsrc-2015Q2-base:1.3 pkgsrc-2015Q1:1.3.0.30 pkgsrc-2015Q1-base:1.3 pkgsrc-2014Q4:1.3.0.28 pkgsrc-2014Q4-base:1.3 pkgsrc-2014Q3:1.3.0.26 pkgsrc-2014Q3-base:1.3 pkgsrc-2014Q2:1.3.0.24 pkgsrc-2014Q2-base:1.3 pkgsrc-2014Q1:1.3.0.22 pkgsrc-2014Q1-base:1.3 pkgsrc-2013Q4:1.3.0.20 pkgsrc-2013Q4-base:1.3 pkgsrc-2013Q3:1.3.0.18 pkgsrc-2013Q3-base:1.3 pkgsrc-2013Q2:1.3.0.16 pkgsrc-2013Q2-base:1.3 pkgsrc-2013Q1:1.3.0.14 pkgsrc-2013Q1-base:1.3 pkgsrc-2012Q4:1.3.0.12 pkgsrc-2012Q4-base:1.3 pkgsrc-2012Q3:1.3.0.10 pkgsrc-2012Q3-base:1.3 pkgsrc-2012Q2:1.3.0.8 pkgsrc-2012Q2-base:1.3 pkgsrc-2012Q1:1.3.0.6 pkgsrc-2012Q1-base:1.3 pkgsrc-2011Q4:1.3.0.4 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q3:1.3.0.2 pkgsrc-2011Q3-base:1.3 pkgsrc-2011Q2:1.2.0.34 pkgsrc-2011Q2-base:1.2 pkgsrc-2011Q1:1.2.0.32 pkgsrc-2011Q1-base:1.2 pkgsrc-2010Q4:1.2.0.30 pkgsrc-2010Q4-base:1.2 pkgsrc-2010Q3:1.2.0.28 pkgsrc-2010Q3-base:1.2 pkgsrc-2010Q2:1.2.0.26 pkgsrc-2010Q2-base:1.2 pkgsrc-2010Q1:1.2.0.24 pkgsrc-2010Q1-base:1.2 pkgsrc-2009Q4:1.2.0.22 pkgsrc-2009Q4-base:1.2 pkgsrc-2009Q3:1.2.0.20 pkgsrc-2009Q3-base:1.2 pkgsrc-2009Q2:1.2.0.18 pkgsrc-2009Q2-base:1.2 pkgsrc-2009Q1:1.2.0.16 pkgsrc-2009Q1-base:1.2 pkgsrc-2008Q4:1.2.0.14 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.12 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.10 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.8 pkgsrc-2008Q2-base:1.2 cwrapper:1.2.0.6 pkgsrc-2008Q1:1.2.0.4 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.2 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.1.1.1.0.4 pkgsrc-2007Q3-base:1.1.1.1 pkgsrc-2007Q2:1.1.1.1.0.2 pkgsrc-2007Q2-base:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.4 date 2026.06.16.12.35.00; author nia; state Exp; branches; next 1.3; commitid 08aWnyN2SG7cn1KG; 1.3 date 2011.07.21.15.35.55; author joerg; state Exp; branches; next 1.2; 1.2 date 2007.12.11.06.04.02; author yyamano; state Exp; branches; next 1.1; 1.1 date 2007.05.23.12.44.40; author markd; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2007.05.23.12.44.40; author markd; state Exp; branches; next ; desc @@ 1.4 log @libopensync: Various build fixes. Improve the handling of non-POSIX iconv, detect a GNU libiconv, and fix an implicit function declaration. This is important for NetBSD with newer GCC. Verified to build on FreeBSD, macOS, Linux, NetBSD, OpenBSD. @ text @$NetBSD: patch-aa,v 1.3 2011/07/21 15:35:55 joerg Exp $ --- formats/vformats-xml/vformat.c.orig 2007-03-27 11:49:27.000000000 +0000 +++ formats/vformats-xml/vformat.c @@@@ -26,6 +26,17 @@@@ #include "config.h" #endif +#if defined(__NetBSD__) +#include +#if __NetBSD_Prereq__(9,99,17) +#define NETBSD_POSIX_ICONV 1 +#endif +#endif + +#if (!defined(SOLARIS) && !defined(__NetBSD__)) || defined(NETBSD_POSIX_ICONV) || defined(_LIBICONV_VERSION) +#define HAS_POSIX_ICONV +#endif + #include #include #include @@@@ -236,7 +247,7 @@@@ static void _read_attribute_value_add (VFormatAttribut if (charset) { cd = iconv_open("UTF-8", charset->str); -#ifdef SOLARIS +#ifndef HAS_POSIX_ICONV if (iconv(cd, (const char**)&inbuf, &inbytesleft, &p, &outbytesleft) != (size_t)(-1)) { #else if (iconv(cd, &inbuf, &inbytesleft, &p, &outbytesleft) != (size_t)(-1)) { @@@@ -264,7 +275,7 @@@@ static void _read_attribute_value_add (VFormatAttribut /* because inbuf is not UTF-8, we think it is ISO-8859-1 */ cd = iconv_open("UTF-8", "ISO-8859-1"); -#ifdef SOLARIS +#ifndef HAS_POSIX_ICONV if (iconv(cd, (const char**)&inbuf, &inbytesleft, &p, &outbytesleft) != (size_t)(-1)) { #else if (iconv(cd, &inbuf, &inbytesleft, &p, &outbytesleft) != (size_t)(-1)) { @@@@ -302,8 +313,8 @@@@ static void _read_attribute_value (VFormatAttribute *a if ((a = *(++lp)) == '\0') break; if ((b = *(++lp)) == '\0') break; - if (isalnum(a)) { - if (isalnum(b)) { + if (isalnum((unsigned char)a)) { + if (isalnum((unsigned char)b)) { /* e.g. ...N=C3=BCrnberg\r\n * ^^^ */ @@@@ -317,7 +328,7 @@@@ static void _read_attribute_value (VFormatAttribute *a * ^ */ char *tmplp = lp; - if (*(++tmplp) == '\r' && *(++tmplp) == '\n' && isalnum(*(++tmplp))) { + if (*(++tmplp) == '\r' && *(++tmplp) == '\n' && isalnum((unsigned char)*(++tmplp))) { x1 = a; x2 = *tmplp; lp = tmplp; @@@@ -336,7 +347,7 @@@@ static void _read_attribute_value (VFormatAttribute *a c = *(++tmplp); d = *(++tmplp); e = *(++tmplp); - if (b == '\r' && c == '\n' && isalnum(d) && isalnum(e)) { + if (b == '\r' && c == '\n' && isalnum((unsigned char)d) && isalnum((unsigned char)e)) { x1 = d; x2 = e; lp = tmplp; @@@@ -357,8 +368,8 @@@@ static void _read_attribute_value (VFormatAttribute *a if (x1 && x2) { char c; - a = tolower (x1); - b = tolower (x2); + a = tolower ((unsigned char)x1); + b = tolower ((unsigned char)x2); c = (((a>='a'?a-'a'+10:a-'0')&0x0f) << 4) | ((b>='a'?b-'a'+10:b-'0')&0x0f); @@@@ -1751,11 +1762,11 @@@@ static const char *base64_alphabet = "ABCDEFGHIJKLMNOP //static unsigned char _evc_base64_rank[256]; -static void base64_init(char *rank) +static void base64_init(char *rank, size_t len) { int i; - memset(rank, 0xff, sizeof(rank)); + memset(rank, 0xff, len); for (i=0;i<64;i++) { rank[(unsigned int)base64_alphabet[i]] = i; } @@@@ -1880,7 +1891,7 @@@@ static size_t base64_decode_step(unsigned char *in, si static size_t base64_decode_step(unsigned char *in, size_t len, unsigned char *out, int *state, unsigned int *save) { unsigned char base64_rank[256]; - base64_init((char*)base64_rank); + base64_init((char*)base64_rank, sizeof(base64_rank)); register unsigned char *inptr, *outptr; unsigned char *inend, c; @ 1.3 log @Fix a bunch of real world bugs that clang warns about. Fix up fix for ctype usage to actually do the right thing, not just stop the warning. Bump revision. @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.2 2007/12/11 06:04:02 yyamano Exp $ d3 1 a3 1 --- formats/vformats-xml/vformat.c.orig 2007-03-27 20:49:27.000000000 +0900 d5 19 a23 1 @@@@ -236,7 +236,7 @@@@ static void _read_attribute_value_add (V d28 1 a28 1 +#if defined(SOLARIS) || defined(__NetBSD__) || defined(__APPLE__) d32 1 a32 1 @@@@ -264,7 +264,7 @@@@ static void _read_attribute_value_add (V d37 1 a37 1 +#if defined(SOLARIS) || defined(__NetBSD__) || defined(__APPLE__) d41 1 a41 1 @@@@ -302,8 +302,8 @@@@ static void _read_attribute_value (VForm d52 1 a52 1 @@@@ -317,7 +317,7 @@@@ static void _read_attribute_value (VForm d61 1 a61 1 @@@@ -336,7 +336,7 @@@@ static void _read_attribute_value (VForm d70 1 a70 1 @@@@ -357,8 +357,8 @@@@ static void _read_attribute_value (VForm d81 1 a81 1 @@@@ -1751,11 +1751,11 @@@@ static const char *base64_alphabet = "AB d95 1 a95 1 @@@@ -1880,7 +1880,7 @@@@ static size_t base64_encode_step(unsigne @ 1.2 log @Make this build on Darwin. @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.1.1.1 2007/05/23 12:44:40 markd Exp $ d29 2 a30 2 + if (isalnum((int)a)) { + if (isalnum((int)b)) { d39 1 a39 1 + if (*(++tmplp) == '\r' && *(++tmplp) == '\n' && isalnum((int)*(++tmplp))) { d48 1 a48 1 + if (b == '\r' && c == '\n' && isalnum((int)d) && isalnum((int)e)) { d58 2 a59 2 + a = tolower ((int)x1); + b = tolower ((int)x2); d63 23 @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD$ d3 1 a3 1 --- formats/vformats-xml/vformat.c.orig 2007-03-27 23:49:27.000000000 +1200 d10 1 a10 1 +#if defined(SOLARIS) || defined(__NetBSD__) d19 1 a19 1 +#if defined(SOLARIS) || defined(__NetBSD__) @ 1.1.1.1 log @Initial import libopensync version 0.22 OpenSync is a synchronization framework that is platform and distribution independent. It consists of a powerful sync-engine and several plugins that can be used to connect to devices. OpenSync is very flexible and capable of synchronizing any type of data, including contacts, calendar, tasks, notes and files. @ text @@