1 diff -Naur pthreads-snap-2004-06-22/GNUmakefile pthreads-snap-2004-06-22_w64+bacula-patch/GNUmakefile
2 --- pthreads-snap-2004-06-22/GNUmakefile 2004-05-20 02:56:52.000000000 +0200
3 +++ pthreads-snap-2004-06-22_w64+bacula-patch/GNUmakefile 2009-01-06 17:17:19.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 pthreads-snap-2004-06-22_w64+bacula-patch/implement.h
71 --- pthreads-snap-2004-06-22/implement.h 2004-06-22 08:12:54.000000000 +0200
72 +++ pthreads-snap-2004-06-22_w64+bacula-patch/implement.h 2009-01-06 17:21:14.000000000 +0100
78 #define _WIN32_WINNT 0x400
83 diff -Naur pthreads-snap-2004-06-22/pthread_cancel.c pthreads-snap-2004-06-22_w64+bacula-patch/pthread_cancel.c
84 --- pthreads-snap-2004-06-22/pthread_cancel.c 2004-05-17 03:38:02.000000000 +0200
85 +++ pthreads-snap-2004-06-22_w64+bacula-patch/pthread_cancel.c 2009-01-06 17:17: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_getspecific.c pthreads-snap-2004-06-22_w64+bacula-patch/pthread_getspecific.c
96 --- pthreads-snap-2004-06-22/pthread_getspecific.c 2004-05-17 03:38:03.000000000 +0200
97 +++ pthreads-snap-2004-06-22_w64+bacula-patch/pthread_getspecific.c 2009-01-06 17:17:19.000000000 +0100
99 * ------------------------------------------------------
102 - int lasterror = GetLastError ();
103 - int lastWSAerror = WSAGetLastError ();
106 - void *ptr = TlsGetValue (key->key);
110 + int lasterror = GetLastError ();
111 + int lastWSAerror = WSAGetLastError ();
113 - SetLastError (lasterror);
114 - WSASetLastError (lastWSAerror);
115 + ptr = TlsGetValue(key->key);
117 + SetLastError(lasterror);
118 + WSASetLastError(lastWSAerror);
122 diff -Naur pthreads-snap-2004-06-22/pthread.h pthreads-snap-2004-06-22_w64+bacula-patch/pthread.h
123 --- pthreads-snap-2004-06-22/pthread.h 2004-06-22 08:12:54.000000000 +0200
124 +++ pthreads-snap-2004-06-22_w64+bacula-patch/pthread.h 2009-01-06 17:17:19.000000000 +0100
126 #endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */
128 #ifndef HAVE_STRUCT_TIMESPEC
133 #endif /* HAVE_STRUCT_TIMESPEC */
136 diff -Naur pthreads-snap-2004-06-22/ptw32_InterlockedCompareExchange.c pthreads-snap-2004-06-22_w64+bacula-patch/ptw32_InterlockedCompareExchange.c
137 --- pthreads-snap-2004-06-22/ptw32_InterlockedCompareExchange.c 2004-05-17 03:38:03.000000000 +0200
138 +++ pthreads-snap-2004-06-22_w64+bacula-patch/ptw32_InterlockedCompareExchange.c 2009-01-06 17:17:19.000000000 +0100
145 + * Microsoft Visual C++ 7.1 and newer have _Interlocked intrinsics
148 + result = InterlockedCompareExchange(LONG volatile *Destination,LONG ExChange,LONG Comperand);
152 + result = InterlockedCompareExchange(LONG volatile *Destination,LONG ExChange,LONG Comperand);
158 * If execution gets to here then we should be running on a Win95 system
164 +#error Unsupported platform or compiler!
169 diff -Naur pthreads-snap-2004-06-22/ptw32_semwait.c pthreads-snap-2004-06-22_w64+bacula-patch/ptw32_semwait.c
170 --- pthreads-snap-2004-06-22/ptw32_semwait.c 2004-05-17 09:59:47.000000000 +0200
171 +++ pthreads-snap-2004-06-22_w64+bacula-patch/ptw32_semwait.c 2009-01-06 17:17:19.000000000 +0100
173 #include "implement.h"
178 ptw32_semwait (sem_t * sem)
180 * ------------------------------------------------------
181 diff -Naur pthreads-snap-2004-06-22/ptw32_threadStart.c pthreads-snap-2004-06-22_w64+bacula-patch/ptw32_threadStart.c
182 --- pthreads-snap-2004-06-22/ptw32_threadStart.c 2004-05-17 03:38:03.000000000 +0200
183 +++ pthreads-snap-2004-06-22_w64+bacula-patch/ptw32_threadStart.c 2009-01-06 17:45:27.000000000 +0100
187 #if ! defined (__MINGW32__) || defined (__MSVCRT__)
188 - _endthreadex ((unsigned) status);
189 + _endthreadex ((unsigned) ((ULONG_PTR)status));
196 #if ! defined (__MINGW32__) || defined (__MSVCRT__)
197 - return (unsigned) status;
198 + return (unsigned) ((ULONG_PTR)status);
201 } /* ptw32_threadStart */
202 diff -Naur pthreads-snap-2004-06-22/ptw32_throw.c pthreads-snap-2004-06-22_w64+bacula-patch/ptw32_throw.c
203 --- pthreads-snap-2004-06-22/ptw32_throw.c 2004-05-17 03:38:03.000000000 +0200
204 +++ pthreads-snap-2004-06-22_w64+bacula-patch/ptw32_throw.c 2009-01-06 17:47:37.000000000 +0100
208 case PTW32_EPS_CANCEL:
209 - exitCode = (unsigned) PTHREAD_CANCELED;
210 + exitCode = (unsigned) ((ULONG_PTR)PTHREAD_CANCELED);
213 - exitCode = (unsigned) self->exitStatus;;
214 + exitCode = (unsigned) ((ULONG_PTR)self->exitStatus);;
218 diff -Naur pthreads-snap-2004-06-22/tests/barrier3.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/barrier3.c
219 --- pthreads-snap-2004-06-22/tests/barrier3.c 2003-08-19 05:31:51.000000000 +0200
220 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/barrier3.c 2009-01-06 17:17:19.000000000 +0100
224 pthread_barrier_t barrier = NULL;
225 -static int result = 1;
226 +static DWORD_PTR result = 1;
228 void * func(void * arg)
230 diff -Naur pthreads-snap-2004-06-22/tests/barrier5.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/barrier5.c
231 --- pthreads-snap-2004-06-22/tests/barrier5.c 2003-08-19 05:31:51.000000000 +0200
232 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/barrier5.c 2009-01-06 17:17:19.000000000 +0100
239 int serialThreadsTotal;
240 pthread_t t[NUMTHREADS + 1];
243 for (i = 1; i <= j; i++)
245 assert(pthread_join(t[i], (void **) &result) == 0);
246 - serialThreadsTotal += result;
247 + serialThreadsTotal += (int)result;
250 assert(serialThreadsTotal == BARRIERS - 1);
251 diff -Naur pthreads-snap-2004-06-22/tests/cancel2.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/cancel2.c
252 --- pthreads-snap-2004-06-22/tests/cancel2.c 2003-08-19 05:31:51.000000000 +0200
253 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/cancel2.c 2009-01-06 17:17:19.000000000 +0100
255 for (i = 1; i <= NUMTHREADS; i++)
259 + DWORD_PTR result = 0;
261 assert(pthread_join(t[i], (void **) &result) == 0);
262 fail = (result != (int) PTHREAD_CANCELED);
263 diff -Naur pthreads-snap-2004-06-22/tests/cancel3.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/cancel3.c
264 --- pthreads-snap-2004-06-22/tests/cancel3.c 2004-05-17 03:38:03.000000000 +0200
265 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/cancel3.c 2009-01-06 17:17:19.000000000 +0100
267 for (i = 1; i <= NUMTHREADS; i++)
271 + DWORD_PTR result = 0;
274 * The thread does not contain any cancelation points, so
275 diff -Naur pthreads-snap-2004-06-22/tests/cancel4.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/cancel4.c
276 --- pthreads-snap-2004-06-22/tests/cancel4.c 2004-05-17 03:38:03.000000000 +0200
277 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/cancel4.c 2009-01-06 17:17:19.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/cancel5.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/cancel5.c
288 --- pthreads-snap-2004-06-22/tests/cancel5.c 2004-05-17 03:38:03.000000000 +0200
289 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/cancel5.c 2009-01-06 17:17:19.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/cancel6a.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/cancel6a.c
300 --- pthreads-snap-2004-06-22/tests/cancel6a.c 2004-05-17 03:38:03.000000000 +0200
301 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/cancel6a.c 2009-01-06 17:17:19.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/cancel6d.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/cancel6d.c
312 --- pthreads-snap-2004-06-22/tests/cancel6d.c 2004-05-17 03:38:03.000000000 +0200
313 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/cancel6d.c 2009-01-06 17:17:19.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/cleanup0.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/cleanup0.c
324 --- pthreads-snap-2004-06-22/tests/cleanup0.c 2003-08-19 05:31:51.000000000 +0200
325 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/cleanup0.c 2009-01-06 17:17:19.000000000 +0100
327 for (i = 1; i <= NUMTHREADS; i++)
331 + DWORD_PTR result = 0;
333 assert(pthread_join(t[i], (void **) &result) == 0);
335 diff -Naur pthreads-snap-2004-06-22/tests/cleanup1.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/cleanup1.c
336 --- pthreads-snap-2004-06-22/tests/cleanup1.c 2003-08-19 05:31:51.000000000 +0200
337 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/cleanup1.c 2009-01-06 17:17:19.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/cleanup2.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/cleanup2.c
348 --- pthreads-snap-2004-06-22/tests/cleanup2.c 2003-08-19 05:31:51.000000000 +0200
349 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/cleanup2.c 2009-01-06 17:17:19.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/cleanup3.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/cleanup3.c
360 --- pthreads-snap-2004-06-22/tests/cleanup3.c 2003-08-19 05:31:51.000000000 +0200
361 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/cleanup3.c 2009-01-06 17:17:19.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/condvar1_2.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar1_2.c
372 --- pthreads-snap-2004-06-22/tests/condvar1_2.c 2003-08-19 05:31:51.000000000 +0200
373 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar1_2.c 2009-01-06 17:17:19.000000000 +0100
379 + DWORD_PTR result = -1;
382 for (k = 0; k < NUM_LOOPS; k++)
383 diff -Naur pthreads-snap-2004-06-22/tests/condvar2_1.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar2_1.c
384 --- pthreads-snap-2004-06-22/tests/condvar2_1.c 2004-05-20 02:56:52.000000000 +0200
385 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar2_1.c 2009-01-06 17:17:19.000000000 +0100
389 pthread_t t[NUMTHREADS + 1];
391 + DWORD_PTR result = 0;
392 struct _timeb currSysTime;
393 const DWORD NANOSEC_PER_MILLISEC = 1000000;
396 /* get current system time */
397 _ftime(&currSysTime);
399 - abstime.tv_sec = currSysTime.time;
400 + abstime.tv_sec = (long)currSysTime.time;
401 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
404 diff -Naur pthreads-snap-2004-06-22/tests/condvar2.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar2.c
405 --- pthreads-snap-2004-06-22/tests/condvar2.c 2004-05-20 02:56:52.000000000 +0200
406 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar2.c 2009-01-06 17:17:19.000000000 +0100
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;
417 assert(pthread_mutex_unlock(&mutex) == 0);
420 - int result = pthread_cond_destroy(&cv);
421 + DWORD_PTR result = pthread_cond_destroy(&cv);
424 fprintf(stderr, "Result = %s\n", error_string[result]);
425 diff -Naur pthreads-snap-2004-06-22/tests/condvar3_1.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar3_1.c
426 --- pthreads-snap-2004-06-22/tests/condvar3_1.c 2004-05-20 02:56:52.000000000 +0200
427 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar3_1.c 2009-01-06 17:17:19.000000000 +0100
431 pthread_t t[NUMTHREADS + 1];
433 + DWORD_PTR result = 0;
434 struct _timeb currSysTime;
435 const DWORD NANOSEC_PER_MILLISEC = 1000000;
438 /* get current system time */
439 _ftime(&currSysTime);
441 - abstime.tv_sec = currSysTime.time;
442 + abstime.tv_sec = (long)currSysTime.time;
443 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
446 diff -Naur pthreads-snap-2004-06-22/tests/condvar3_2.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar3_2.c
447 --- pthreads-snap-2004-06-22/tests/condvar3_2.c 2004-05-20 02:56:52.000000000 +0200
448 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar3_2.c 2009-01-06 17:17:19.000000000 +0100
452 pthread_t t[NUMTHREADS + 1];
454 + DWORD_PTR result = 0;
455 struct _timeb currSysTime;
456 const DWORD NANOSEC_PER_MILLISEC = 1000000;
459 /* get current system time */
460 _ftime(&currSysTime);
462 - abstime.tv_sec = abstime.tv_sec = currSysTime.time + 5;
463 + abstime.tv_sec = abstime.tv_sec = (long)currSysTime.time + 5;
464 abstime.tv_nsec = abstime2.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
466 assert(pthread_mutex_lock(&mutex) == 0);
467 diff -Naur pthreads-snap-2004-06-22/tests/condvar3_3.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar3_3.c
468 --- pthreads-snap-2004-06-22/tests/condvar3_3.c 2003-08-19 05:31:51.000000000 +0200
469 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar3_3.c 2009-01-06 17:17:19.000000000 +0100
471 /* get current system time */
472 _ftime(&currSysTime);
474 - abstime.tv_sec = currSysTime.time;
475 + abstime.tv_sec = (long)currSysTime.time;
476 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
481 assert(pthread_mutex_lock(&mtx) == 0);
483 - abstime.tv_sec = currSysTime.time;
484 + abstime.tv_sec = (long)currSysTime.time;
485 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
488 diff -Naur pthreads-snap-2004-06-22/tests/condvar3.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar3.c
489 --- pthreads-snap-2004-06-22/tests/condvar3.c 2003-08-19 05:31:51.000000000 +0200
490 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar3.c 2009-01-06 17:17:19.000000000 +0100
492 /* get current system time */
493 _ftime(&currSysTime);
495 - abstime.tv_sec = currSysTime.time;
496 + abstime.tv_sec = (long)currSysTime.time;
497 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
499 assert(pthread_create(&t[1], NULL, mythread, (void *) 1) == 0);
500 diff -Naur pthreads-snap-2004-06-22/tests/condvar4.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar4.c
501 --- pthreads-snap-2004-06-22/tests/condvar4.c 2003-08-19 05:31:51.000000000 +0200
502 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar4.c 2009-01-06 17:17:19.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;
514 _ftime(&currSysTime);
516 - abstime.tv_sec = currSysTime.time;
517 + abstime.tv_sec = (long)currSysTime.time;
518 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
521 diff -Naur pthreads-snap-2004-06-22/tests/condvar5.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar5.c
522 --- pthreads-snap-2004-06-22/tests/condvar5.c 2003-08-19 05:31:51.000000000 +0200
523 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar5.c 2009-01-06 17:17:19.000000000 +0100
525 /* get current system time */
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;
535 _ftime(&currSysTime);
537 - abstime.tv_sec = currSysTime.time;
538 + abstime.tv_sec = (long)currSysTime.time;
539 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
542 diff -Naur pthreads-snap-2004-06-22/tests/condvar6.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar6.c
543 --- pthreads-snap-2004-06-22/tests/condvar6.c 2003-08-19 05:31:51.000000000 +0200
544 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar6.c 2009-01-06 17:17:19.000000000 +0100
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/condvar7.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar7.c
555 --- pthreads-snap-2004-06-22/tests/condvar7.c 2003-08-19 05:31:51.000000000 +0200
556 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar7.c 2009-01-06 17:17:19.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;
565 abstime.tv_sec += 10;
566 diff -Naur pthreads-snap-2004-06-22/tests/condvar8.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar8.c
567 --- pthreads-snap-2004-06-22/tests/condvar8.c 2003-08-19 05:31:51.000000000 +0200
568 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar8.c 2009-01-06 17:17:19.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/condvar9.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar9.c
579 --- pthreads-snap-2004-06-22/tests/condvar9.c 2003-08-19 05:31:51.000000000 +0200
580 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/condvar9.c 2009-01-06 17:17:19.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;
590 diff -Naur pthreads-snap-2004-06-22/tests/context1.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/context1.c
591 --- pthreads-snap-2004-06-22/tests/context1.c 2004-05-20 02:56:52.000000000 +0200
592 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/context1.c 2009-01-06 17:17:19.000000000 +0100
597 +#if defined(_M_IX86)
598 context.Eip = (DWORD) anotherEnding;
600 + context.Rip = (DWORD64) anotherEnding;
602 SetThreadContext(hThread, &context);
603 ResumeThread(hThread);
605 diff -Naur pthreads-snap-2004-06-22/tests/delay2.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/delay2.c
606 --- pthreads-snap-2004-06-22/tests/delay2.c 2003-08-19 05:31:51.000000000 +0200
607 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/delay2.c 2009-01-06 17:17:19.000000000 +0100
609 main(int argc, char * argv[])
613 + DWORD_PTR result = 0;
615 assert(pthread_mutex_lock(&mx) == 0);
617 diff -Naur pthreads-snap-2004-06-22/tests/exception1.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/exception1.c
618 --- pthreads-snap-2004-06-22/tests/exception1.c 2003-08-19 05:31:51.000000000 +0200
619 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/exception1.c 2009-01-06 17:17:19.000000000 +0100
621 for (i = 0; i < NUMTHREADS; i++)
625 + DWORD_PTR result = 0;
627 /* Canceled thread */
628 assert(pthread_join(ct[i], (void **) &result) == 0);
629 diff -Naur pthreads-snap-2004-06-22/tests/GNUmakefile pthreads-snap-2004-06-22_w64+bacula-patch/tests/GNUmakefile
630 --- pthreads-snap-2004-06-22/tests/GNUmakefile 2004-06-22 08:12:55.000000000 +0200
631 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/GNUmakefile 2009-01-06 17:17:19.000000000 +0100
633 DLL = pthread$(GCX).dll
634 QAPC = ../QueueUserAPCEx/User/quserex.dll
636 -COPYFILES = $(HDR) $(LIB) $(DLL) $(QAPC)
637 +COPYFILES = $(HDR) $(LIB) $(DLL)
639 # If a test case returns a non-zero exit code to the shell, make will
641 diff -Naur pthreads-snap-2004-06-22/tests/join0.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/join0.c
642 --- pthreads-snap-2004-06-22/tests/join0.c 2003-08-19 05:31:51.000000000 +0200
643 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/join0.c 2009-01-06 17:17:19.000000000 +0100
645 main(int argc, char * argv[])
651 /* Create a single thread and wait for it to exit. */
652 assert(pthread_create(&id, NULL, func, (void *) 123) == 0);
653 diff -Naur pthreads-snap-2004-06-22/tests/join1.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/join1.c
654 --- pthreads-snap-2004-06-22/tests/join1.c 2003-08-19 05:31:51.000000000 +0200
655 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/join1.c 2009-01-06 17:17:19.000000000 +0100
663 /* Create a few threads and then exit. */
664 for (i = 0; i < 4; i++)
665 diff -Naur pthreads-snap-2004-06-22/tests/join2.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/join2.c
666 --- pthreads-snap-2004-06-22/tests/join2.c 2003-08-19 05:31:51.000000000 +0200
667 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/join2.c 2009-01-06 17:17:19.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/join3.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/join3.c
678 --- pthreads-snap-2004-06-22/tests/join3.c 2004-05-22 03:17:58.000000000 +0200
679 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/join3.c 2009-01-06 17:17:19.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/mutex6e.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex6e.c
690 --- pthreads-snap-2004-06-22/tests/mutex6e.c 2003-08-19 05:31:51.000000000 +0200
691 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex6e.c 2009-01-06 17:17:19.000000000 +0100
697 + DWORD_PTR result = 0;
700 assert(pthread_mutexattr_init(&mxAttr) == 0);
701 diff -Naur pthreads-snap-2004-06-22/tests/mutex6es.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex6es.c
702 --- pthreads-snap-2004-06-22/tests/mutex6es.c 2004-06-22 08:12:55.000000000 +0200
703 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex6es.c 2009-01-06 17:17:19.000000000 +0100
709 + DWORD_PTR result = 0;
711 assert(mutex == PTHREAD_ERRORCHECK_MUTEX_INITIALIZER);
713 diff -Naur pthreads-snap-2004-06-22/tests/mutex6r.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex6r.c
714 --- pthreads-snap-2004-06-22/tests/mutex6r.c 2003-08-19 05:31:51.000000000 +0200
715 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex6r.c 2009-01-06 17:17:19.000000000 +0100
721 + DWORD_PTR result = 0;
724 assert(pthread_mutexattr_init(&mxAttr) == 0);
725 diff -Naur pthreads-snap-2004-06-22/tests/mutex6rs.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex6rs.c
726 --- pthreads-snap-2004-06-22/tests/mutex6rs.c 2004-06-22 08:12:55.000000000 +0200
727 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex6rs.c 2009-01-06 17:17:19.000000000 +0100
733 + DWORD_PTR result = 0;
735 assert(mutex == PTHREAD_RECURSIVE_MUTEX_INITIALIZER);
737 diff -Naur pthreads-snap-2004-06-22/tests/mutex7e.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex7e.c
738 --- pthreads-snap-2004-06-22/tests/mutex7e.c 2003-08-19 05:31:51.000000000 +0200
739 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex7e.c 2009-01-06 17:17:19.000000000 +0100
745 + DWORD_PTR result = 0;
748 assert(pthread_mutexattr_init(&mxAttr) == 0);
749 diff -Naur pthreads-snap-2004-06-22/tests/mutex7r.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex7r.c
750 --- pthreads-snap-2004-06-22/tests/mutex7r.c 2003-08-19 05:31:51.000000000 +0200
751 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex7r.c 2009-01-06 17:17:19.000000000 +0100
757 + DWORD_PTR result = 0;
760 assert(pthread_mutexattr_init(&mxAttr) == 0);
761 diff -Naur pthreads-snap-2004-06-22/tests/mutex8.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex8.c
762 --- pthreads-snap-2004-06-22/tests/mutex8.c 2002-02-20 05:39:56.000000000 +0100
763 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex8.c 2009-01-06 17:17:19.000000000 +0100
766 _ftime(&currSysTime);
768 - abstime.tv_sec = currSysTime.time;
769 + abstime.tv_sec = (long)currSysTime.time;
770 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
773 diff -Naur pthreads-snap-2004-06-22/tests/mutex8e.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex8e.c
774 --- pthreads-snap-2004-06-22/tests/mutex8e.c 2002-02-20 05:39:56.000000000 +0100
775 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex8e.c 2009-01-06 17:17:19.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/mutex8n.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex8n.c
786 --- pthreads-snap-2004-06-22/tests/mutex8n.c 2002-02-20 05:39:56.000000000 +0100
787 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex8n.c 2009-01-06 17:17:19.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/mutex8r.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex8r.c
798 --- pthreads-snap-2004-06-22/tests/mutex8r.c 2002-02-20 05:39:56.000000000 +0100
799 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/mutex8r.c 2009-01-06 17:17:19.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/rwlock2_t.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/rwlock2_t.c
810 --- pthreads-snap-2004-06-22/tests/rwlock2_t.c 2003-08-19 05:31:51.000000000 +0200
811 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/rwlock2_t.c 2009-01-06 17:17:19.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/rwlock3_t.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/rwlock3_t.c
822 --- pthreads-snap-2004-06-22/tests/rwlock3_t.c 2003-08-19 05:31:51.000000000 +0200
823 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/rwlock3_t.c 2009-01-06 17:17:19.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/rwlock4_t.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/rwlock4_t.c
834 --- pthreads-snap-2004-06-22/tests/rwlock4_t.c 2003-08-19 05:31:51.000000000 +0200
835 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/rwlock4_t.c 2009-01-06 17:17:19.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/rwlock5_t.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/rwlock5_t.c
846 --- pthreads-snap-2004-06-22/tests/rwlock5_t.c 2003-08-19 05:31:51.000000000 +0200
847 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/rwlock5_t.c 2009-01-06 17:17:19.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/rwlock6.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/rwlock6.c
858 --- pthreads-snap-2004-06-22/tests/rwlock6.c 2003-08-19 05:31:51.000000000 +0200
859 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/rwlock6.c 2009-01-06 17:17:19.000000000 +0100
867 + DWORD_PTR wr1Result = 0;
868 + DWORD_PTR wr2Result = 0;
869 + DWORD_PTR rdResult = 0;
873 diff -Naur pthreads-snap-2004-06-22/tests/rwlock6_t2.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/rwlock6_t2.c
874 --- pthreads-snap-2004-06-22/tests/rwlock6_t2.c 2003-08-19 05:31:51.000000000 +0200
875 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/rwlock6_t2.c 2009-01-06 17:17:19.000000000 +0100
883 + DWORD_PTR wr1Result = 0;
884 + DWORD_PTR wr2Result = 0;
885 + DWORD_PTR rdResult = 0;
886 struct _timeb currSysTime;
887 const DWORD NANOSEC_PER_MILLISEC = 1000000;
889 _ftime(&currSysTime);
891 - abstime.tv_sec = currSysTime.time;
892 + abstime.tv_sec = (long)currSysTime.time;
893 abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
896 diff -Naur pthreads-snap-2004-06-22/tests/rwlock6_t.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/rwlock6_t.c
897 --- pthreads-snap-2004-06-22/tests/rwlock6_t.c 2003-08-19 05:31:51.000000000 +0200
898 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/rwlock6_t.c 2009-01-06 17:17:19.000000000 +0100
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;
916 + DWORD_PTR wr1Result = 0;
917 + DWORD_PTR wr2Result = 0;
918 + DWORD_PTR rd1Result = 0;
919 + DWORD_PTR rd2Result = 0;
923 diff -Naur pthreads-snap-2004-06-22/tests/semaphore1.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/semaphore1.c
924 --- pthreads-snap-2004-06-22/tests/semaphore1.c 2003-08-19 05:31:51.000000000 +0200
925 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/semaphore1.c 2009-01-06 17:17:19.000000000 +0100
933 assert(pthread_create(&t, NULL, thr, NULL) == 0);
934 assert(pthread_join(t, (void **)&result) == 0);
935 diff -Naur pthreads-snap-2004-06-22/tests/spin4.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/spin4.c
936 --- pthreads-snap-2004-06-22/tests/spin4.c 2003-08-19 05:31:51.000000000 +0200
937 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/spin4.c 2009-01-06 17:17:19.000000000 +0100
943 + DWORD_PTR result = 0;
946 struct _timeb sysTime;
947 diff -Naur pthreads-snap-2004-06-22/tests/tsd1.c pthreads-snap-2004-06-22_w64+bacula-patch/tests/tsd1.c
948 --- pthreads-snap-2004-06-22/tests/tsd1.c 2003-08-19 05:31:51.000000000 +0200
949 +++ pthreads-snap-2004-06-22_w64+bacula-patch/tests/tsd1.c 2009-01-06 17:17:19.000000000 +0100
952 for (i = 1; i < 10; i++)
955 + DWORD_PTR result = 0;
957 assert(pthread_join(thread[i], (void **) &result) == 0);