Hi Ozkan.

I checked out your patch. But the problem remained. clock_ * functions
are not exported.
I attach a patch. Check it out please.

niXman.


2012/1/4 Ozkan Sezer <seze...@gmail.com>:
> On Wed, Jan 4, 2012 at 6:32 PM, niXman <i.nix...@gmail.com> wrote:
>> No, I have not tested your patch.
>> I only agreed that your patch is easier, and suggested that you check it.
>>
>
> Well then, next time I will strive to understand hidden meanings in
> other people's text
>
> At any rate,  I applied the attached minor patch to compile it (the
> makefile CFLAGS parts of it is to reduce the preprocessed source size)
> was able to compile it and the resulting dll seems to have the clock.c
> functions.
>
> Do "test" this time, please.
>
>
>> 2012/1/4 Ozkan Sezer <seze...@gmail.com>:
>>> On Wed, Jan 4, 2012 at 4:58 PM, Ruben Van Boxem
>>> <vanboxem.ru...@gmail.com> wrote:
>>>> 2012/1/4 niXman <i.nix...@gmail.com>
>>>>>
>>>>> Hi Ozkan.
>>>>>
>>>>> I test the winpthread(rev 4706) with you patch. But clock_* functions
>>>>> also not exported.
>>>>
>>>
>>> I don't have the earlier mails from this thread, but I remember
>>> that you reported success with the patch only after that I applied
>>> it.  How did it succeed that time and now it doesn't?
>>>
>>>>
>>>> I saw the same behavior yesterday. The dll does not contain the
>>>> clock_gettime and nanosleep. The static lib does.
>>>>
>>>> I'm starting to think this might be causing the libstdc++ dll exception
>>>> issue (due to configure failing to link these). Might be me rambling, but
>>>> hey, I'll test it anyways once this is fixed.
>>>>
>>>> Ruben
>>>>
>>>>>
>>>>>
>>>>> 2011/12/28 Ozkan Sezer <seze...@gmail.com>:
>>>>> > On Wed, Dec 28, 2011 at 1:02 PM, niXman <i.nix...@gmail.com> wrote:
>>>>> >> Patch is attached.
>>>>> >> May be useful.
>>>>> >>
>>>>> >> 2011/12/28 niXman <i.nix...@gmail.com>:
>>>>> >>> If I move declarations of clock_* functions from pthread_time.h to
>>>>> >>> pthread.h then the problem is solved.
>>>>> >>> But I am not sure that it's right.
>>>>> >>>
>>>>> >
>>>>> > Does the following one-liner fix it?
>>>>> >
>>>>> > Index: src/clock.c
>>>>> > ===================================================================
>>>>> > --- src/clock.c (revision 4705)
>>>>> > +++ src/clock.c (working copy)
>>>>> > @@ -10,6 +10,7 @@
>>>>> >  #include <windows.h>
>>>>> >
>>>>> >  #include "pthread.h"
>>>>> > +#include "pthread_time.h"
>>>>> >
>>>>> >  #define POW10_7                 10000000
>>>>> >  #define POW10_9                 1000000000
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> >>>
>>>>> >>> 2011/12/28 JonY <jo...@users.sourceforge.net>:
>>>>> >>>> On 12/28/2011 07:15, niXman wrote:
>>>>> >>>>> Hello list.
>>>>> >>>>>
>>>>> >>>>> I built the winpthreads and detected that libwinpthread-1.dll does
>>>>> >>>>> not
>>>>> >>>>> export the clock_* functions.
>>>>> >>>>>
>>>>> >>>>> __pth_gpointer_locked
>>>>> >>>>> __pthread_clock_nanosleep
>>>>> >>>>> _pthread_cleanup_dest
>>>>> >>>>> _pthread_get_state
>>>>> >>>>> _pthread_invoke_cancel
>>>>> >>>>> _pthread_key_dest
>>>>> >>>>> _pthread_rel_time_in_ms
>>>>> >>>>> _pthread_set_state
>>>>> >>>>> _pthread_time_in_ms
>>>>> >>>>> _pthread_time_in_ms_from_timespec
>>>>> >>>>> _pthread_tryjoin
>>>>> >>>>> pthread_attr_destroy
>>>>> >>>>> pthread_attr_getdetachstate
>>>>> >>>>> pthread_attr_getinheritsched
>>>>> >>>>> pthread_attr_getschedparam
>>>>> >>>>> pthread_attr_getscope
>>>>> >>>>> pthread_attr_getstackaddr
>>>>> >>>>> pthread_attr_getstacksize
>>>>> >>>>> pthread_attr_init
>>>>> >>>>> pthread_attr_setdetachstate
>>>>> >>>>> pthread_attr_setinheritsched
>>>>> >>>>> pthread_attr_setschedparam
>>>>> >>>>> pthread_attr_setscope
>>>>> >>>>> pthread_attr_setstackaddr
>>>>> >>>>> pthread_attr_setstacksize
>>>>> >>>>> pthread_barrier_destroy
>>>>> >>>>> pthread_barrier_init
>>>>> >>>>> pthread_barrier_wait
>>>>> >>>>> pthread_barrierattr_destroy
>>>>> >>>>> pthread_barrierattr_getpshared
>>>>> >>>>> pthread_barrierattr_init
>>>>> >>>>> pthread_barrierattr_setpshared
>>>>> >>>>> pthread_cancel
>>>>> >>>>> pthread_cond_broadcast
>>>>> >>>>> pthread_cond_destroy
>>>>> >>>>> pthread_cond_init
>>>>> >>>>> pthread_cond_signal
>>>>> >>>>> pthread_cond_timedwait
>>>>> >>>>> pthread_cond_wait
>>>>> >>>>> pthread_condattr_destroy
>>>>> >>>>> pthread_condattr_getclock
>>>>> >>>>> pthread_condattr_getpshared
>>>>> >>>>> pthread_condattr_init
>>>>> >>>>> pthread_condattr_setclock
>>>>> >>>>> pthread_condattr_setpshared
>>>>> >>>>> pthread_create
>>>>> >>>>> pthread_create_wrapper
>>>>> >>>>> pthread_delay_np
>>>>> >>>>> pthread_detach
>>>>> >>>>> pthread_equal
>>>>> >>>>> pthread_exit
>>>>> >>>>> pthread_get_concurrency
>>>>> >>>>> pthread_getclean
>>>>> >>>>> pthread_getconcurrency
>>>>> >>>>> pthread_getevent
>>>>> >>>>> pthread_gethandle
>>>>> >>>>> pthread_getschedparam
>>>>> >>>>> pthread_getspecific
>>>>> >>>>> pthread_join
>>>>> >>>>> pthread_key_create
>>>>> >>>>> pthread_key_delete
>>>>> >>>>> pthread_kill
>>>>> >>>>> pthread_mutex_destroy
>>>>> >>>>> pthread_mutex_init
>>>>> >>>>> pthread_mutex_lock
>>>>> >>>>> pthread_mutex_timedlock
>>>>> >>>>> pthread_mutex_trylock
>>>>> >>>>> pthread_mutex_unlock
>>>>> >>>>> pthread_mutexattr_destroy
>>>>> >>>>> pthread_mutexattr_getprioceiling
>>>>> >>>>> pthread_mutexattr_getprotocol
>>>>> >>>>> pthread_mutexattr_getpshared
>>>>> >>>>> pthread_mutexattr_gettype
>>>>> >>>>> pthread_mutexattr_init
>>>>> >>>>> pthread_mutexattr_setprioceiling
>>>>> >>>>> pthread_mutexattr_setprotocol
>>>>> >>>>> pthread_mutexattr_setpshared
>>>>> >>>>> pthread_mutexattr_settype
>>>>> >>>>> pthread_num_processors_np
>>>>> >>>>> pthread_once
>>>>> >>>>> pthread_rwlock_destroy
>>>>> >>>>> pthread_rwlock_init
>>>>> >>>>> pthread_rwlock_rdlock
>>>>> >>>>> pthread_rwlock_timedrdlock
>>>>> >>>>> pthread_rwlock_timedwrlock
>>>>> >>>>> pthread_rwlock_tryrdlock
>>>>> >>>>> pthread_rwlock_trywrlock
>>>>> >>>>> pthread_rwlock_unlock
>>>>> >>>>> pthread_rwlock_wrlock
>>>>> >>>>> pthread_rwlockattr_destroy
>>>>> >>>>> pthread_rwlockattr_getpshared
>>>>> >>>>> pthread_rwlockattr_init
>>>>> >>>>> pthread_rwlockattr_setpshared
>>>>> >>>>> pthread_self
>>>>> >>>>> pthread_set_concurrency
>>>>> >>>>> pthread_set_num_processors_np
>>>>> >>>>> pthread_setcancelstate
>>>>> >>>>> pthread_setcanceltype
>>>>> >>>>> pthread_setconcurrency
>>>>> >>>>> pthread_setschedparam
>>>>> >>>>> pthread_setspecific
>>>>> >>>>> pthread_spin_destroy
>>>>> >>>>> pthread_spin_init
>>>>> >>>>> pthread_spin_lock
>>>>> >>>>> pthread_spin_trylock
>>>>> >>>>> pthread_spin_unlock
>>>>> >>>>> pthread_testcancel
>>>>> >>>>> pthread_timechange_handler_np
>>>>> >>>>> pthread_tls_init
>>>>> >>>>> sched_get_priority_max
>>>>> >>>>> sched_get_priority_min
>>>>> >>>>> sched_getscheduler
>>>>> >>>>> sched_setscheduler
>>>>> >>>>> sched_yield
>>>>> >>>>> sem_close
>>>>> >>>>> sem_destroy
>>>>> >>>>> sem_getvalue
>>>>> >>>>> sem_init
>>>>> >>>>> sem_open
>>>>> >>>>> sem_post
>>>>> >>>>> sem_post_multiple
>>>>> >>>>> sem_timedwait
>>>>> >>>>> sem_trywait
>>>>> >>>>> sem_unlink
>>>>> >>>>> sem_wait
>>>>> >>>>>
>>>>> >>>>> What am I doing wrongly?
>>>>> >>>>>
>>>>> >>>>> Regards.
>>>>> >>>>
>>>>> >>>> Can you check in the public pthread header? See if it has the
>>>>> >>>> relevant
>>>>> >>>> dllexport/dllimport attribute.
>>>>> >>
>
> --
> O.S.
>
> ------------------------------------------------------------------------------
> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
> infrastructure or vast IT resources to deliver seamless, secure access to
> virtual desktops. With this all-in-one solution, easily deploy virtual
> desktops for less than the cost of PCs and save 60% on VDI infrastructure
> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> _______________________________________________
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
Index: include/pthread_time.h
===================================================================
--- include/pthread_time.h	(revision 4739)
+++ include/pthread_time.h	(working copy)
@@ -25,6 +25,16 @@
 #ifndef WIN_PTHREADS_TIME_H
 #define WIN_PTHREADS_TIME_H
 
