Index: libroar/vio.c
===================================================================
--- libroar/vio.c	(revision 5276)
+++ libroar/vio.c	(revision 5278)
@@ -56,10 +56,4 @@
  memset((void*)calls, 0, sizeof(struct roar_vio_calls));
 
-/*
- calls->read  = (ssize_t (*)(int fd, void *buf, size_t count,      void * inst))read;
- calls->write = (ssize_t (*)(int fd, void *buf, size_t count,      void * inst))write;
- calls->lseek = (off_t   (*)(int fildes, off_t offset, int whence, void * inst))lseek;
-*/
-
  calls->read     = roar_vio_basic_read;
  calls->write    = roar_vio_basic_write;
@@ -155,8 +149,8 @@
 }
 
-off_t   roar_vio_lseek(struct roar_vio_calls * vio, off_t offset, int whence) {
- off_t ret;
-
- ROAR_DBG("roar_vio_lseek(vio=%p, offset=%u, whence=%i) = ?", vio, (unsigned int)offset, whence);
+roar_off_t   roar_vio_lseek(struct roar_vio_calls * vio, roar_off_t offset, int whence) {
+ roar_off_t ret;
+
+ ROAR_DBG("roar_vio_lseek(vio=%p, offset=%li, whence=%i) = ?", vio, (long int)offset, whence);
 
  if ( vio == NULL ) {
@@ -210,5 +204,5 @@
 }
 
-int     roar_vio_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  int ret;
 
@@ -394,5 +388,5 @@
 }
 
-off_t   roar_vio_basic_lseek(struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   roar_vio_basic_lseek(struct roar_vio_calls * vio, roar_off_t offset, int whence) {
 #ifdef _CAN_OPERATE
  return lseek(roar_vio_get_fh(vio), offset, whence);
@@ -411,5 +405,5 @@
 }
 
-int     roar_vio_basic_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_basic_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
 #ifdef ROAR_HAVE_H_SYS_IOCTL
  struct roar_vio_sysio_ioctl * sysioctl;
@@ -715,5 +709,5 @@
 }
 
-off_t   roar_vio_pass_lseek(struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   roar_vio_pass_lseek(struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  return roar_vio_lseek((struct roar_vio_calls *) vio->inst, offset, whence);
 }
@@ -723,5 +717,5 @@
 }
 
-int     roar_vio_pass_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_pass_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  if (vio == NULL) {
   roar_err_set(ROAR_ERROR_FAULT);
@@ -841,5 +835,5 @@
 
 // TODO: we should do a some more intelgent thing here.
-off_t   roar_vio_re_lseek(struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   roar_vio_re_lseek(struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  return roar_vio_lseek((struct roar_vio_calls *) vio->inst, offset, whence);
 }
Index: libroar/vio_bio.c
===================================================================
--- libroar/vio_bio.c	(revision 4708)
+++ libroar/vio_bio.c	(revision 5278)
@@ -46,5 +46,4 @@
  calls->write    = roar_vio_bio_write;
  calls->lseek    = roar_vio_bio_lseek;
- calls->nonblock = roar_vio_bio_nonblock;
  calls->sync     = roar_vio_bio_sync;
  calls->close    = roar_vio_bio_close;
@@ -82,11 +81,8 @@
 }
 
-off_t   roar_vio_bio_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   roar_vio_bio_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  return -1;
 }
 
-int     roar_vio_bio_nonblock(struct roar_vio_calls * vio, int state) {
- return -1;
-}
 int     roar_vio_bio_sync    (struct roar_vio_calls * vio) {
  return -1;
Index: libroar/vio_buffer.c
===================================================================
--- libroar/vio_buffer.c	(revision 5276)
+++ libroar/vio_buffer.c	(revision 5278)
@@ -146,5 +146,5 @@
  struct roar_vio_buffer * self = vio->inst;
  struct roar_vio_calls  * backend;
- off_t dst = 0;
+ roar_off_t dst = 0;
 
  if ( self->use_re ) {
@@ -182,5 +182,5 @@
 
  // do the seek:
- if ( roar_vio_lseek(backend, dst, SEEK_CUR) == (off_t)-1 )
+ if ( roar_vio_lseek(backend, dst, SEEK_CUR) == (roar_off_t)-1 )
   return -1;
 
@@ -207,9 +207,9 @@
 }
 
-off_t   roar_vio_buffer_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   roar_vio_buffer_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  struct roar_vio_buffer * self = vio->inst;
  size_t newoff;
- off_t  ret;
- off_t  invoff;
+ roar_off_t  ret;
+ roar_off_t  invoff;
 
  // in-memory seeking is only supported for SEEK_CUR:
@@ -286,5 +286,5 @@
  }
 
- if (ret != (off_t)-1)
+ if (ret != (roar_off_t)-1)
   self->abspos = ret;
 
@@ -292,5 +292,5 @@
 }
 
