]> arthur.barton.de Git - netatalk.git/blobdiff - include/atalk/util.h
Merge branch-2-1
[netatalk.git] / include / atalk / util.h
index 457b0c8a97a9dda25f01750705a06b6f50c417b1..811c0ee661a6af7316b51a045034fd654b464447 100644 (file)
@@ -18,7 +18,9 @@
 #endif /* HAVE_UNISTD_H */
 #include <poll.h>
 #include <netatalk/at.h>
+
 #include <atalk/unicode.h>
+#include <atalk/bstrlib.h>
 
 /* exit error codes */
 #define EXITERR_CLNT 1  /* client related error */
 
 #define STRCMP(a,b,c) (strcmp(a,c) b 0)
 
+#if BYTE_ORDER == BIG_ENDIAN
+#define hton64(x)       (x)
+#define ntoh64(x)       (x)
+#else /* BYTE_ORDER == BIG_ENDIAN */
+#define hton64(x)       ((uint64_t) (htonl(((x) >> 32) & 0xffffffffLL)) | \
+                         (uint64_t) ((htonl(x) & 0xffffffffLL) << 32))
+#define ntoh64(x)       (hton64(x))
+#endif /* BYTE_ORDER == BIG_ENDIAN */
+
 #ifdef WITH_SENDFILE
 extern ssize_t sys_sendfile (int __out_fd, int __in_fd, off_t *__offset,size_t __count);
 #endif
@@ -167,3 +178,9 @@ extern char *stripped_slashes_basename(char *p);
 extern int lchdir(const char *dir);
 extern void randombytes(void *buf, int n);
 #endif  /* _ATALK_UTIL_H */
+
+/******************************************************************
+ * cnid.c
+ *****************************************************************/
+
+extern bstring rel_path_in_vol(const char *path, const char *volpath);