[vlc-devel] commit: Revert "poll(): ifndef HAVE_POLL means we don't use poll(), not that it doesn't exist. In OSX poll() is broken for sockets, so we don' t use it. Since poll is a kernel function in OSX however, the kernel implementation was used whenever we used poll(), instead of VLCs private poll() which was the intended behaviour. Renamed poll() to vlc_poll() to prevent this." (Derk-Jan Hartman )

git version control git at videolan.org
Wed Aug 6 18:07:18 CEST 2008


vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Wed Aug  6 18:09:50 2008 +0200| [2d652d01aaf909885fef474d2e3467dd6d56d083] | committer: Derk-Jan Hartman 

Revert "poll(): ifndef HAVE_POLL means we don't use poll(), not that it doesn't exist. In OSX poll() is broken for sockets, so we don't use it. Since poll is a kernel function in OSX however, the kernel implementation was used whenever we used poll(), instead of VLCs private poll() which was the intended behaviour. Renamed poll() to vlc_poll() to prevent this."

This reverts commit d934fc525f6be873a56c54dd97d0aa8f5fead910.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2d652d01aaf909885fef474d2e3467dd6d56d083
---

 include/vlc_fixups.h  |    4 ----
 include/vlc_network.h |    2 +-
 src/extras/libc.c     |    7 +------
 src/libvlc.h          |    4 ----
 src/libvlccore.sym    |    2 +-
 src/network/poll.c    |    2 +-
 6 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 1c20492..df250fc 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -235,8 +235,4 @@ typedef void *locale_t;
 #define N_(str) gettext_noop (str)
 #define gettext_noop(str) (str)
 
-#ifndef HAVE_POLL
-#define poll vlc_poll
-#endif
-
 #endif /* !LIBVLC_FIXUPS_H */
diff --git a/include/vlc_network.h b/include/vlc_network.h
index bdba45f..aca2b0a 100644
--- a/include/vlc_network.h
+++ b/include/vlc_network.h
@@ -181,7 +181,7 @@ struct pollfd
     int revents;
 };
 
-  VLC_EXPORT (int, vlc_poll, (struct pollfd *fds, unsigned nfds, int timeout));
+  VLC_EXPORT (int, poll, (struct pollfd *fds, unsigned nfds, int timeout));
 #endif
 
 #ifdef WIN32
diff --git a/src/extras/libc.c b/src/extras/libc.c
index 77db6ef..f58f05f 100644
--- a/src/extras/libc.c
+++ b/src/extras/libc.c
@@ -58,12 +58,7 @@
 #   include <sys/wait.h>
 #   include <fcntl.h>
 #   include <sys/socket.h>
-#ifdef HAVE_POLL
-#   include <poll.h>
-#else
-#undef _poll
-#include <vlc_network.h>
-#endif
+#   include <sys/poll.h>
 #endif
 
 #if defined(WIN32) || defined(UNDER_CE)
diff --git a/src/libvlc.h b/src/libvlc.h
index 6c1f281..0c7c295 100644
--- a/src/libvlc.h
+++ b/src/libvlc.h
@@ -322,8 +322,4 @@ void vlc_rewinddir (void *);
 #   define rewinddir vlc_rewinddir
 #endif
 
-#ifndef HAVE_POLL
-#   define _poll vlc_poll
-#endif
-
 #endif
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 51184a6..0d4039d 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -278,7 +278,7 @@ playlist_ServicesDiscoveryRemove
 playlist_TreeMove
 __pl_Release
 __pl_Yield
-vlc_poll
+poll
 resolve_xml_special_chars
 sdp_AddAttribute
 sdp_AddMedia
diff --git a/src/network/poll.c b/src/network/poll.c
index 7af929b..df92479 100644
--- a/src/network/poll.c
+++ b/src/network/poll.c
@@ -32,7 +32,7 @@
 #include <stdlib.h>
 #include <vlc_network.h>
 
-int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
+int poll (struct pollfd *fds, unsigned nfds, int timeout)
 {
     fd_set rdset, wrset, exset;
     struct timeval tv = { 0, 0 };




More information about the vlc-devel mailing list