-int     roar_vio_buffer_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_buffer_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct roar_vio_buffer * self;
 
Index: libroar/vio_buffer_store.c
===================================================================
--- libroar/vio_buffer_store.c	(revision 5276)
+++ libroar/vio_buffer_store.c	(revision 5278)
@@ -132,7 +132,7 @@
 }
 
-off_t   roar_vio_buffer_store_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   roar_vio_buffer_store_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  // TODO: implement support to seek forward as wide as the buffer allows us to seek.
- return (off_t)-1;
+ return (roar_off_t)-1;
 }
 
@@ -141,5 +141,5 @@
 }
 
-int     roar_vio_buffer_store_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_buffer_store_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  if (vio == NULL || cmd == -1)
   return -1;
Index: libroar/vio_cmd.c
===================================================================
--- libroar/vio_cmd.c	(revision 5276)
+++ libroar/vio_cmd.c	(revision 5278)
@@ -251,5 +251,4 @@
  calls->read     = roar_vio_2popen_read;
  calls->write    = roar_vio_2popen_write;
- calls->nonblock = roar_vio_2popen_nonblock;
  calls->sync     = roar_vio_2popen_sync;
  calls->ctl      = roar_vio_2popen_ctl;
@@ -536,5 +535,5 @@
 }
 
-int     roar_vio_cmd_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_cmd_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct roar_vio_cmd_state * state = (struct roar_vio_cmd_state *)vio->inst;
  char buf[1];
Index: libroar/vio_jumbo.c
===================================================================
--- libroar/vio_jumbo.c	(revision 5276)
+++ libroar/vio_jumbo.c	(revision 5278)
@@ -120,9 +120,9 @@
 }
 
-off_t   roar_vio_jumbo_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   roar_vio_jumbo_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  struct roar_vio_jumbo * self = vio->inst;
 
  if ( roar_vio_jumbo_sync(vio) == -1 )
-  return (off_t) -1;
+  return (roar_off_t) -1;
 
  return roar_vio_lseek(self->backend, offset, whence);
@@ -148,5 +148,5 @@
 }
 
-int     roar_vio_jumbo_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_jumbo_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct roar_vio_jumbo * self = vio->inst;
 
Index: libroar/vio_magic.c
===================================================================
--- libroar/vio_magic.c	(revision 4708)
+++ libroar/vio_magic.c	(revision 5278)
@@ -36,8 +36,9 @@
 #include "libroar.h"
 
-int     roar_vio_open_magic    (struct roar_vio_calls * calls, struct roar_vio_calls * dst, int * codec);
-int     roar_vio_magic_close   (struct roar_vio_calls * vio);
+#if 0
 
