[svn:parrot] r39873 trunk/include/parrot
MoC
moc at coders-haven.net
Sat Jul 4 14:26:03 UTC 2009
> Index: /trunk/include/parrot/thr_windows.h
> ===================================================================
> --- /trunk/include/parrot/thr_windows.h (revision 37201)
> +++ /trunk/include/parrot/thr_windows.h (revision 39873)
> @@ -124,11 +124,11 @@
> typedef void (*Cleanup_Handler)(void *);
>
> -#ifndef _STRUCT_TIMESPEC
> -# define _STRUCT_TIMESPEC
> +#ifndef HAVE_STRUCT_TIMESPEC
> +# define HAVE_STRUCT_TIMESPEC
> struct timespec {
> time_t tv_sec;
> long tv_nsec;
> };
> -#endif /* _STRUCT_TIMESPEC */
> +#endif /* HAVE_STRUCT_TIMESPEC */
>
> # undef CONST
I'd just like to add that I don't really think that Parrot's to blame
here, but rather pthreads-win32. I first got in touch with the "struct
timespec" issue when trying to cross-compile ruby-svn, which uses
pthreads, with MinGW GCC 3.4.5. (The pthreads headers weren't bundled
yet, though the library files were already included since they seem to
have built MinGW itself with pthreads support.) Back then I came to a
similiar conclusion though wanted to check on who's to blame. So I
searched my VirtualBox Ubuntu's include directory (since I'm not that
familiar with the structure of *nix systems) and found out that:
1) _STRUCT_TIMESPEC appears to be used on *nix OS (I have to admit that
only checking Ubuntu might not allow me to say that, but since Ruby also
used this variant I think I should be right.)
2) _STRUCT_TIMESPEC is actually defined somewhere within sys/time.h (or
one of the included headers) and is only defined in pthreads-win32's
pthread.h because by default it's not defined within MinGW.
So I think that it's rather pthreads-win32 that's responsible for this
issue than Parrot and I suggest we should contact pthreads-win32 and/or
MinGW about it.
Any other opinions?
--MoC
More information about the parrot-dev
mailing list