]> arthur.barton.de Git - netatalk.git/commitdiff
talloc build fixes
authorFrank Lahm <franklahm@googlemail.com>
Fri, 25 May 2012 10:26:18 +0000 (12:26 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Wed, 15 Aug 2012 18:11:09 +0000 (20:11 +0200)
libatalk/talloc/talloc.c

index 5ea07918cfd8218115cbdefb1cfb88cd200db0a9..fdf0198783a94e6a5fb644412575e17be93927e5 100644 (file)
   inspired by http://swapped.cc/halloc/
 */
 
-#include "replace.h"
+#include "config.h"
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <string.h>
+
+#include <atalk/compat.h>
+#include <atalk/util.h>
+
 #include "talloc.h"
 
+#define _PUBLIC_ extern
+
+/** 
+ * pointer difference macro 
+ */
+#define PTR_DIFF(p1,p2) ((ptrdiff_t)(((const char *)(p1)) - (const char *)(p2)))
+
+
 #ifdef TALLOC_BUILD_VERSION_MAJOR
 #if (TALLOC_VERSION_MAJOR != TALLOC_BUILD_VERSION_MAJOR)
 #error "TALLOC_VERSION_MAJOR != TALLOC_BUILD_VERSION_MAJOR"
@@ -2054,14 +2071,6 @@ _PUBLIC_ char *talloc_strndup_append_buffer(char *s, const char *a, size_t n)
        return __talloc_strlendup_append(s, slen, a, strnlen(a, n));
 }
 
-#ifndef HAVE_VA_COPY
-#ifdef HAVE___VA_COPY
-#define va_copy(dest, src) __va_copy(dest, src)
-#else
-#define va_copy(dest, src) (dest) = (src)
-#endif
-#endif
-
 _PUBLIC_ char *talloc_vasprintf(const void *t, const char *fmt, va_list ap)
 {
        int len;