1 diff -Naur ../pthreads-snap-2004-06-22/GNUmakefile ./GNUmakefile
2 --- ../pthreads-snap-2004-06-22/GNUmakefile 2004-05-20 02:56:52.000000000 +0200
3 +++ ./GNUmakefile 2009-01-07 15:57:36.000000000 +0100
8 -OPT = -O3 -finline-functions
9 +OPT = $(CLEANUP) -O3 -DHAVE_STRUCT_TIMESPEC -D__MINGW32__ -finline-functions
14 GC_CFLAGS = -D__CLEANUP_C
15 GCE_CFLAGS = -D__CLEANUP_CXX -mthreads
20 - $(MAKE) CC=gcc CLEANUP_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL)
21 + $(MAKE) CC=mingw32-gcc CLEANUP_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL)
24 - $(MAKE) CC=g++ CLEANUP_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL)
25 + $(MAKE) CC=mingw32-g++ CLEANUP_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL)
28 - $(MAKE) CC=gcc CLEANUP_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" $(GC_INLINED_STAMP)
29 + $(MAKE) CC=mingw32-gcc CLEANUP_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" $(GC_INLINED_STAMP)
32 - $(MAKE) CC=g++ CLEANUP_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" $(GCE_INLINED_STAMP)
33 + $(MAKE) CC=mingw32-g++ CLEANUP_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" $(GCE_INLINED_STAMP)
39 $(GC_DLL): $(DLL_OBJS)
40 $(CC) $(OPT) -shared -o $(GC_DLL) $(DLL_OBJS) $(LFLAGS)
41 - dlltool -z pthread.def $(DLL_OBJS)
42 - dlltool -k --dllname $@ --output-lib $(GC_LIB) --def $(PTHREAD_DEF)
43 + mingw32-dlltool -z pthread.def $(DLL_OBJS)
44 + mingw32-dlltool -k --dllname $@ --output-lib $(GC_LIB) --def $(PTHREAD_DEF)
46 $(GCE_DLL): $(DLL_OBJS)
47 $(CC) $(OPT) -mthreads -shared -o $(GCE_DLL) $(DLL_OBJS) $(LFLAGS)
48 - dlltool -z pthread.def $(DLL_OBJS)
49 - dlltool -k --dllname $@ --output-lib $(GCE_LIB) --def $(PTHREAD_DEF)
50 + mingw32-dlltool -z pthread.def $(DLL_OBJS)
51 + mingw32-dlltool -k --dllname $@ --output-lib $(GCE_LIB) --def $(PTHREAD_DEF)
53 $(GC_INLINED_STAMP): $(DLL_INLINED_OBJS)
54 $(CC) $(OPT) -shared -o $(GC_DLL) $(DLL_INLINED_OBJS) $(LFLAGS)
55 - dlltool -z pthread.def $(DLL_INLINED_OBJS)
56 - dlltool -k --dllname $(GC_DLL) --output-lib $(GC_LIB) --def $(PTHREAD_DEF)
57 + mingw32-dlltool -z pthread.def $(DLL_INLINED_OBJS)
58 + mingw32-dlltool -k --dllname $(GC_DLL) --output-lib $(GC_LIB) --def $(PTHREAD_DEF)
59 echo touched > $(GC_INLINED_STAMP)
61 $(GCE_INLINED_STAMP): $(DLL_INLINED_OBJS)
62 $(CC) $(OPT) -mthreads -shared -o $(GCE_DLL) $(DLL_INLINED_OBJS) $(LFLAGS)
63 - dlltool -z pthread.def $(DLL_INLINED_OBJS)
64 - dlltool -k --dllname $(GCE_DLL) --output-lib $(GCE_LIB) --def $(PTHREAD_DEF)
65 + mingw32-dlltool -z pthread.def $(DLL_INLINED_OBJS)
66 + mingw32-dlltool -k --dllname $(GCE_DLL) --output-lib $(GCE_LIB) --def $(PTHREAD_DEF)
67 echo touched > $(GCE_INLINED_STAMP)
70 diff -Naur ../pthreads-snap-2004-06-22/implement.h ./implement.h
71 --- ../pthreads-snap-2004-06-22/implement.h 2004-06-22 08:12:54.000000000 +0200
72 +++ ./implement.h 2009-01-07 15:57:36.000000000 +0100
78 #define _WIN32_WINNT 0x400
83 diff -Naur ../pthreads-snap-2004-06-22/pthread_cancel.c ./pthread_cancel.c
84 --- ../pthreads-snap-2004-06-22/pthread_cancel.c 2004-05-17 03:38:02.000000000 +0200
85 +++ ./pthread_cancel.c 2009-01-07 15:57:36.000000000 +0100
90 -ptw32_cancel_callback (DWORD unused)
91 +ptw32_cancel_callback (ULONG_PTR unused)
93 ptw32_throw (PTW32_EPS_CANCEL);
95 diff -Naur ../pthreads-snap-2004-06-22/pthread_exit.c ./pthread_exit.c
96 --- ../pthreads-snap-2004-06-22/pthread_exit.c 2004-05-17 03:38:03.000000000 +0200
97 +++ ./pthread_exit.c 2009-01-07 15:57:36.000000000 +0100
101 #if ! defined (__MINGW32__) || defined (__MSVCRT__)
102 - _endthreadex ((unsigned) value_ptr);
103 + _endthreadex ((unsigned) ((ULONG_PTR)value_ptr));
107 diff -Naur ../pthreads-snap-2004-06-22/pthread_getspecific.c ./pthread_getspecific.c
108 --- ../pthreads-snap-2004-06-22/pthread_getspecific.c 2004-05-17 03:38:03.000000000 +0200
109 +++ ./pthread_getspecific.c 2009-01-07 15:57:36.000000000 +0100
111 * ------------------------------------------------------
114 - int lasterror = GetLastError ();
115 - int lastWSAerror = WSAGetLastError ();
118 - void *ptr = TlsGetValue (key->key);
122 + int lasterror = GetLastError ();
123 + int lastWSAerror = WSAGetLastError ();
125 - SetLastError (lasterror);
126 - WSASetLastError (lastWSAerror);
127 + ptr = TlsGetValue(key->key);
129 + SetLastError(lasterror);
130 + WSASetLastError(lastWSAerror);
134 diff -Naur ../pthreads-snap-2004-06-22/pthread.h ./pthread.h
135 --- ../pthreads-snap-2004-06-22/pthread.h 2004-06-22 08:12:54.000000000 +0200
136 +++ ./pthread.h 2009-01-07 15:57:36.000000000 +0100
138 #endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */
140 #ifndef HAVE_STRUCT_TIMESPEC
145 #endif /* HAVE_STRUCT_TIMESPEC */
148 diff -Naur ../pthreads-snap-2004-06-22/ptw32_InterlockedCompareExchange.c ./ptw32_InterlockedCompareExchange.c
149 --- ../pthreads-snap-2004-06-22/ptw32_InterlockedCompareExchange.c 2004-05-17 03:38:03.000000000 +0200
150 +++ ./ptw32_InterlockedCompareExchange.c 2009-01-07 15:57:36.000000000 +0100
157 + * Microsoft Visual C++ 7.1 and newer have _Interlocked intrinsics
160 + result = InterlockedCompareExchange(LONG volatile *Destination,LONG ExChange,LONG Comperand);
164 + result = InterlockedCompareExchange(LONG volatile *Destination,LONG ExChange,LONG Comperand);
170 * If execution gets to here then we should be running on a Win95 system
176 +#error Unsupported platform or compiler!
181 diff -Naur ../pthreads-snap-2004-06-22/ptw32_semwait.c ./ptw32_semwait.c
182 --- ../pthreads-snap-2004-06-22/ptw32_semwait.c 2004-05-17 09:59:47.000000000 +0200
183 +++ ./ptw32_semwait.c 2009-01-07 15:57:36.000000000 +0100
185 #include "implement.h"
190 ptw32_semwait (sem_t * sem)
192 * ------------------------------------------------------
193 diff -Naur ../pthreads-snap-2004-06-22/ptw32_threadStart.c ./ptw32_threadStart.c
194 --- ../pthreads-snap-2004-06-22/ptw32_threadStart.c 2004-05-17 03:38:03.000000000 +0200
195 +++ ./ptw32_threadStart.c 2009-01-07 15:57:36.000000000 +0100
199 #if ! defined (__MINGW32__) || defined (__MSVCRT__)
200 - _endthreadex ((unsigned) status);
201 + _endthreadex ((unsigned) ((ULONG_PTR)status));
208 #if ! defined (__MINGW32__) || defined (__MSVCRT__)
209 - return (unsigned) status;
210 + return (unsigned) ((ULONG_PTR)status);
213 } /* ptw32_threadStart */
214 diff -Naur ../pthreads-snap-2004-06-22/ptw32_throw.c ./ptw32_throw.c
215 --- ../pthreads-snap-2004-06-22/ptw32_throw.c 2004-05-17 03:38:03.000000000 +0200
216 +++ ./ptw32_throw.c 2009-01-07 15:57:36.000000000 +0100
220 case PTW32_EPS_CANCEL:
221 - exitCode = (unsigned) PTHREAD_CANCELED;
222 + exitCode = (unsigned) ((ULONG_PTR)PTHREAD_CANCELED);
225 - exitCode = (unsigned) self->exitStatus;;
226 + exitCode = (unsigned) ((ULONG_PTR)self->exitStatus);;
230 diff -Naur ../pthreads-snap-2004-06-22/tests/barrier3.c ./tests/barrier3.c
231 --- ../pthreads-snap-2004-06-22/tests/barrier3.c 2003-08-19 05:31:51.000000000 +0200
232 +++ ./tests/barrier3.c 2009-01-07 15:57:36.000000000 +0100
236 pthread_barrier_t barrier = NULL;
237 -static int result = 1;
238 +static DWORD_PTR result = 1;
240 void * func(void * arg)
242 diff -Naur ../pthreads-snap-2004-06-22/tests/barrier5.c ./tests/barrier5.c
243 --- ../pthreads-snap-2004-06-22/tests/barrier5.c 2003-08-19 05:31:51.000000000 +0200
244 +++ ./tests/barrier5.c 2009-01-07 15:57:36.000000000 +0100
251 int serialThreadsTotal;
252 pthread_t t[NUMTHREADS + 1];
255 for (i = 1; i <= j; i++)
257 assert(pthread_join(t[i], (void **) &result) == 0);
258 - serialThreadsTotal += result;
259 + serialThreadsTotal += (int)result;
262 assert(serialThreadsTotal == BARRIERS - 1);
263 diff -Naur ../pthreads-snap-2004-06-22/tests/cancel2.c ./tests/cancel2.c
264 --- ../pthreads-snap-2004-06-22/tests/cancel2.c 2003-08-19 05:31:51.000000000 +0200
265 +++ ./tests/cancel2.c 2009-01-07 15:57:36.000000000 +0100
267 for (i = 1; i <= NUMTHREADS; i++)
271 + DWORD_PTR result = 0;
273 assert(pthread_join(t[i], (void **) &result) == 0);
274 fail = (result != (int) PTHREAD_CANCELED);
275 diff -Naur ../pthreads-snap-2004-06-22/tests/cancel3.c ./tests/cancel3.c
276 --- ../pthreads-snap-2004-06-22/tests/cancel3.c 2004-05-17 03:38:03.000000000 +0200
277 +++ ./tests/cancel3.c 2009-01-07 15:57:36.000000000 +0100
279 for (i = 1; i <= NUMTHREADS; i++)
283 + DWORD_PTR result = 0;
286 * The thread does not contain any cancelation points, so
287 diff -Naur ../pthreads-snap-2004-06-22/tests/cancel4.c ./tests/cancel4.c
288 --- ../pthreads-snap-2004-06-22/tests/cancel4.c 2004-05-17 03:38:03.000000000 +0200
289 +++ ./tests/cancel4.c 2009-01-07 15:57:36.000000000 +0100
291 for (i = 1; i <= NUMTHREADS; i++)
295 + DWORD_PTR result = 0;
298 * The thread does not contain any cancelation points, so
299 diff -Naur ../pthreads-snap-2004-06-22/tests/cancel5.c ./tests/cancel5.c
300 --- ../pthreads-snap-2004-06-22/tests/cancel5.c 2004-05-17 03:38:03.000000000 +0200
301 +++ ./tests/cancel5.c 2009-01-07 15:57:36.000000000 +0100
303 for (i = 1; i <= NUMTHREADS; i++)
307 + DWORD_PTR result = 0;
310 * The thread does not contain any cancelation points, so
311 diff -Naur ../pthreads-snap-2004-06-22/tests/cancel6a.c ./tests/cancel6a.c
312 --- ../pthreads-snap-2004-06-22/tests/cancel6a.c 2004-05-17 03:38:03.000000000 +0200
313 +++ ./tests/cancel6a.c 2009-01-07 15:57:36.000000000 +0100
315 for (i = 1; i <= NUMTHREADS; i++)
319 + DWORD_PTR result = 0;
322 * The thread does not contain any cancelation points, so
323 diff -Naur ../pthreads-snap-2004-06-22/tests/cancel6d.c ./tests/cancel6d.c
324 --- ../pthreads-snap-2004-06-22/tests/cancel6d.c 2004-05-17 03:38:03.000000000 +0200
325 +++ ./tests/cancel6d.c 2009-01-07 15:57:36.000000000 +0100
327 for (i = 1; i <= NUMTHREADS; i++)
331 + DWORD_PTR result = 0;
334 * The thread does not contain any cancelation points, so
335 diff -Naur ../pthreads-snap-2004-06-22/tests/cleanup0.c ./tests/cleanup0.c
336 --- ../pthreads-snap-2004-06-22/tests/cleanup0.c 2003-08-19 05:31:51.000000000 +0200
337 +++ ./tests/cleanup0.c 2009-01-07 15:57:36.000000000 +0100
339 for (i = 1; i <= NUMTHREADS; i++)
343 + DWORD_PTR result = 0;
345 assert(pthread_join(t[i], (void **) &result) == 0);
347 diff -Naur ../pthreads-snap-2004-06-22/tests/cleanup1.c ./tests/cleanup1.c
348 --- ../pthreads-snap-2004-06-22/tests/cleanup1.c 2003-08-19 05:31:51.000000000 +0200
349 +++ ./tests/cleanup1.c 2009-01-07 15:57:36.000000000 +0100
351 for (i = 1; i <= NUMTHREADS; i++)
355 + DWORD_PTR result = 0;
357 assert(pthread_join(t[i], (void **) &result) == 0);
359 diff -Naur ../pthreads-snap-2004-06-22/tests/cleanup2.c ./tests/cleanup2.c
360 --- ../pthreads-snap-2004-06-22/tests/cleanup2.c 2003-08-19 05:31:51.000000000 +0200
361 +++ ./tests/cleanup2.c 2009-01-07 15:57:36.000000000 +0100
363 for (i = 1; i <= NUMTHREADS; i++)
367 + DWORD_PTR result = 0;
369 assert(pthread_join(t[i], (void **) &result) == 0);
371 diff -Naur ../pthreads-snap-2004-06-22/tests/cleanup3.c ./tests/cleanup3.c
372 --- ../pthreads-snap-2004-06-22/tests/cleanup3.c 2003-08-19 05:31:51.000000000 +0200
373 +++ ./tests/cleanup3.c 2009-01-07 15:57:36.000000000 +0100
375 for (i = 1; i <= NUMTHREADS; i++)
379 + DWORD_PTR result = 0;
381 assert(pthread_join(t[i], (void **) &result) == 0);
383 diff -Naur ../pthreads-snap-2004-06-22/tests/condvar1_2.c ./tests/condvar1_2.c
384 --- ../pthreads-snap-2004-06-22/tests/condvar1_2.c 2003-08-19 05:31:51.000000000 +0200
385 +++ ./tests/condvar1_2.c 2009-01-07 15:57:36.000000000 +0100
391 + DWORD_PTR result = -1;
394 for (k = 0; k < NUM_LOOPS; k++)
395 diff -Naur ../pthreads-snap-2004-06-22/tests/condvar2_1.c ./tests/condvar2_1.c
396 --- ../pthreads-snap-2004-06-22/tests/condvar2_1.c 2004-05-20 02:56:52.000000000 +0200
397 +++ ./tests/condvar2_1.c 2009-01-07 15:57:36.000000000 +0100
401 pthread_t t[NUMTHREADS + 1];
403 + DWORD_PTR result = 0;
404 struct _timeb currSysTime;
405 const DWORD NANOSEC_PER_MILLISEC = 1000000;
408 /* get current system time */
409 _ftime(&currSysTime);
411 - abstime.tv_sec = currSysTime.time;
412 + abstime.tv_sec = (long)currSysTime.time;
413 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
416 diff -Naur ../pthreads-snap-2004-06-22/tests/condvar2.c ./tests/condvar2.c
417 --- ../pthreads-snap-2004-06-22/tests/condvar2.c 2004-05-20 02:56:52.000000000 +0200
418 +++ ./tests/condvar2.c 2009-01-07 15:57:36.000000000 +0100
420 /* get current system time */
421 _ftime(&currSysTime);
423 - abstime.tv_sec = currSysTime.time;
424 + abstime.tv_sec = (long)currSysTime.time;
425 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
429 assert(pthread_mutex_unlock(&mutex) == 0);
432 - int result = pthread_cond_destroy(&cv);
433 + DWORD_PTR result = pthread_cond_destroy(&cv);
436 fprintf(stderr, "Result = %s\n", error_string[result]);
437 diff -Naur ../pthreads-snap-2004-06-22/tests/condvar3_1.c ./tests/condvar3_1.c
438 --- ../pthreads-snap-2004-06-22/tests/condvar3_1.c 2004-05-20 02:56:52.000000000 +0200
439 +++ ./tests/condvar3_1.c 2009-01-07 15:57:36.000000000 +0100
443 pthread_t t[NUMTHREADS + 1];
445 + DWORD_PTR result = 0;
446 struct _timeb currSysTime;
447 const DWORD NANOSEC_PER_MILLISEC = 1000000;
450 /* get current system time */
451 _ftime(&currSysTime);
453 - abstime.tv_sec = currSysTime.time;
454 + abstime.tv_sec = (long)currSysTime.time;
455 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
458 diff -Naur ../pthreads-snap-2004-06-22/tests/condvar3_2.c ./tests/condvar3_2.c
459 --- ../pthreads-snap-2004-06-22/tests/condvar3_2.c 2004-05-20 02:56:52.000000000 +0200
460 +++ ./tests/condvar3_2.c 2009-01-07 15:57:36.000000000 +0100
464 pthread_t t[NUMTHREADS + 1];
466 + DWORD_PTR result = 0;
467 struct _timeb currSysTime;
468 const DWORD NANOSEC_PER_MILLISEC = 1000000;
471 /* get current system time */
472 _ftime(&currSysTime);
474 - abstime.tv_sec = abstime.tv_sec = currSysTime.time + 5;
475 + abstime.tv_sec = abstime.tv_sec = (long)currSysTime.time + 5;
476 abstime.tv_nsec = abstime2.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
478 assert(pthread_mutex_lock(&mutex) == 0);
479 diff -Naur ../pthreads-snap-2004-06-22/tests/condvar3_3.c ./tests/condvar3_3.c
480 --- ../pthreads-snap-2004-06-22/tests/condvar3_3.c 2003-08-19 05:31:51.000000000 +0200
481 +++ ./tests/condvar3_3.c 2009-01-07 15:57:36.000000000 +0100
483 /* get current system time */
484 _ftime(&currSysTime);
486 - abstime.tv_sec = currSysTime.time;
487 + abstime.tv_sec = (long)currSysTime.time;
488 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
493 assert(pthread_mutex_lock(&mtx) == 0);
495 - abstime.tv_sec = currSysTime.time;
496 + abstime.tv_sec = (long)currSysTime.time;
497 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
500 diff -Naur ../pthreads-snap-2004-06-22/tests/condvar3.c ./tests/condvar3.c
501 --- ../pthreads-snap-2004-06-22/tests/condvar3.c 2003-08-19 05:31:51.000000000 +0200
502 +++ ./tests/condvar3.c 2009-01-07 15:57:36.000000000 +0100
504 /* get current system time */
505 _ftime(&currSysTime);
507 - abstime.tv_sec = currSysTime.time;
508 + abstime.tv_sec = (long)currSysTime.time;
509 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
511 assert(pthread_create(&t[1], NULL, mythread, (void *) 1) == 0);
512 diff -Naur ../pthreads-snap-2004-06-22/tests/condvar4.c ./tests/condvar4.c
513 --- ../pthreads-snap-2004-06-22/tests/condvar4.c 2003-08-19 05:31:51.000000000 +0200
514 +++ ./tests/condvar4.c 2009-01-07 15:57:36.000000000 +0100
516 /* get current system time */
517 _ftime(&currSysTime);
519 - abstime.tv_sec = currSysTime.time;
520 + abstime.tv_sec = (long)currSysTime.time;
521 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
526 _ftime(&currSysTime);
528 - abstime.tv_sec = currSysTime.time;
529 + abstime.tv_sec = (long)currSysTime.time;
530 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
533 diff -Naur ../pthreads-snap-2004-06-22/tests/condvar5.c ./tests/condvar5.c
534 --- ../pthreads-snap-2004-06-22/tests/condvar5.c 2003-08-19 05:31:51.000000000 +0200
535 +++ ./tests/condvar5.c 2009-01-07 15:57:36.000000000 +0100
537 /* get current system time */
538 _ftime(&currSysTime);
540 - abstime.tv_sec = currSysTime.time;
541 + abstime.tv_sec = (long)currSysTime.time;
542 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
547 _ftime(&currSysTime);
549 - abstime.tv_sec = currSysTime.time;
550 + abstime.tv_sec = (long)currSysTime.time;
551 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
554 diff -Naur ../pthreads-snap-2004-06-22/tests/condvar6.c ./tests/condvar6.c
555 --- ../pthreads-snap-2004-06-22/tests/condvar6.c 2003-08-19 05:31:51.000000000 +0200
556 +++ ./tests/condvar6.c 2009-01-07 15:57:36.000000000 +0100
559 _ftime(&currSysTime);
561 - abstime.tv_sec = currSysTime.time;
562 + abstime.tv_sec = (long)currSysTime.time;
563 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
566 diff -Naur ../pthreads-snap-2004-06-22/tests/condvar7.c ./tests/condvar7.c
567 --- ../pthreads-snap-2004-06-22/tests/condvar7.c 2003-08-19 05:31:51.000000000 +0200
568 +++ ./tests/condvar7.c 2009-01-07 15:57:36.000000000 +0100
571 _ftime(&currSysTime);
573 - abstime.tv_sec = currSysTime.time;
574 + abstime.tv_sec = (long)currSysTime.time;
575 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
577 abstime.tv_sec += 10;
578 diff -Naur ../pthreads-snap-2004-06-22/tests/condvar8.c ./tests/condvar8.c
579 --- ../pthreads-snap-2004-06-22/tests/condvar8.c 2003-08-19 05:31:51.000000000 +0200
580 +++ ./tests/condvar8.c 2009-01-07 15:57:36.000000000 +0100
583 _ftime(&currSysTime);
585 - abstime.tv_sec = currSysTime.time;
586 + abstime.tv_sec = (long)currSysTime.time;
587 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
589 abstime.tv_sec += 10;
590 diff -Naur ../pthreads-snap-2004-06-22/tests/condvar9.c ./tests/condvar9.c
591 --- ../pthreads-snap-2004-06-22/tests/condvar9.c 2003-08-19 05:31:51.000000000 +0200
592 +++ ./tests/condvar9.c 2009-01-07 15:57:36.000000000 +0100
595 _ftime(&currSysTime);
597 - abstime.tv_sec = currSysTime.time;
598 + abstime.tv_sec = (long)currSysTime.time;
599 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
602 diff -Naur ../pthreads-snap-2004-06-22/tests/context1.c ./tests/context1.c
603 --- ../pthreads-snap-2004-06-22/tests/context1.c 2004-05-20 02:56:52.000000000 +0200
604 +++ ./tests/context1.c 2009-01-07 15:57:36.000000000 +0100
609 +#if defined(_M_IX86)
610 context.Eip = (DWORD) anotherEnding;
612 + context.Rip = (DWORD64) anotherEnding;
614 SetThreadContext(hThread, &context);
615 ResumeThread(hThread);
617 diff -Naur ../pthreads-snap-2004-06-22/tests/delay2.c ./tests/delay2.c
618 --- ../pthreads-snap-2004-06-22/tests/delay2.c 2003-08-19 05:31:51.000000000 +0200
619 +++ ./tests/delay2.c 2009-01-07 15:57:36.000000000 +0100
621 main(int argc, char * argv[])
625 + DWORD_PTR result = 0;
627 assert(pthread_mutex_lock(&mx) == 0);
629 diff -Naur ../pthreads-snap-2004-06-22/tests/exception1.c ./tests/exception1.c
630 --- ../pthreads-snap-2004-06-22/tests/exception1.c 2003-08-19 05:31:51.000000000 +0200
631 +++ ./tests/exception1.c 2009-01-07 15:57:36.000000000 +0100
633 for (i = 0; i < NUMTHREADS; i++)
637 + DWORD_PTR result = 0;
639 /* Canceled thread */
640 assert(pthread_join(ct[i], (void **) &result) == 0);
641 diff -Naur ../pthreads-snap-2004-06-22/tests/GNUmakefile ./tests/GNUmakefile
642 --- ../pthreads-snap-2004-06-22/tests/GNUmakefile 2004-06-22 08:12:55.000000000 +0200
643 +++ ./tests/GNUmakefile 2009-01-07 15:57:36.000000000 +0100
645 DLL = pthread$(GCX).dll
646 QAPC = ../QueueUserAPCEx/User/quserex.dll
648 -COPYFILES = $(HDR) $(LIB) $(DLL) $(QAPC)
649 +COPYFILES = $(HDR) $(LIB) $(DLL)
651 # If a test case returns a non-zero exit code to the shell, make will
653 diff -Naur ../pthreads-snap-2004-06-22/tests/join0.c ./tests/join0.c
654 --- ../pthreads-snap-2004-06-22/tests/join0.c 2003-08-19 05:31:51.000000000 +0200
655 +++ ./tests/join0.c 2009-01-07 15:57:36.000000000 +0100
657 main(int argc, char * argv[])
663 /* Create a single thread and wait for it to exit. */
664 assert(pthread_create(&id, NULL, func, (void *) 123) == 0);
665 diff -Naur ../pthreads-snap-2004-06-22/tests/join1.c ./tests/join1.c
666 --- ../pthreads-snap-2004-06-22/tests/join1.c 2003-08-19 05:31:51.000000000 +0200
667 +++ ./tests/join1.c 2009-01-07 15:57:36.000000000 +0100
675 /* Create a few threads and then exit. */
676 for (i = 0; i < 4; i++)
677 diff -Naur ../pthreads-snap-2004-06-22/tests/join2.c ./tests/join2.c
678 --- ../pthreads-snap-2004-06-22/tests/join2.c 2003-08-19 05:31:51.000000000 +0200
679 +++ ./tests/join2.c 2009-01-07 15:57:36.000000000 +0100
687 /* Create a few threads and then exit. */
688 for (i = 0; i < 4; i++)
689 diff -Naur ../pthreads-snap-2004-06-22/tests/join3.c ./tests/join3.c
690 --- ../pthreads-snap-2004-06-22/tests/join3.c 2004-05-22 03:17:58.000000000 +0200
691 +++ ./tests/join3.c 2009-01-07 15:57:36.000000000 +0100
699 /* Create a few threads and then exit. */
700 for (i = 0; i < 4; i++)
701 diff -Naur ../pthreads-snap-2004-06-22/tests/mutex6e.c ./tests/mutex6e.c
702 --- ../pthreads-snap-2004-06-22/tests/mutex6e.c 2003-08-19 05:31:51.000000000 +0200
703 +++ ./tests/mutex6e.c 2009-01-07 15:57:36.000000000 +0100
709 + DWORD_PTR result = 0;
712 assert(pthread_mutexattr_init(&mxAttr) == 0);
713 diff -Naur ../pthreads-snap-2004-06-22/tests/mutex6es.c ./tests/mutex6es.c
714 --- ../pthreads-snap-2004-06-22/tests/mutex6es.c 2004-06-22 08:12:55.000000000 +0200
715 +++ ./tests/mutex6es.c 2009-01-07 15:57:36.000000000 +0100
721 + DWORD_PTR result = 0;
723 assert(mutex == PTHREAD_ERRORCHECK_MUTEX_INITIALIZER);
725 diff -Naur ../pthreads-snap-2004-06-22/tests/mutex6r.c ./tests/mutex6r.c
726 --- ../pthreads-snap-2004-06-22/tests/mutex6r.c 2003-08-19 05:31:51.000000000 +0200
727 +++ ./tests/mutex6r.c 2009-01-07 15:57:36.000000000 +0100
733 + DWORD_PTR result = 0;
736 assert(pthread_mutexattr_init(&mxAttr) == 0);
737 diff -Naur ../pthreads-snap-2004-06-22/tests/mutex6rs.c ./tests/mutex6rs.c
738 --- ../pthreads-snap-2004-06-22/tests/mutex6rs.c 2004-06-22 08:12:55.000000000 +0200
739 +++ ./tests/mutex6rs.c 2009-01-07 15:57:36.000000000 +0100
745 + DWORD_PTR result = 0;
747 assert(mutex == PTHREAD_RECURSIVE_MUTEX_INITIALIZER);
749 diff -Naur ../pthreads-snap-2004-06-22/tests/mutex7e.c ./tests/mutex7e.c
750 --- ../pthreads-snap-2004-06-22/tests/mutex7e.c 2003-08-19 05:31:51.000000000 +0200
751 +++ ./tests/mutex7e.c 2009-01-07 15:57:36.000000000 +0100
757 + DWORD_PTR result = 0;
760 assert(pthread_mutexattr_init(&mxAttr) == 0);
761 diff -Naur ../pthreads-snap-2004-06-22/tests/mutex7r.c ./tests/mutex7r.c
762 --- ../pthreads-snap-2004-06-22/tests/mutex7r.c 2003-08-19 05:31:51.000000000 +0200
763 +++ ./tests/mutex7r.c 2009-01-07 15:57:36.000000000 +0100
769 + DWORD_PTR result = 0;
772 assert(pthread_mutexattr_init(&mxAttr) == 0);
773 diff -Naur ../pthreads-snap-2004-06-22/tests/mutex8.c ./tests/mutex8.c
774 --- ../pthreads-snap-2004-06-22/tests/mutex8.c 2002-02-20 05:39:56.000000000 +0100
775 +++ ./tests/mutex8.c 2009-01-07 15:57:36.000000000 +0100
778 _ftime(&currSysTime);
780 - abstime.tv_sec = currSysTime.time;
781 + abstime.tv_sec = (long)currSysTime.time;
782 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
785 diff -Naur ../pthreads-snap-2004-06-22/tests/mutex8e.c ./tests/mutex8e.c
786 --- ../pthreads-snap-2004-06-22/tests/mutex8e.c 2002-02-20 05:39:56.000000000 +0100
787 +++ ./tests/mutex8e.c 2009-01-07 15:57:36.000000000 +0100
790 _ftime(&currSysTime);
792 - abstime.tv_sec = currSysTime.time;
793 + abstime.tv_sec = (long)currSysTime.time;
794 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
797 diff -Naur ../pthreads-snap-2004-06-22/tests/mutex8n.c ./tests/mutex8n.c
798 --- ../pthreads-snap-2004-06-22/tests/mutex8n.c 2002-02-20 05:39:56.000000000 +0100
799 +++ ./tests/mutex8n.c 2009-01-07 15:57:36.000000000 +0100
802 _ftime(&currSysTime);
804 - abstime.tv_sec = currSysTime.time;
805 + abstime.tv_sec = (long)currSysTime.time;
806 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
809 diff -Naur ../pthreads-snap-2004-06-22/tests/mutex8r.c ./tests/mutex8r.c
810 --- ../pthreads-snap-2004-06-22/tests/mutex8r.c 2002-02-20 05:39:56.000000000 +0100
811 +++ ./tests/mutex8r.c 2009-01-07 15:57:36.000000000 +0100
814 _ftime(&currSysTime);
816 - abstime.tv_sec = currSysTime.time;
817 + abstime.tv_sec = (long)currSysTime.time;
818 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
821 diff -Naur ../pthreads-snap-2004-06-22/tests/rwlock2_t.c ./tests/rwlock2_t.c
822 --- ../pthreads-snap-2004-06-22/tests/rwlock2_t.c 2003-08-19 05:31:51.000000000 +0200
823 +++ ./tests/rwlock2_t.c 2009-01-07 15:57:36.000000000 +0100
826 _ftime(&currSysTime);
828 - abstime.tv_sec = currSysTime.time;
829 + abstime.tv_sec = (long)currSysTime.time;
830 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
833 diff -Naur ../pthreads-snap-2004-06-22/tests/rwlock3_t.c ./tests/rwlock3_t.c
834 --- ../pthreads-snap-2004-06-22/tests/rwlock3_t.c 2003-08-19 05:31:51.000000000 +0200
835 +++ ./tests/rwlock3_t.c 2009-01-07 15:57:36.000000000 +0100
838 _ftime(&currSysTime);
840 - abstime.tv_sec = currSysTime.time;
841 + abstime.tv_sec = (long)currSysTime.time;
842 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
845 diff -Naur ../pthreads-snap-2004-06-22/tests/rwlock4_t.c ./tests/rwlock4_t.c
846 --- ../pthreads-snap-2004-06-22/tests/rwlock4_t.c 2003-08-19 05:31:51.000000000 +0200
847 +++ ./tests/rwlock4_t.c 2009-01-07 15:57:36.000000000 +0100
850 _ftime(&currSysTime);
852 - abstime.tv_sec = currSysTime.time;
853 + abstime.tv_sec = (long)currSysTime.time;
854 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
857 diff -Naur ../pthreads-snap-2004-06-22/tests/rwlock5_t.c ./tests/rwlock5_t.c
858 --- ../pthreads-snap-2004-06-22/tests/rwlock5_t.c 2003-08-19 05:31:51.000000000 +0200
859 +++ ./tests/rwlock5_t.c 2009-01-07 15:57:36.000000000 +0100
862 _ftime(&currSysTime);
864 - abstime.tv_sec = currSysTime.time;
865 + abstime.tv_sec = (long)currSysTime.time;
866 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
869 diff -Naur ../pthreads-snap-2004-06-22/tests/rwlock6.c ./tests/rwlock6.c
870 --- ../pthreads-snap-2004-06-22/tests/rwlock6.c 2003-08-19 05:31:51.000000000 +0200
871 +++ ./tests/rwlock6.c 2009-01-07 15:57:36.000000000 +0100
879 + DWORD_PTR wr1Result = 0;
880 + DWORD_PTR wr2Result = 0;
881 + DWORD_PTR rdResult = 0;
885 diff -Naur ../pthreads-snap-2004-06-22/tests/rwlock6_t2.c ./tests/rwlock6_t2.c
886 --- ../pthreads-snap-2004-06-22/tests/rwlock6_t2.c 2003-08-19 05:31:51.000000000 +0200
887 +++ ./tests/rwlock6_t2.c 2009-01-07 15:57:36.000000000 +0100
895 + DWORD_PTR wr1Result = 0;
896 + DWORD_PTR wr2Result = 0;
897 + DWORD_PTR rdResult = 0;
898 struct _timeb currSysTime;
899 const DWORD NANOSEC_PER_MILLISEC = 1000000;
901 _ftime(&currSysTime);
903 - abstime.tv_sec = currSysTime.time;
904 + abstime.tv_sec = (long)currSysTime.time;
905 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
908 diff -Naur ../pthreads-snap-2004-06-22/tests/rwlock6_t.c ./tests/rwlock6_t.c
909 --- ../pthreads-snap-2004-06-22/tests/rwlock6_t.c 2003-08-19 05:31:51.000000000 +0200
910 +++ ./tests/rwlock6_t.c 2009-01-07 15:57:36.000000000 +0100
913 _ftime(&currSysTime);
915 - abstime.tv_sec = currSysTime.time;
916 + abstime.tv_sec = (long)currSysTime.time;
917 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
928 + DWORD_PTR wr1Result = 0;
929 + DWORD_PTR wr2Result = 0;
930 + DWORD_PTR rd1Result = 0;
931 + DWORD_PTR rd2Result = 0;
935 diff -Naur ../pthreads-snap-2004-06-22/tests/semaphore1.c ./tests/semaphore1.c
936 --- ../pthreads-snap-2004-06-22/tests/semaphore1.c 2003-08-19 05:31:51.000000000 +0200
937 +++ ./tests/semaphore1.c 2009-01-07 15:57:36.000000000 +0100
945 assert(pthread_create(&t, NULL, thr, NULL) == 0);
946 assert(pthread_join(t, (void **)&result) == 0);
947 diff -Naur ../pthreads-snap-2004-06-22/tests/spin4.c ./tests/spin4.c
948 --- ../pthreads-snap-2004-06-22/tests/spin4.c 2003-08-19 05:31:51.000000000 +0200
949 +++ ./tests/spin4.c 2009-01-07 15:57:36.000000000 +0100
955 + DWORD_PTR result = 0;
958 struct _timeb sysTime;
959 diff -Naur ../pthreads-snap-2004-06-22/tests/tsd1.c ./tests/tsd1.c
960 --- ../pthreads-snap-2004-06-22/tests/tsd1.c 2003-08-19 05:31:51.000000000 +0200
961 +++ ./tests/tsd1.c 2009-01-07 15:57:36.000000000 +0100
964 for (i = 1; i < 10; i++)
967 + DWORD_PTR result = 0;
969 assert(pthread_join(thread[i], (void **) &result) == 0);