aboutsummaryrefslogtreecommitdiffstats
path: root/src/ioops.h
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-01-03 10:03:34 +0000
committerEric Wong <normalperson@yhbt.net>2008-01-03 10:03:34 +0000
commit7d66859277280e48eb717756cd0b1f50b3ea2054 (patch)
treeb723f02f03da252c4e1dba6e6f7ca55e958e43fc /src/ioops.h
parenta9b581f6c551e783030a8ce54008a772325f71b6 (diff)
downloadmpd-7d66859277280e48eb717756cd0b1f50b3ea2054.tar.gz
mpd-7d66859277280e48eb717756cd0b1f50b3ea2054.tar.xz
mpd-7d66859277280e48eb717756cd0b1f50b3ea2054.zip
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
Diffstat (limited to '')
-rw-r--r--src/ioops.h16
1 files changed, 16 insertions, 0 deletions
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