]> arthur.barton.de Git - netatalk.git/blobdiff - include/atalk/compat.h
Writing metadata xattr on directories with sticky bit set, FR#94
[netatalk.git] / include / atalk / compat.h
index 1c217c4ca752d4e34fc5a552c06ff16e9c2514ba..08e15d798462fae6cedfe0dad8149c4e64203197 100644 (file)
@@ -6,26 +6,15 @@
  * are checks for EINTR everywhere. 
  */
 
-#include <signal.h>
-
+#ifdef HAVE_CONFIG_H
 #include "config.h"
 
+#include <signal.h>
+
 #if defined(ultrix) || defined(_IBMR2) || defined(NEED_GETUSERSHELL)
 extern char *getusershell (void);
 #endif
 
-#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
-# include <stdio.h>
-# include <stdarg.h>
-# ifndef HAVE_SNPRINTF
-int snprintf (char *str,size_t count,const char *fmt,...);
-# endif
-
-# ifndef HAVE_VSNPRINTF
-int vsnprintf(char *str, size_t count, const char *fmt, va_list args);
-# endif
-#endif
-
 /* OpenBSD */
 #if defined(__OpenBSD__) && !defined(ENOTSUP)
 #define ENOTSUP EOPNOTSUPP
@@ -41,11 +30,6 @@ extern int pselect(int, fd_set * restrict, fd_set * restrict,
 extern int flock (int, int);
 #endif
 
-#ifndef HAVE_INET_ATON
-struct in_addr;
-extern int inet_aton(const char *, struct in_addr *);
-#endif
-
 #ifndef HAVE_STRNLEN
 extern size_t strnlen(const char *s, size_t n);
 #endif
@@ -58,3 +42,10 @@ extern size_t strlcpy (char *, const char *, size_t);
 extern size_t strlcat (char *, const char *, size_t);
 #endif
 
+#ifndef HAVE_VASPRINTF
+#include <stdio.h>
+#include <stdarg.h>
+extern int vasprintf(char **ret, const char *fmt, va_list ap);
+#endif
+
+#endif