On Thu, Jul 8, 2010 at 23:04, Dongsheng Song <[email protected]>wrote:

> Hi,
>
> Due to recent update of pthread-w32, the patch:
>
> <http://sourceware.org/ml/pthreads-win32/2009/msg00030/w64sup.patch>
>
> can not apply cleanly, have some conflicts now, is there have any update
> patch ?
>
> Regards,
> Dongsheng
>
>
Without patch, x86_64-w64-mingw32-gcc build pthreads got lots of warning:

$ make clean GC CROSS=x86_64-w64-mingw32-
rm -f *~
rm -f *.i
rm -f *.o
rm -f *.obj
rm -f *.exe
rm -f pthread.def
make CLEANUP=-D__CLEANUP_C XC_FLAGS=" " OBJ="attr.o barrier.o cancel.o
cleanup.o condvar.o create.o dll.o errno.o exit.o fork.o global.o misc.o
mutex.o nonportable.o private.o rwlock.o sched.o semaphore.o signal.o spin.o
sync.o tsd.o version.o" pthreadGC2.dll
make[1]: Entering directory `/home/oracle/vcs/cvs/pthreads-win32'
x86_64-w64-mingw32-gcc -c -o attr.o -D__CLEANUP_C -O3 -finline-functions
-I. -DHAVE_CONFIG_H -Wall  attr.c
x86_64-w64-mingw32-gcc -c -o barrier.o -D__CLEANUP_C -O3 -finline-functions
-I. -DHAVE_CONFIG_H -Wall  barrier.c
x86_64-w64-mingw32-gcc -c -o cancel.o -D__CLEANUP_C -O3 -finline-functions
-I. -DHAVE_CONFIG_H -Wall  cancel.c
In file included from cancel.c:44:0:
pthread_cancel.c: In function 'pthread_cancel':
pthread_cancel.c:160:8: warning: passing argument 1 of
'ptw32_register_cancelation' from incompatible pointer type
pthread_cancel.c:160:8: note: expected 'PAPCFUNC' but argument is of type
'void (*)(DWORD)'
x86_64-w64-mingw32-gcc -c -o cleanup.o -D__CLEANUP_C -O3 -finline-functions
-I. -DHAVE_CONFIG_H -Wall  cleanup.c
x86_64-w64-mingw32-gcc -c -o condvar.o -D__CLEANUP_C -O3 -finline-functions
-I. -DHAVE_CONFIG_H -Wall  condvar.c
x86_64-w64-mingw32-gcc -c -o create.o -D__CLEANUP_C -O3 -finline-functions
-I. -DHAVE_CONFIG_H -Wall  create.c
x86_64-w64-mingw32-gcc -c -o dll.o -D__CLEANUP_C -O3 -finline-functions  -I.
-DHAVE_CONFIG_H -Wall  dll.c
x86_64-w64-mingw32-gcc -c -o errno.o -D__CLEANUP_C -O3 -finline-functions
-I. -DHAVE_CONFIG_H -Wall  errno.c
x86_64-w64-mingw32-gcc -c -o exit.o -D__CLEANUP_C -O3 -finline-functions
-I. -DHAVE_CONFIG_H -Wall  exit.c
In file included from exit.c:44:0:
pthread_exit.c: In function 'pthread_exit':
pthread_exit.c:92:21: warning: cast from pointer to integer of different
size
x86_64-w64-mingw32-gcc -c -o fork.o -D__CLEANUP_C -O3 -finline-functions
-I. -DHAVE_CONFIG_H -Wall  fork.c
x86_64-w64-mingw32-gcc -c -o global.o -D__CLEANUP_C -O3 -finline-functions
-I. -DHAVE_CONFIG_H -Wall  global.c
x86_64-w64-mingw32-gcc -c -o misc.o -D__CLEANUP_C -O3 -finline-functions
-I. -DHAVE_CONFIG_H -Wall  misc.c
x86_64-w64-mingw32-gcc -c -o mutex.o -D__CLEANUP_C -O3 -finline-functions
-I. -DHAVE_CONFIG_H -Wall  mutex.c
x86_64-w64-mingw32-gcc -c -o nonportable.o -D__CLEANUP_C -O3
-finline-functions  -I. -DHAVE_CONFIG_H -Wall  nonportable.c
In file included from nonportable.c:46:0:
pthread_timechange_handler_np.c: In function
'pthread_timechange_handler_np':
pthread_timechange_handler_np.c:106:10: warning: cast to pointer from
integer of different size
x86_64-w64-mingw32-gcc -c -o private.o -D__CLEANUP_C -O3 -finline-functions
-I. -DHAVE_CONFIG_H -Wall  private.c
In file included from private.c:44:0:
ptw32_MCS_lock.c: In function 'ptw32_mcs_flag_set':
ptw32_MCS_lock.c:104:14: warning: cast to pointer from integer of different
size
ptw32_MCS_lock.c: In function 'ptw32_mcs_flag_wait':
ptw32_MCS_lock.c:132:22: warning: cast from pointer to integer of different
size
ptw32_MCS_lock.c: In function 'ptw32_mcs_lock_acquire':
ptw32_MCS_lock.c:163:21: warning: cast from pointer to integer of different
size
ptw32_MCS_lock.c:162:10: warning: cast to pointer from integer of different
size
ptw32_MCS_lock.c: In function 'ptw32_mcs_lock_release':
ptw32_MCS_lock.c:186:34: warning: cast to pointer from integer of different
size
ptw32_MCS_lock.c:197:11: warning: cast from pointer to integer of different
size
ptw32_MCS_lock.c:194:19: warning: cast to pointer from integer of different
size
ptw32_MCS_lock.c:205:14: warning: cast to pointer from integer of different
size
ptw32_MCS_lock.c: In function 'ptw32_mcs_lock_try_acquire':
ptw32_MCS_lock.c:226:39: warning: cast from pointer to integer of different
size
ptw32_MCS_lock.c:224:11: warning: cast to pointer from integer of different
size
ptw32_MCS_lock.c: In function 'ptw32_mcs_node_substitute':
ptw32_MCS_lock.c:251:68: warning: cast from pointer to integer of different
size
ptw32_MCS_lock.c:252:68: warning: cast from pointer to integer of different
size
ptw32_MCS_lock.c:250:7: warning: cast to pointer from integer of different
size
In file included from private.c:48:0:
ptw32_threadStart.c: In function 'ptw32_threadStart':
ptw32_threadStart.c:347:17: warning: cast from pointer to integer of
different size
ptw32_threadStart.c:357:10: warning: cast from pointer to integer of
different size
In file included from private.c:56:0:
ptw32_throw.c: In function 'ptw32_throw':
ptw32_throw.c:82:15: warning: cast from pointer to integer of different size
ptw32_throw.c:87:19: warning: cast from pointer to integer of different size
ptw32_throw.c: In function 'ptw32_get_exception_services_code':
ptw32_throw.c:169:10: warning: cast from pointer to integer of different
size
x86_64-w64-mingw32-gcc -c -o rwlock.o -D__CLEANUP_C -O3 -finline-functions
-I. -DHAVE_CONFIG_H -Wall  rwlock.c
x86_64-w64-mingw32-gcc -c -o sched.o -D__CLEANUP_C -O3 -finline-functions
-I. -DHAVE_CONFIG_H -Wall  sched.c
x86_64-w64-mingw32-gcc -c -o semaphore.o -D__CLEANUP_C -O3
-finline-functions  -I. -DHAVE_CONFIG_H -Wall  semaphore.c
x86_64-w64-mingw32-gcc -c -o signal.o -D__CLEANUP_C -O3 -finline-functions
-I. -DHAVE_CONFIG_H -Wall  signal.c
x86_64-w64-mingw32-gcc -c -o spin.o -D__CLEANUP_C -O3 -finline-functions
-I. -DHAVE_CONFIG_H -Wall  spin.c
In file included from spin.c:43:0:
pthread_spin_destroy.c: In function 'pthread_spin_destroy':
pthread_spin_destroy.c:61:10: warning: cast from pointer to integer of
different size
x86_64-w64-mingw32-gcc -c -o sync.o -D__CLEANUP_C -O3 -finline-functions
-I. -DHAVE_CONFIG_H -Wall  sync.c
x86_64-w64-mingw32-gcc -c -o tsd.o -D__CLEANUP_C -O3 -finline-functions  -I.
-DHAVE_CONFIG_H -Wall  tsd.c
x86_64-w64-mingw32-windres --include-dir=. -D__CLEANUP_C -o version.o
version.rc
x86_64-w64-mingw32-gcc -D__CLEANUP_C -O3 -finline-functions -shared -o
pthreadGC2.dll attr.o barrier.o cancel.o cleanup.o condvar.o create.o dll.o
errno.o exit.o fork.o global.o misc.o mutex.o nonportable.o private.o
rwlock.o sched.o semaphore.o signal.o spin.o sync.o tsd.o version.o
x86_64-w64-mingw32-dlltool -z pthread.def attr.o barrier.o cancel.o
cleanup.o condvar.o create.o dll.o errno.o exit.o fork.o global.o misc.o
mutex.o nonportable.o private.o rwlock.o sched.o semaphore.o signal.o spin.o
sync.o tsd.o version.o
x86_64-w64-mingw32-dlltool -k --dllname pthreadGC2.dll --output-lib
libpthreadGC2.a --def pthread.def
make[1]: Leaving directory `/home/oracle/vcs/cvs/pthreads-win32'



PS:  For 32bit target, pthread has a wrong assumption:
Index: config.h
===================================================================
RCS file: /cvs/pthreads-win32/pthreads/config.h,v
retrieving revision 1.17
diff -u -p -r1.17 config.h
--- config.h    20 Jun 2010 03:31:19 -0000      1.17
+++ config.h    9 Jul 2010 06:41:14 -0000
@@ -124,6 +124,7 @@

 #ifdef __MINGW32__
 #define HAVE_MODE_T
+#define HAVE_STRUCT_TIMESPEC
 #endif

 #ifdef __BORLANDC__
Index: pthread.h
===================================================================
RCS file: /cvs/pthreads-win32/pthreads/pthread.h,v
retrieving revision 1.140
diff -u -p -r1.140 pthread.h
--- pthread.h   20 Jun 2010 03:31:19 -0000      1.140
+++ pthread.h   9 Jul 2010 06:41:14 -0000
@@ -247,6 +247,7 @@ enum {
 #  endif
 #  if defined(_UWIN) || defined(__MINGW32__)
 #    define HAVE_MODE_T
+#    define HAVE_STRUCT_TIMESPEC
 #  endif
 #endif
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to