diff options
author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2017-07-29 12:28:49 +0100 |
---|---|---|
committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2017-07-29 23:52:23 +0100 |
commit | 12e2c46d6a778f131c1ca6a7134af1cd5e722dbe (patch) | |
tree | 8ebb4c7498933f3f9ad169be7e67ef1e6745b220 /src/core/capsicum.h | |
parent | c00d4753aee732b5a815f12dda3c9fced41ef1f5 (diff) | |
download | irssi-12e2c46d6a778f131c1ca6a7134af1cd5e722dbe.zip |
Add wrappers to reduce #ifdefs.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
Diffstat (limited to 'src/core/capsicum.h')
-rw-r--r-- | src/core/capsicum.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/capsicum.h b/src/core/capsicum.h index 1eb56402..3c1234e1 100644 --- a/src/core/capsicum.h +++ b/src/core/capsicum.h @@ -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 */ |