#include <atalk/unicode.h>
#include <atalk/bstrlib.h>
+#include <atalk/cnid.h>
/* exit error codes */
#define EXITERR_CLNT 1 /* client related error */
#define MIN(a,b) ((a) < (b) ? a : b)
#endif
-#if BYTE_ORDER == BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
#define hton64(x) (x)
#define ntoh64(x) (x)
-#else /* BYTE_ORDER == BIG_ENDIAN */
+#else
#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 */
+#endif
#ifdef WITH_SENDFILE
extern ssize_t sys_sendfile (int __out_fd, int __in_fd, off_t *__offset,size_t __count);
extern int lchdir(const char *dir);
extern void randombytes(void *buf, int n);
extern int daemonize(int nochdir, int noclose);
+extern int run_cmd(const char *cmd, char **cmd_argv);
+extern char *realpath_safe(const char *path);
+extern const char *basename_safe(const char *path);
/******************************************************************
* cnid.c
*****************************************************************/
extern bstring rel_path_in_vol(const char *path, const char *volpath);
+extern cnid_t cnid_for_path(struct _cnid_db *cdb, const char *volpath, const char *path, cnid_t *did);
+
+/******************************************************************
+ * cnid.c
+ *****************************************************************/
+
+extern void initline (int, char *);
+extern int parseline (int, char *);
#endif /* _ATALK_UTIL_H */