]> git.sesse.net Git - vlc/commitdiff
vlc_poll: no conditional symbols
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Thu, 7 Aug 2008 19:49:00 +0000 (22:49 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Thu, 7 Aug 2008 19:52:37 +0000 (22:52 +0300)
I would rather we move all the replacement functions to a dedicated
static import library (in future versions) though. It kinda sucks to
clutter libvlccore with such symbols.

include/vlc_network.h
src/libvlccore.sym
src/network/poll.c

index aca2b0a70498e9c721bae34ac3660a30e935d008..2f57af76245fe9636a3050014c6ad510a8f88d15 100644 (file)
@@ -181,7 +181,8 @@ struct pollfd
     int revents;
 };
 
-  VLC_EXPORT (int, poll, (struct pollfd *fds, unsigned nfds, int timeout));
+VLC_EXPORT (int, vlc_poll, (struct pollfd *fds, unsigned nfds, int timeout));
+# define poll(a, b, c) vlc_poll(a, b, c)
 #endif
 
 #ifdef WIN32
index 0d4039d49add63026061ef3a1e68ea5b3bdbbec3..839260f6233e3c10a21ffc9ebfc5662110fadbda 100644 (file)
@@ -278,7 +278,6 @@ playlist_ServicesDiscoveryRemove
 playlist_TreeMove
 __pl_Release
 __pl_Yield
-poll
 resolve_xml_special_chars
 sdp_AddAttribute
 sdp_AddMedia
@@ -452,6 +451,7 @@ __vlc_object_unlock
 __vlc_object_wait
 __vlc_object_waitpipe
 __vlc_object_yield
+vlc_poll
 vlc_pthread_fatal
 vlc_rand_bytes
 vlc_recvmsg
index 540bc1dac6dff11664c75bee5fef24ed4c44b1e4..2bef3f52564f3cdbcc76c7472452a4f25f95a8f9 100644 (file)
 
 #include <vlc_common.h>
 
-#ifndef HAVE_POLL
+#ifdef HAVE_POLL
+struct pollfd;
+
+int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
+{
+    return poll (fds, nfds, timeout);
+}
+#else /* !HAVE_POLL */
 #include <string.h>
 #include <stdlib.h>
 #include <vlc_network.h>
 
-int poll (struct pollfd *fds, unsigned nfds, int timeout)
+int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
 {
     fd_set rdset, wrset, exset;
     struct timeval tv = { 0, 0 };