-ssize_t roar_vio_magic_read    (struct roar_vio_calls * vio, void *buf, size_t count) {
+static int     roar_vio_magic_close   (struct roar_vio_calls * vio);
+
+static ssize_t roar_vio_magic_read    (struct roar_vio_calls * vio, void *buf, size_t count) {
  struct roar_vio_magic * self = (struct roar_vio_magic *)(vio->inst);
  struct roar_buffer    * inp;
@@ -75,5 +76,5 @@
 }
 
-ssize_t roar_vio_magic_write   (struct roar_vio_calls * vio, void *buf, size_t count) {
+static ssize_t roar_vio_magic_write   (struct roar_vio_calls * vio, void *buf, size_t count) {
  struct roar_vio_magic * self = (struct roar_vio_magic *)(vio->inst);
  void * calls;
@@ -88,5 +89,5 @@
 }
 
-off_t   roar_vio_magic_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+static roar_off_t   roar_vio_magic_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  struct roar_vio_magic * self = (struct roar_vio_magic *)(vio->inst);
  void * calls;
@@ -101,18 +102,5 @@
 }
 
-int     roar_vio_magic_nonblock(struct roar_vio_calls * vio, int state) {
- struct roar_vio_magic * self = (struct roar_vio_magic *)(vio->inst);
- void * calls;
-
- if (self == NULL)
-  return -1;
-
- if ( roar_stack_get_cur(&(self->vios), &calls) == -1 )
-  return -1;
-
- return roar_vio_nonblock((struct roar_vio_calls*)calls, state);
-}
-
-int     roar_vio_magic_sync    (struct roar_vio_calls * vio) {
+static int     roar_vio_magic_sync    (struct roar_vio_calls * vio) {
  struct roar_vio_magic * self = (struct roar_vio_magic *)(vio->inst);
  void * calls;
@@ -127,3 +115,7 @@
 }
 
+int     roar_vio_open_magic    (struct roar_vio_calls * calls, struct roar_vio_calls * dst, int * codec);
+
+#endif
+
 //ll
Index: libroar/vio_misc.c
===================================================================
--- libroar/vio_misc.c	(revision 5276)
+++ libroar/vio_misc.c	(revision 5278)
@@ -54,5 +54,5 @@
 }
 
-static off_t   roar_vio_misc_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+static roar_off_t   roar_vio_misc_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  (void)vio, (void)offset, (void)whence;
  return 0;
@@ -64,5 +64,5 @@
 }
 
-static int     roar_vio_misc_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+static int     roar_vio_misc_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct roar_vio_misc * self = vio->inst;
 
Index: libroar/vio_pipe.c
===================================================================
--- libroar/vio_pipe.c	(revision 5276)
+++ libroar/vio_pipe.c	(revision 5278)
@@ -195,5 +195,5 @@
 }
 
-int     roar_vio_pipe_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_pipe_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct roar_vio_pipe * self;
 
Index: libroar/vio_proto.c
===================================================================
--- libroar/vio_proto.c	(revision 5276)
+++ libroar/vio_proto.c	(revision 5278)
@@ -120,5 +120,4 @@
  calls->read     = roar_vio_proto_read;
  calls->write    = roar_vio_proto_write;
-// calls->lseek    = roar_vio_proto_lseek; // TODO: this is currently not supported
  calls->sync     = roar_vio_proto_sync;
  calls->ctl      = roar_vio_proto_ctl;
@@ -229,7 +228,4 @@
 }
 
-// TODO: this is currently not implemented as this is hard to implement with buffers:
-off_t   roar_vio_proto_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-
 int     roar_vio_proto_sync    (struct roar_vio_calls * vio) {
  struct roar_vio_proto * self = vio->inst;
@@ -238,5 +234,5 @@
 }
 
-int     roar_vio_proto_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_proto_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct roar_vio_proto * self = vio->inst;
 
Index: libroar/vio_rtp.c
===================================================================
--- libroar/vio_rtp.c	(revision 5276)
+++ libroar/vio_rtp.c	(revision 5278)
@@ -114,5 +114,4 @@
  calls->read               = roar_vio_rtp_read;
  calls->write              = roar_vio_rtp_write;
-// calls->lseek              = roar_vio_rtp_lseek;
  calls->sync               = roar_vio_rtp_sync;
  calls->ctl                = roar_vio_rtp_ctl;
@@ -313,6 +312,4 @@
 }
 
