[vlc-devel] commit: threads: remove legacy #includes ( Rémi Denis-Courmont )

git version control git at videolan.org
Mon Jan 11 18:09:03 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jan 11 18:44:02 2010 +0200| [3ea9fb9c5fb34162624dec53c1906f50dff6131e] | committer: Rémi Denis-Courmont 

threads: remove legacy #includes

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

 include/vlc_threads.h |    4 ----
 src/misc/cpu.c        |    2 ++
 src/misc/w32thread.c  |    1 +
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/include/vlc_threads.h b/include/vlc_threads.h
index 9469bb2..da02ff8 100644
--- a/include/vlc_threads.h
+++ b/include/vlc_threads.h
@@ -35,21 +35,17 @@
  */
 
 #if defined( UNDER_CE )
-#   include <errno.h>                                           /* WinCE API */
 #elif defined( WIN32 )
 #   include <process.h>                                         /* Win32 API */
-#   include <errno.h>
 
 #else                                         /* pthreads (like Linux & BSD) */
 #   define LIBVLC_USE_PTHREAD 1
 #   define LIBVLC_USE_PTHREAD_CANCEL 1
 #   define _APPLE_C_SOURCE    1 /* Proper pthread semantics on OSX */
 
-#   include <stdlib.h> /* lldiv_t definition (only in C99) */
 #   include <unistd.h> /* _POSIX_SPIN_LOCKS */
 #   include <pthread.h>
 #   include <semaphore.h>
-#   include <time.h>
 
 #endif
 
diff --git a/src/misc/cpu.c b/src/misc/cpu.c
index d1b9324..777b13a 100644
--- a/src/misc/cpu.c
+++ b/src/misc/cpu.c
@@ -37,6 +37,8 @@
 #ifndef WIN32
 #include <unistd.h>
 #include <sys/wait.h>
+#else
+#include <errno.h>
 #endif
 
 #include "libvlc.h"
diff --git a/src/misc/w32thread.c b/src/misc/w32thread.c
index c712ca8..234ef8b 100644
--- a/src/misc/w32thread.c
+++ b/src/misc/w32thread.c
@@ -36,6 +36,7 @@
 #include <stdarg.h>
 #include <assert.h>
 #include <limits.h>
+#include <errno.h>
 #ifdef UNDER_CE
 # include <mmsystem.h>
 #endif




More information about the vlc-devel mailing list