2 * $Id: util.h,v 1.2 2001-06-20 14:51:13 rufustfirefly Exp $
6 #define _ATALK_UTIL_H 1
11 #include <netatalk/at.h>
13 extern unsigned const char _diacasemap[], _dialowermap[];
15 extern char **getifacelist(void);
16 extern void freeifacelist(char **);
18 #define diatolower(x) _dialowermap[(x)]
19 #define diatoupper(x) _diacasemap[(x)]
20 extern int atalk_aton __P((char *, struct at_addr *));
21 extern void bprint __P((char *, int));
22 extern int strdiacasecmp __P((const unsigned char *, const unsigned char *));
23 extern int strndiacasecmp __P((const unsigned char *, const unsigned char *,
25 extern pid_t server_lock __P((char * /*program*/, char * /*file*/,
27 #define server_unlock(x) (unlink(x))
30 extern void *mod_open __P((const char *));
31 extern void *mod_symbol __P((void *, const char *));
32 extern void mod_close __P((void *));
33 #define mod_error() ""
34 #else /* ! HAVE_DLFCN_H */
38 #endif /* ! RTLD_NOW */
40 #define mod_open(a) dlopen(a, RTLD_NOW)
42 #ifndef DLSYM_PREPEND_UNDERSCORE
43 #define mod_symbol(a, b) dlsym(a, b)
44 #else /* ! DLSYM_PREPEND_UNDERSCORE */
45 extern void *mod_symbol __P((void *, const char *));
46 #endif /* ! DLSYM_PREPEND_UNDERSCORE */
47 #define mod_error() dlerror()
48 #define mod_close(a) dlclose(a)
49 #endif /* ! HAVE_DLFCN_H */