-off_t   roar_vio_rtp_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-
 int     roar_vio_rtp_sync    (struct roar_vio_calls * vio) {
  struct roar_rtp_inst * self = vio->inst;
@@ -323,5 +320,5 @@
 }
 
-int     roar_vio_rtp_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_rtp_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct roar_rtp_inst * self = vio->inst;
  struct roar_stream          * s    = NULL;
Index: libroar/vio_stack.c
===================================================================
--- libroar/vio_stack.c	(revision 5276)
+++ libroar/vio_stack.c	(revision 5278)
@@ -116,5 +116,5 @@
 }
 
-int     roar_vio_stack_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_stack_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  if (vio == NULL || cmd == -1)
   return -1;
@@ -170,5 +170,5 @@
 }
 
-off_t   roar_vio_stack_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   roar_vio_stack_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  if ( vio == NULL )
   return -1;
Index: libroar/vio_stdio.c
===================================================================
--- libroar/vio_stdio.c	(revision 5270)
+++ libroar/vio_stdio.c	(revision 5278)
@@ -131,5 +131,5 @@
 }
 
-off_t   roar_vio_stdio_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   roar_vio_stdio_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
 #if defined(ROAR_HAVE_FSEEK) && defined(ROAR_HAVE_FTELL)
  if ( fseek((FILE*)(vio->inst), offset, whence) == -1 )
@@ -138,5 +138,5 @@
  return ftell((FILE*)(vio->inst));
 #else
- return (off_t)-1;
+ return (roar_off_t)-1;
 #endif
 }
@@ -146,5 +146,5 @@
 }
 
-int     roar_vio_stdio_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_stdio_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
 
  if ( vio == NULL || cmd == -1 )
Index: libroar/vio_stream.c
===================================================================
--- libroar/vio_stream.c	(revision 5276)
+++ libroar/vio_stream.c	(revision 5278)
@@ -44,5 +44,5 @@
 }
 
-static off_t   _vio_stream_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+static roar_off_t   _vio_stream_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  return roar_vio_lseek(roar_get_connection_vio2(vio->inst), offset, whence);
 }
@@ -50,5 +50,5 @@
  return roar_vio_sync(roar_get_connection_vio2(vio->inst));
 }
-static int     _vio_stream_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+static int     _vio_stream_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  if (vio == NULL) {
   roar_err_set(ROAR_ERROR_FAULT);
Index: libroar/vio_string.c
===================================================================
--- libroar/vio_string.c	(revision 4708)
+++ libroar/vio_string.c	(revision 5278)
@@ -67,5 +67,5 @@
  char    cur;
  char    buf[1024];
- off_t   offs;
+ roar_off_t   offs;
  char  * eol;
 
@@ -79,5 +79,5 @@
  size -= 1;
 
- if ( (offs = roar_vio_lseek(vio, 0, SEEK_CUR)) == (off_t)-1 ) {
+ if ( (offs = roar_vio_lseek(vio, 0, SEEK_CUR)) == (roar_off_t)-1 ) {
   // need to use the one byte at a time methode
   while ( have < size ) {
Index: libroar/vio_winsock.c
===================================================================
--- libroar/vio_winsock.c	(revision 5276)
+++ libroar/vio_winsock.c	(revision 5278)
@@ -49,5 +49,5 @@
 }
 
-int     roar_vio_winsock_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_winsock_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  int tmp;
  int s_r = 0, s_w = 0;
Index: libroar/vio_zlib.c
===================================================================
--- libroar/vio_zlib.c	(revision 5276)
+++ libroar/vio_zlib.c	(revision 5278)
@@ -429,8 +429,8 @@
 }
 
-static off_t   roar_vio_zlib_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+static roar_off_t   roar_vio_zlib_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  (void)vio, (void)offset, (void)whence;
  roar_err_set(ROAR_ERROR_NOSYS);
- return (off_t)-1;
+ return (roar_off_t)-1;
 }
 
@@ -447,5 +447,5 @@
 }
 
-static int     roar_vio_zlib_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+static int     roar_vio_zlib_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct roar_vio_gzip * self;
 