+#if defined DLL_EXPORT && !defined (WINPTHREAD_EXPORT_ALL_DEBUG)
+#ifdef IN_WINPTHREAD
+#define WINPTHREAD_CLOCK_API __declspec(dllexport)
+#else
+#define WINPTHREAD_CLOCK_API __declspec(dllimport)
+#endif
+#else
+#define WINPTHREAD_CLOCK_API
+#endif
+
 /* Posix timers are supported */
 #ifndef _POSIX_TIMERS
 #define _POSIX_TIMERS           200809L
@@ -74,22 +84,13 @@
 extern "C" {
 #endif
 
-/* Make sure we provide default for WINPTHREAD_API, if not defined.  */
-#pragma push_macro("WINPTHREAD_API")
-#ifndef WINPTHREAD_API
-#define WINPTHREAD_API
-#endif
-
 /* These should really be dllimport'ed if using winpthread dll */
-int __cdecl WINPTHREAD_API nanosleep(const struct timespec *request, struct timespec *remain);
+int WINPTHREAD_CLOCK_API nanosleep(const struct timespec *request, struct timespec *remain);
+int WINPTHREAD_CLOCK_API clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *request, struct timespec *remain);
+int WINPTHREAD_CLOCK_API clock_getres(clockid_t clock_id, struct timespec *res);
+int WINPTHREAD_CLOCK_API clock_gettime(clockid_t clock_id, struct timespec *tp);
+int WINPTHREAD_CLOCK_API clock_settime(clockid_t clock_id, const struct timespec *tp);
 
-int __cdecl WINPTHREAD_API clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *request, struct timespec *remain);
-int __cdecl WINPTHREAD_API clock_getres(clockid_t clock_id, struct timespec *res);
-int __cdecl WINPTHREAD_API clock_gettime(clockid_t clock_id, struct timespec *tp);
-int __cdecl WINPTHREAD_API clock_settime(clockid_t clock_id, const struct timespec *tp);
-
-#pragma pop_macro("WINPTHREAD_API")
-
 #ifdef __cplusplus
 }
 #endif
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to