printf("%u = %u\n", avahi_domain_hash("ccc\\065aa.aa\\.b\\\\."), avahi_domain_hash("cccAaa.aa\\.b\\\\"));
- avahi_service_name_join(t, sizeof(t), "foo.foo.foo \.", "_http._tcp", "test.local");
+ avahi_service_name_join(t, sizeof(t), "foo.foo.foo \\.", "_http._tcp", "test.local");
printf("<%s>\n", t);
avahi_service_name_split(t, name, sizeof(name), type, sizeof(type), domain, sizeof(domain));
printf("name: <%s>; type: <%s>; domain <%s>\n", name, type, domain);
- avahi_service_name_join(t, sizeof(t), NULL, "_http._tcp", "one.two\. .local");
+ avahi_service_name_join(t, sizeof(t), NULL, "_http._tcp", "one.two\\. .local");
printf("<%s>\n", t);
avahi_service_name_split(t, NULL, 0, type, sizeof(type), domain, sizeof(domain));
#include "malloc.h"
+#ifndef va_copy
+#ifdef __va_copy
+#define va_copy(DEST,SRC) __va_copy((DEST),(SRC))
+#else
+#define va_copy(DEST,SRC) memcpy(&(DEST), &(SRC), sizeof(va_list))
+#endif
+#endif
+
static const AvahiAllocator *allocator = NULL;
static void oom(void) AVAHI_GCC_NORETURN;
va_list ap2;
va_copy (ap2, ap);
-
n = vsnprintf(buf, len, fmt, ap2);
-
va_end (ap2);
if (n >= 0 && n < (int) len)