[Mingw-w64-public] winpthreads svn 4642 issue

2011-11-29 Thread xunxun
winpthreads svn 4642 add a header file called pthread_compat.h, but is 
missing in makefile.in when installing.


--
Best Regards,
xunxun

Index: Makefile.am
===
--- Makefile.am (revision 4645)
+++ Makefile.am (working copy)
@@ -19,7 +19,7 @@
   src/barrier.c  src/cond.c  src/misc.c  src/mutex.c  src/rwlock.c  
src/spinlock.c  src/thread.c  src/ref.c  src/sem.c  src/sched.c \
   src/winpthread_internal.h  src/clock.c src/nanosleep.c src/version.rc
 
-include_HEADERS = include/pthread.h include/sched.h include/semaphore.h 
include/pthread_unistd.h include/pthread_time.h
+include_HEADERS = include/pthread.h include/sched.h include/semaphore.h 
include/pthread_unistd.h include/pthread_time.h include/pthread_compat.h
 
 DISTCHECK_CONFIGURE_FLAGS = --host=$(host_triplet)
 
Index: Makefile.in
===
--- Makefile.in (revision 4645)
+++ Makefile.in (working copy)
@@ -274,7 +274,7 @@
   src/barrier.c  src/cond.c  src/misc.c  src/mutex.c  src/rwlock.c  
src/spinlock.c  src/thread.c  src/ref.c  src/sem.c  src/sched.c \
   src/winpthread_internal.h  src/clock.c src/nanosleep.c src/version.rc
 
-include_HEADERS = include/pthread.h include/sched.h include/semaphore.h 
include/pthread_unistd.h include/pthread_time.h
+include_HEADERS = include/pthread.h include/sched.h include/semaphore.h 
include/pthread_unistd.h include/pthread_time.h include/pthread_compat.h
 DISTCHECK_CONFIGURE_FLAGS = --host=$(host_triplet)
 noinst_LTLIBRARIES = libdummy.la
 libwinpthread_la_LIBADD = libdummy.la
--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] winpthreads svn 4642 issue

2011-11-29 Thread Ruben Van Boxem
2011/11/29 xunxun 

> winpthreads svn 4642 add a header file called pthread_compat.h, but is
> missing in makefile.in when installing.


You are correct, I missed that.

Could someone please commit below patch and regenerate autoshizzle files (I
don't have autotools installed, nor am I on Linux)?
Index: Makefile.in
===
--- Makefile.in (revision 4641)
+++ Makefile.in (working copy)
@@ -274,7 +274,7 @@
   src/barrier.c  src/cond.c  src/misc.c  src/mutex.c  src/rwlock.c
 src/spinlock.c  src/thread.c  src/ref.c  src/sem.c  src/sched.c \
   src/winpthread_internal.h  src/clock.c src/nanosleep.c src/version.rc

-include_HEADERS = include/pthread.h include/sched.h include/semaphore.h
include/pthread_unistd.h include/pthread_time.h
+include_HEADERS = include/pthread.h include/sched.h include/semaphore.h
include/pthread_unistd.h include/pthread_time.h include/pthread_compat.h
 DISTCHECK_CONFIGURE_FLAGS = --host=$(host_triplet)
 noinst_LTLIBRARIES = libdummy.la
 libwinpthread_la_LIBADD = libdummy.la

Thanks!

Ruben


>
>
> --
> Best Regards,
> xunxun
>
>
>
> --
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] winpthreads svn 4642 issue

2011-11-29 Thread Ozkan Sezer
On Tue, Nov 29, 2011 at 6:41 PM, Ruben Van Boxem
 wrote:
