summaryrefslogtreecommitdiff
path: root/win32/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'win32/contrib')
-rw-r--r--win32/contrib/Makefile.am6
-rw-r--r--win32/contrib/pthreads/Makefile.am2
-rw-r--r--win32/contrib/pthreads/pthread.h5
-rw-r--r--win32/contrib/timer/timer.c126
-rw-r--r--win32/contrib/timer/timer.h43
5 files changed, 3 insertions, 179 deletions
diff --git a/win32/contrib/Makefile.am b/win32/contrib/Makefile.am
index ce9fd2d17..f38c48ac5 100644
--- a/win32/contrib/Makefile.am
+++ b/win32/contrib/Makefile.am
@@ -2,14 +2,12 @@ include $(top_srcdir)/misc/Makefile.common
SUBDIRS = zlib pthreads
-noinst_HEADERS = dirent/dirent.h timer/timer.h
+noinst_HEADERS = dirent/dirent.h
if WIN32
-win32libs = libtimer.la libdirent.la
+win32libs = libdirent.la
endif
noinst_LTLIBRARIES = $(win32libs)
-libtimer_la_SOURCES = timer/timer.c
-
libdirent_la_SOURCES = dirent/dirent.c
diff --git a/win32/contrib/pthreads/Makefile.am b/win32/contrib/pthreads/Makefile.am
index 8535ffc9a..31a792050 100644
--- a/win32/contrib/pthreads/Makefile.am
+++ b/win32/contrib/pthreads/Makefile.am
@@ -2,7 +2,7 @@ LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic
AM_CPPFLAGS = -D_WIN32_WINNT=0x400 -DHAVE_CONFIG_H -DPTW32_BUILD -D__CLEANUP_C
-EXTRA_DIST = acconfig.h ANNOUNCE CONTRIBUTORS COPYING.LIB ChangeLog FAQ MAINTAINERS NEWS PROGRESS README README.CV README.NONPORTABLE README.WinCE TODO WinCE-PORT build.tar.gz config.h.in pthread.def pthread.dsp pthread.dsw
+EXTRA_DIST = acconfig.h ANNOUNCE CONTRIBUTORS COPYING.LIB ChangeLog FAQ MAINTAINERS NEWS PROGRESS README README.CV README.NONPORTABLE README.WinCE TODO WinCE-PORT build.tar.gz config.h.in pthread.def pthread.dsp pthread.dsw diff_to_original.patch
if WIN32
noinst_LTLIBRARIES = libpthread.la
diff --git a/win32/contrib/pthreads/pthread.h b/win32/contrib/pthreads/pthread.h
index 31e2cf918..60973c44c 100644
--- a/win32/contrib/pthreads/pthread.h
+++ b/win32/contrib/pthreads/pthread.h
@@ -978,11 +978,6 @@ int * _errno( void );
* actually exist on WIN32.
*/
-#if !defined(__MINGW32__)
-#define strtok_r( _s, _sep, _lasts ) \
- ( *(_lasts) = strtok( (_s), (_sep) ) )
-#endif /* !__MINGW32__ */
-
#define asctime_r( _tm, _buf ) \
( strcpy( (_buf), asctime( (_tm) ) ), \
(_buf) )
diff --git a/win32/contrib/timer/timer.c b/win32/contrib/timer/timer.c
deleted file mode 100644
index 3b171117c..000000000
--- a/win32/contrib/timer/timer.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (C) 2000-2001 the xine project
- *
- * This file is part of xine, a unix video player.
- *
- * xine is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * xine is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- *
- * WIN32 PORT,
- * by Matthew Grooms <elon@altavista.com>
- *
- * timer.c - Missing unix timer functions
- *
- */
-
-#include <sys/timeb.h>
-#include <signal.h>
-#include "timer.h"
-
-
-#ifndef SIGALRM
-#define SIGALRM 14
-#endif
-
-
-int gettimeofday(struct timeval *tv, struct timezone *tz) {
- struct timeb timebuffer;
-
- ftime(&timebuffer);
- tv->tv_sec = timebuffer.time;
- tv->tv_usec = timebuffer.millitm * 1000;
-
- return 0;
-}
-
-
-/*
- These functions are designed to mimick
- a subset of itimer for use with the
- alarm signal on win32. This is just
- enough for xine to work.
-*/
-
-static HANDLE sigalarm = 0;
-
-int setitimer( int which, struct itimerval * value, struct itimerval *ovalue )
-{
- long int miliseconds;
-
- if( !sigalarm )
- sigalarm = CreateEvent( 0, FALSE, TRUE, "SIGALARM" );
-
- miliseconds = value->it_value.tv_usec / 1000;
-
- timeSetEvent( miliseconds, 0, ( LPTIMECALLBACK ) sigalarm, 0, TIME_PERIODIC | TIME_CALLBACK_EVENT_PULSE );
-
- return 0;
-}
-
-/*
- Wait for sigalarm to wake the thread
-*/
-
-int pause( void )
-{
- WaitForSingleObject( sigalarm, INFINITE );
-
- return 0;
-}
-
-int nanosleep( const struct timespec * rqtp, struct timespec * rmtp )
-{
- Sleep( rqtp->tv_nsec / 1000000 );
-
- return 0;
-}
-
-unsigned int sleep( unsigned int seconds )
-{
- Sleep( seconds * 1000 );
- return 0;
-}
-
-static UINT alarmid = 0;
-void CALLBACK AlarmCallback(UINT wTimerID,
- UINT msg,
- DWORD dwUser,
- DWORD dw1,
- DWORD dw2)
-{
- if (alarmid) {
- alarmid = 0;
- raise(SIGALRM);
- }
-}
-
-int alarm( int sec )
-{
- long int miliseconds;
-
- if (sec) {
- if (!alarmid) {
- miliseconds = sec * 1000;
- timeSetEvent( miliseconds, 0, ( LPTIMECALLBACK ) AlarmCallback, 0, TIME_ONESHOT | TIME_CALLBACK_FUNCTION );
- }
- }
- else {
- if (alarmid) {
- timeKillEvent(alarmid);
- alarmid = 0;
- }
- }
-
- return 0;
-}
diff --git a/win32/contrib/timer/timer.h b/win32/contrib/timer/timer.h
deleted file mode 100644
index fb8c357af..000000000
--- a/win32/contrib/timer/timer.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#include <time.h>
-#include <winsock.h>
-#include <pthread.h>
-
-#ifndef _ITIMER_
-#define _ITIMER_
-
-#define ITIMER_REAL 0
-#define ITIMER_VIRTUAL 1
-
-// time reference
-// ----------------------------------
-//
-// 1,000 milliseconds / sec
-// 1,000,000 microseconds / sec
-// 1,000,000,000 nanoseconds / sec
-//
-// timeval.time_sec = seconds
-// timeval.time_usec = microseconds
-
-struct itimerval
-{
- struct timeval it_interval; /* timer interval */
- struct timeval it_value; /* current value */
-};
-
-struct timezone {
- int tz_minuteswest; /* minutes west of Greenwich */
- int tz_dsttime; /* type of dst correction */
-};
-
-int gettimeofday( struct timeval *tp, struct timezone *tzp );
-int setitimer( int which, struct itimerval * value, struct itimerval *ovalue );
-int pause( void );
-
-unsigned int sleep( unsigned int seconds );
-int nanosleep( const struct timespec *rqtp, struct timespec *rmtp );
-int alarm( int sec );
-
-
-
-#endif
-