On 2 October 2022 14:54:54 CEST, LIU Hao <lh_mo...@126.com> wrote: >在 2022-10-02 04:02, Bernhard Reutner-Fischer 写道: >> On 1 October 2022 20:34:45 CEST, LIU Hao via Gcc-patches >> <gcc-patches@gcc.gnu.org> wrote: >>> Greetings. >> >>> The first patch is necessary because somewhere in libgfortran, `pthread_t` >>> is referenced. If the thread model is not `posix`, it fails to compile. >> >> One of several shortcomings mentioned already on Sun, 02 Sep 2018 15:40:28 >> -0700 in >> https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg196212.html >> > >Forgive me but I didn't get your point. Is the 'shortcoming' the fact that >`pthread_t` must be preferred to `__gthread_t`?
No, sorry for my brevity. Using __gthread_t like in your patch is correct. thanks, > >For non-posix thread models, <pthread.h> is not included, so `pthread_t` is >not declared. I haven't looked at other code in libgfortran, but changing >`pthread_t` to `__gthread_t` does allow libgfortran to build. I don't know how >to test it though, as I don't write Fortran myself. > >