From 7d66859277280e48eb717756cd0b1f50b3ea2054 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 3 Jan 2008 10:03:34 +0000 Subject: ioops: make this zero-impact when compiling w/o zeroconf as well This reduces the text size of the binary slightly when zeroconf support is not built, and keeps the interface code cleaner as well. git-svn-id: https://svn.musicpd.org/mpd/trunk@7133 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/ioops.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/ioops.h') diff --git a/src/ioops.h b/src/ioops.h index 642ea79c7..6b23b0940 100644 --- a/src/ioops.h +++ b/src/ioops.h @@ -19,8 +19,10 @@ #ifndef IOOPS_H #define IOOPS_H +#include "../config.h" #include "os_compat.h" +#ifdef HAVE_ZEROCONF struct ioOps { struct ioOps *prev, *next; @@ -49,4 +51,18 @@ void registerIO(struct ioOps *ops); /* Call this to deregister your io operation handler struct */ void deregisterIO(struct ioOps *ops); +/* Add fds for all registered IO handlers */ +void registered_IO_add_fds(int *fdmax, + fd_set * rfds, fd_set * wfds, fd_set * efds); + +/* Consume fds for all registered IO handlers */ +void registered_IO_consume_fds(int *selret, + fd_set * rfds, fd_set * wfds, fd_set * efds); +#else /* ! HAVE_ZEROCONF */ + +#define registered_IO_add_fds(fdmax,rfds,wfds,efds) +#define registered_IO_consume_fds(selret,rfds,wfds,efds) + +#endif /* HAVE_ZEROCONF */ + #endif -- cgit v1.2.3