summaryrefslogtreecommitdiffstats
path: root/soxwrap/mksocket.h
diff options
context:
space:
mode:
Diffstat (limited to 'soxwrap/mksocket.h')
-rw-r--r--soxwrap/mksocket.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/soxwrap/mksocket.h b/soxwrap/mksocket.h
new file mode 100644
index 0000000..2b74b04
--- /dev/null
+++ b/soxwrap/mksocket.h
@@ -0,0 +1,45 @@
+#ifndef mksocket_h
+#define mksocket_h
+
+#if HAVE_CONFIG_H
+#include "soxwrap/soxwrap_config.h"
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int mksocket(const char *address,
+ const char *service,
+ int socktype,
+ int *fd1,
+ int *fd2,
+ int recycle_fd_func( int(*)(int, void *), void *, void *),
+ void *voidarg);
+
+#if HAVE_SYS_POLL_H
+#include <sys/poll.h>
+#else
+
+#define POLLIN 1
+#define POLLPRI 2
+#define POLLOUT 4
+#define POLLERR 8
+#define POLLHUP 16
+#define POLLNVAL 32
+
+struct pollfd {
+ int fd;
+ short events, revents;
+};
+
+extern int poll(struct pollfd *pfd, unsigned int n, int timeout);
+
+#endif
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif