-/*
- * $Id: util.h,v 1.21 2010/02/28 22:29:16 didg Exp $
- */
-
/*!
* @file
* Netatalk utility functions
#define AFP_PANIC(why) \
do { \
netatalk_panic(why); \
- exit(1); \
+ abort(); \
} while(0);
/* LOG assert errors */
#define AFP_ASSERT(b)
#endif /* NDEBUG */
+#define STRCMP(a,b,c) (strcmp(a,c) b 0)
+
#ifdef WITH_SENDFILE
extern ssize_t sys_sendfile (int __out_fd, int __in_fd, off_t *__offset,size_t __count);
#endif
******************************************************************/
extern int setnonblock(int fd, int cmd);
+extern ssize_t readt(int socket, void *data, const size_t length, int setnonblocking, int timeout);
extern const char *getip_string(const struct sockaddr *sa);
extern unsigned int getip_port(const struct sockaddr *sa);
extern void apply_ip_mask(struct sockaddr *ai, int maskbits);
*****************************************************************/
extern const char *getcwdpath(void);
+extern char *stripped_slashes_basename(char *p);
extern int lchdir(const char *dir);
#endif /* _ATALK_UTIL_H */