> 2011/11/29 xunxun 
>>
>> winpthreads svn 4642 add a header file called pthread_compat.h, but is
>> missing in makefile.in when installing.
>
>
> You are correct, I missed that.
>
> Could someone please commit below patch and regenerate autoshizzle files (I
> don't have autotools installed, nor am I on Linux)?
> Index: Makefile.in
> ===
> --- Makefile.in (revision 4641)
> +++ Makefile.in (working copy)
> @@ -274,7 +274,7 @@
>    src/barrier.c  src/cond.c  src/misc.c  src/mutex.c  src/rwlock.c
>  src/spinlock.c  src/thread.c  src/ref.c  src/sem.c  src/sched.c \
>    src/winpthread_internal.h  src/clock.c src/nanosleep.c src/version.rc
>
> -include_HEADERS = include/pthread.h include/sched.h include/semaphore.h
> include/pthread_unistd.h include/pthread_time.h
> +include_HEADERS = include/pthread.h include/sched.h include/semaphore.h
> include/pthread_unistd.h include/pthread_time.h include/pthread_compat.h
>  DISTCHECK_CONFIGURE_FLAGS = --host=$(host_triplet)
>  noinst_LTLIBRARIES = libdummy.la
>  libwinpthread_la_LIBADD = libdummy.la
>
> Thanks!
>
> Ruben

While you are working on that, remember that you were going to
fix that new header for clashes?

--
O.S.

--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] winpthreads svn 4642 issue

2011-11-30 Thread Ruben Van Boxem
2011/11/29 Ozkan Sezer 

