mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 15:42:26 +02:00
Add wrappers to reduce #ifdefs.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
This commit is contained in:
parent
c00d4753ae
commit
12e2c46d6a
5 changed files with 37 additions and 55 deletions
|
|
@ -7,7 +7,17 @@ int capsicum_net_gethostbyname(const char *addr, IPADDR *ip4, IPADDR *ip6);
|
|||
int capsicum_open(const char *path, int flags, int mode);
|
||||
void capsicum_mkdir_with_parents(const char *path, int mode);
|
||||
|
||||
#ifdef HAVE_CAPSICUM
|
||||
int capsicum_open_wrapper(const char *path, int flags, int mode);
|
||||
void capsicum_mkdir_with_parents_wrapper(const char *path, int mode);
|
||||
#else
|
||||
#define capsicum_open_wrapper(P, F, M) \
|
||||
open(P, F, M)
|
||||
#define capsicum_mkdir_with_parents_wrapper(P, M) \
|
||||
g_mkdir_with_parents(P, M)
|
||||
#endif
|
||||
|
||||
void capsicum_init(void);
|
||||
void capsicum_deinit(void);
|
||||
|
||||
#endif
|
||||
#endif /* !__CAPSICUM_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue