This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: Patch to fail with error message when pthread_t not defined
On Fri, Jan 25, 2002 at 08:53:42PM -0500, Thomas Fitzsimmons wrote:
>On Fri, 2002-01-25 at 17:53, Robert Collins wrote:
>>
>> Hmm, I wonder if
>> #ifndef pthread_t
>> #error pthread_t hasn't be specified for this platform, do you have the
>> kernel includes available?
>> #endif
>>
>> will catch a missing typedef correctly? Assuming it won't, the correct
>> define to check for in this case is _CYGWIN_TYPES_H.
>>
>
>Comments?
It looks fine to me.
Thank you!
cgf
>Index: signal.h
>===================================================================
>RCS file: /cvs/src/src/newlib/libc/include/sys/signal.h,v
>retrieving revision 1.11
>diff -c -r1.11 signal.h
>*** signal.h 2002/01/25 00:47:44 1.11
>--- signal.h 2002/01/26 01:41:42
>***************
>*** 159,164 ****
>--- 159,169 ----
> int _EXFUN(sigpause, (int));
>
> #if defined(_POSIX_THREADS)
>+ #ifdef __CYGWIN__
>+ # ifndef _CYGWIN_TYPES_H
>+ # error You need the winsup sources or a cygwin installation to
>compile the cygwin version of newlib.
>+ # endif
>+ #endif
> int _EXFUN(pthread_kill, (pthread_t thread, int sig));
> #endif
>