On Wed, 2002-01-23 at 22:34, Robert Collins wrote: > > === > ----- Original Message ----- > From: "Thomas Fitzsimmons" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Thursday, January 24, 2002 12:08 PM > Subject: patch to allow newlib to compile when winsup not present > > > > I've applied this patch to newlib, so that it will compile for the > > i686-pc-cygwin target, when winsup is not in the source tree. > > Previously, the newlib build failed because pthread_t was undefined. > > This is incorrect. Cygwin has pthread_kill, so you _will need_ the > cygwin header files to compile newlib for i686-pc-cygwin, regardless of > having winsup in the source tree or not. >
Then would a better solution be to include winsup/cygwin/include/cygwin/types.h in the newlib distribution? We would probably put it in newlib/libc/include/sys/cygwin. The patch would look like this: *** signal.h 2002/01/24 00:52:27 1.10 --- signal.h 2002/01/24 17:04:17 *************** *** 158,164 **** int _EXFUN(sigsuspend, (const sigset_t *)); int _EXFUN(sigpause, (int)); ! #if defined(_POSIX_THREADS) && !defined(__CYGWIN__) int _EXFUN(pthread_kill, (pthread_t thread, int sig)); #endif --- 158,164 ---- int _EXFUN(sigsuspend, (const sigset_t *)); int _EXFUN(sigpause, (int)); ! #if defined(_POSIX_THREADS) int _EXFUN(pthread_kill, (pthread_t thread, int sig)); #endif Index: types.h =================================================================== RCS file: /cvs/src/src/newlib/libc/include/sys/types.h,v retrieving revision 1.9 diff -c -r1.9 types.h *** types.h 2001/12/19 03:03:29 1.9 --- types.h 2002/01/24 17:04:17 *************** *** 327,333 **** } pthread_once_t; /* dynamic package initialization */ #else #if defined (__CYGWIN__) ! #include <cygwin/types.h> #endif #endif /* defined(_POSIX_THREADS) */ --- 327,333 ---- } pthread_once_t; /* dynamic package initialization */ #else #if defined (__CYGWIN__) ! #include "cygwin/types.h" #endif #endif /* defined(_POSIX_THREADS) */ > Rob > > > Index: libc/include/sys/signal.h > > =================================================================== > > RCS file: /cvs/src/src/newlib/libc/include/sys/signal.h,v > > retrieving revision 1.9 > > retrieving revision 1.10 > > diff -c -r1.9 -r1.10 > > *** signal.h 2001/10/22 16:40:26 1.9 > > --- signal.h 2002/01/24 00:52:27 1.10 > > *************** > > *** 158,164 **** > > int _EXFUN(sigsuspend, (const sigset_t *)); > > int _EXFUN(sigpause, (int)); > > > > ! #if defined(_POSIX_THREADS) > > int _EXFUN(pthread_kill, (pthread_t thread, int sig)); > > #endif > > > > --- 158,164 ---- > > int _EXFUN(sigsuspend, (const sigset_t *)); > > int _EXFUN(sigpause, (int)); > > > > ! #if defined(_POSIX_THREADS) && !defined(__CYGWIN__) > > int _EXFUN(pthread_kill, (pthread_t thread, int sig)); > > #endif > > > > > > -- > > Thomas Fitzsimmons > > Red Hat Canada Limited e-mail: [EMAIL PROTECTED] > > 2323 Yonge Street, Suite 300 > > Toronto, ON M4P2C9 > > > > > -- Thomas Fitzsimmons Red Hat Canada Limited e-mail: [EMAIL PROTECTED] 2323 Yonge Street, Suite 300 Toronto, ON M4P2C9