Quantcast

redefinition of 'struct timespec'

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

redefinition of 'struct timespec'

Wei Zhang

Hi,

  I know that someone has asked the same question before.In my opinion,just deleting the definition of this structure in the header file

"C:\MinGW\include\pthread.h" could be valid for resolving this problem.I wonder if it is the best way to avoid this error at present.

  This structure is showed below:

struct timespec
{
 time_t tv_sec;
long tv_nsec;
};




  All the best,
  Wei.











------------------------------------------------------------------------------

_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: redefinition of 'struct timespec'

Keith Marshall
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/08/16 12:03, zjuzw wrote:
> I know that someone has asked the same question before.

Yes, it's been discussed to death, in various pthreads-win32 fora.

> In my opinion, just deleting the definition of this structure in
> the header file ... could be valid for resolving this problem.

Sure ... until you stumble into a use-case where it's needed.

What version of pthreads-win32 are you using?  The proper solution is
to run configure-time tests, to determine if the definition is
actually required, rather than just making arbitrary, and potentially
incorrect assumptions, (as pthread-w32-2.9.x did).  Anyway, this is
not a MinGW issue; it is a pthreads-win32 (a.k.a. pthreads4w) issue,
and it is already fixed in their (upstream) git repository.

I plan to publish an updated MinGW specific build, based on their
current repository, but with much of their undesirable public header
pollution filtered out.  This will reflect the local build I've used,
when I built gcc-5.3.0-mingw32, but I'm making no promises regarding
when I may get around to packaging it for publication.

- --
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJXp0yYAAoJEMCtNsY0flo/+LIP/3p0XCnu8Jca19NcyDtIq/Kq
lYVeceEV4wX0QuN754CihBVzeRwmEgxoM4/27F87k6na7oq/QSXJcoIB/nRm2oe6
RpRwtMlRivgFpRyOwLHBpVQU7i19BSYlw88qR4VdAK4ibNNHRS0WK7FV4vY3jozX
4N33kxBwMX5uDmPbU5LJp8yUaU5MBGWJ2m66Psj1buSzMZpDTnSCD2Fww4yK7qz9
ZSgsSVtRDQqcL6EOJ40op6eeiOWx9aK09DoILUrn0E3l02HzyDs8ZO4nWObAXxWt
YDGHWnsVwVVAai/jEeXVCHvsDV8zuBF5pQMZS73VBb/7w9nU2dpfG3y5QLsbYygr
B1yvpwgTCQ1BKBk6d3Kub2js7nt8udqZuVOL9lZa6m9tQtuvtLLHo7VfUGnf5/L3
fCDjO7SBeAj1OC7jDJDqn/W6lsTLeoEQ96ouBCRs8pYbEgFB/FmAXQeiQQocNPVE
52FpVO5J6s5H4LJRTo47k5p9QnN8jz6XRWRm9c895Vpi2xZmcAKtJfPIwrYMb24Q
2NZDFJS6gvKkagNxRMDVz7bB2Czv7x7y7O9LamGIzZ47zi+R5BvQ02Zmv4A+7qOY
SwWefdYmZXHsCS21CH/1LGRqjGmcu9RpghrDQ0m9VoqdOYYYWSE3Lz23bnfwo45c
jLEwxX7x+lLZI5DLXpd/
=dmMC
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: redefinition of 'struct timespec'

Wei Zhang
Hi Keith:
  Thanks for your so quickly reply.The version of my pthreads-win32 is 2.9.1.
  I still have two questions:
  (1) How to run configure-time tests, to determine if the definition is actually required.
  (2) Just as you said,pthreads-win32 is already fixed in their git repository.The corresponding website I've found is https://github.com/GerHobbelt/pthread-win32.Is it valid to substitute my pthread.h for the new one?




  All the Best,
  Wei.
 
Loading...