> On Tue, Nov 29, 2011 at 6:41 PM, Ruben Van Boxem
>  wrote:
> > 2011/11/29 xunxun 
> >>
> >> winpthreads svn 4642 add a header file called pthread_compat.h, but is
> >> missing in makefile.in when installing.
> >
> >
> > You are correct, I missed that.
> >
> > Could someone please commit below patch and regenerate autoshizzle files
> (I
> > don't have autotools installed, nor am I on Linux)?
> > Index: Makefile.in
> > ===
> > --- Makefile.in (revision 4641)
> > +++ Makefile.in (working copy)
> > @@ -274,7 +274,7 @@
> >src/barrier.c  src/cond.c  src/misc.c  src/mutex.c  src/rwlock.c
> >  src/spinlock.c  src/thread.c  src/ref.c  src/sem.c  src/sched.c \
> >src/winpthread_internal.h  src/clock.c src/nanosleep.c src/version.rc
> >
> > -include_HEADERS = include/pthread.h include/sched.h include/semaphore.h
> > include/pthread_unistd.h include/pthread_time.h
> > +include_HEADERS = include/pthread.h include/sched.h include/semaphore.h
> > include/pthread_unistd.h include/pthread_time.h include/pthread_compat.h
> >  DISTCHECK_CONFIGURE_FLAGS = --host=$(host_triplet)
> >  noinst_LTLIBRARIES = libdummy.la
> >  libwinpthread_la_LIBADD = libdummy.la
> >
> > Thanks!
> >
> > Ruben
>
> While you are working on that, remember that you were going to
> fix that new header for clashes?
>

Yes, and here is the required changes. It still includes the
makefile.inbit, which needs some autotools love, which my windows box
is unable to
give. I tested with 64-bit GCC and MSVC.

If anyone with autotools present could please apply this patch, I and
anyone trying to use SVN HEAD would be very grateful!

Ruben


> --
> O.S.
>
>
> --
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
Index: Makefile.in
===
--- Makefile.in (revision 4645)
+++ Makefile.in (working copy)
@@ -274,7 +274,7 @@
   src/barrier.c  src/cond.c  src/misc.c  src/mutex.c  src/rwlock.c  
src/spinlock.c  src/thread.c  src/ref.c  src/sem.c  src/sched.c \
   src/winpthread_internal.h  src/clock.c src/nanosleep.c src/version.rc
 
-include_HEADERS = include/pthread.h include/sched.h include/semaphore.h 
include/pthread_unistd.h include/pthread_time.h
+include_HEADERS = include/pthread.h include/sched.h include/semaphore.h 
include/pthread_unistd.h include/pthread_time.h include/pthread_compat.h
 DISTCHECK_CONFIGURE_FLAGS = --host=$(host_triplet)
 noinst_LTLIBRARIES = libdummy.la
 libwinpthread_la_LIBADD = libdummy.la
Index: include/pthread_compat.h
===
--- include/pthread_compat.h(revision 4645)
+++ include/pthread_compat.h(working copy)
@@ -60,16 +60,22 @@
 #ifndef WIN_PTHREADS_PTHREAD_COMPAT_H
 #define WIN_PTHREADS_PTHREAD_COMPAT_H
 
-#ifdef _MSC_VER
+#ifdef __GNUC__
 
+#define WINPTHREADS_INLINE inline
+#define WINPTHREADS_ATTRIBUTE(X) __attribute__(X)
+#define WINPTHREADS_SECTION(X) __section__(X)
+
+#elif _MSC_VER
+
 #include "pthread_time.h"
 
 typedef __int64 pid_t;
 typedef int clockid_t;
 
-#define inline __inline
-#define __attribute__(X) __declspec X
-#define __section__(X) allocate(X)
+#define WINPTHREADS_INLINE __inline
+#define WINPTHREADS_ATTRIBUTE(X) __declspec X
+#define WINPTHREADS_SECTION(X) allocate(X)
 
 #endif
 
Index: src/misc.h
===
--- src/misc.h  (revision 4645)
+++ src/misc.h  (working copy)
@@ -82,7 +82,7 @@
 #define VALID(x)if (!(p)) return EINVAL;
 
 /* ms can be 64 bit, solve wrap-around issues: */
-static inline unsigned long dwMilliSecs(unsigned long long ms)
+static WINPTHREADS_INLINE unsigned long dwMilliSecs(unsigned long long ms)
 {
   if (ms >= 0xULL) return 0xul;
   return (unsigned long) ms;
Index: src/rwlock.c
===
--- src/rwlock.c(revision 4645)
+++ src/rwlock.c(working copy)
@@ -31,9 +31,9 @@
 
 static spin_t rwl_global = {0,LIFE_SPINLOCK,1};
 
-static __attribute__((noinline)) int rwlock_static_init(pthread_rwlock_t *rw);
+static WINPTHREADS_ATTRIBUTE((noinline)) int 
rwlock_static_init(pthread_rwlock_t *rw);
 
-static __attribute__ ((noinline)) int rwl_unref(volatile pthread_rwlock_t 
*rwl, int res)
+static WINPTHREADS_ATTRIBUTE((noinline)) int rwl_unref(volatile 
pthread_rwlock_t *rwl, int res)
 {
 _spin_lite_lock(&rwl_global);
 #ifd

Re: [Mingw-w64-public] winpthreads svn 4642 issue

2011-11-30 Thread Ozkan Sezer
On Wed, Nov 30, 2011 at 12:20 PM, Ruben Van Boxem
 wrote:
> 2011/11/29 Ozkan Sezer 
>>
>> On Tue, Nov 29, 2011 at 6:41 PM, Ruben Van Boxem
>>  wrote:
>> > 2011/11/29 xunxun 
>> >>
>> >> winpthreads svn 4642 add a header file called pthread_compat.h, but is
>> >> missing in makefile.in when installing.
>> >
>> >
>> > You are correct, I missed that.
>> >
>> > Could someone please commit below patch and regenerate autoshizzle files
>> > (I
>> > don't have autotools installed, nor am I on Linux)?
>> > Index: Makefile.in
>> > ===
>> > --- Makefile.in (revision 4641)
>> > +++ Makefile.in (working copy)
>> > @@ -274,7 +274,7 @@
>> >    src/barrier.c  src/cond.c  src/misc.c  src/mutex.c  src/rwlock.c
>> >  src/spinlock.c  src/thread.c  src/ref.c  src/sem.c  src/sched.c \
>> >    src/winpthread_internal.h  src/clock.c src/nanosleep.c src/version.rc
>> >
>> > -include_HEADERS = include/pthread.h include/sched.h include/semaphore.h
>> > include/pthread_unistd.h include/pthread_time.h
>> > +include_HEADERS = include/pthread.h include/sched.h include/semaphore.h
>> > include/pthread_unistd.h include/pthread_time.h include/pthread_compat.h
>> >  DISTCHECK_CONFIGURE_FLAGS = --host=$(host_triplet)
>> >  noinst_LTLIBRARIES = libdummy.la
>> >  libwinpthread_la_LIBADD = libdummy.la
>> >
>> > Thanks!
>> >
>> > Ruben
>>
>> While you are working on that, remember that you were going to
>> fix that new header for clashes?
>
>
> Yes, and here is the required changes. It still includes the makefile.in
> bit, which needs some autotools love, which my windows box is unable to
> give. I tested with 64-bit GCC and MSVC.
>
> If anyone with autotools present could please apply this patch, I and anyone
> trying to use SVN HEAD would be very grateful!
>
> Ruben

Applied your patch at rev. 4646.

Also applied a patch at rev. 4647 to fix pid_t for 32 bits _MSC_VER

--
O.S.

--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] winpthreads svn 4642 issue

2011-11-30 Thread Ruben Van Boxem
2011/11/30 Ozkan Sezer 

> On Wed, Nov 30, 2011 at 12:20 PM, Ruben Van Boxem
>  wrote:
> > 2011/11/29 Ozkan Sezer 
> >>
> >> On Tue, Nov 29, 2011 at 6:41 PM, Ruben Van Boxem
> >>  wrote:
> >> > 2011/11/29 xunxun 
> >> >>
> >> >> winpthreads svn 4642 add a header file called pthread_compat.h, but
> is
> >> >> missing in makefile.in when installing.
> >> >
> >> >
> >> > You are correct, I missed that.
> >> >
> >> > Could someone please commit below patch and regenerate autoshizzle
> files
> >> > (I
> >> > don't have autotools installed, nor am I on Linux)?
> >> > Index: Makefile.in
> >> > ===
> >> > --- Makefile.in (revision 4641)
> >> > +++ Makefile.in (working copy)
> >> > @@ -274,7 +274,7 @@
> >> >src/barrier.c  src/cond.c  src/misc.c  src/mutex.c  src/rwlock.c
> >> >  src/spinlock.c  src/thread.c  src/ref.c  src/sem.c  src/sched.c \
> >> >src/winpthread_internal.h  src/clock.c src/nanosleep.c
> src/version.rc
> >> >
> >> > -include_HEADERS = include/pthread.h include/sched.h
> include/semaphore.h
> >> > include/pthread_unistd.h include/pthread_time.h
> >> > +include_HEADERS = include/pthread.h include/sched.h
> include/semaphore.h
> >> > include/pthread_unistd.h include/pthread_time.h
> include/pthread_compat.h
> >> >  DISTCHECK_CONFIGURE_FLAGS = --host=$(host_triplet)
> >> >  noinst_LTLIBRARIES = libdummy.la
> >> >  libwinpthread_la_LIBADD = libdummy.la
> >> >
> >> > Thanks!
> >> >
> >> > Ruben
> >>
> >> While you are working on that, remember that you were going to
> >> fix that new header for clashes?
> >
> >
> > Yes, and here is the required changes. It still includes the makefile.in
> > bit, which needs some autotools love, which my windows box is unable to
> > give. I tested with 64-bit GCC and MSVC.
> >
> > If anyone with autotools present could please apply this patch, I and
> anyone
> > trying to use SVN HEAD would be very grateful!
> >
> > Ruben
>
> Applied your patch at rev. 4646.
>
> Also applied a patch at rev. 4647 to fix pid_t for 32 bits _MSC_VER
>

You're awesome as always, thanks!

Ruben


>
> --
> O.S.
>
>
> --
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public