cygwin/newlib types patchs
Mon Apr 9 01:15:00 GMT 2001
----- Original Message -----
From: "J. Johnston" <firstname.lastname@example.org>
To: "Robert Collins" <email@example.com>
Cc: "Joel Sherrill" <joel.sherrill@OARcorp.com>;
Sent: Friday, March 30, 2001 10:45 AM
Subject: Re: cygwin/newlib types patchs
> Robert Collins wrote:
> > ----- Original Message -----
> > From: "J. Johnston" <firstname.lastname@example.org>
> > To: "Robert Collins" <email@example.com>
> > Cc: "Joel Sherrill" <joel.sherrill@OARcorp.com>;
> > <firstname.lastname@example.org>; <email@example.com>
> > Sent: Friday, March 30, 2001 3:26 AM
> > Subject: Re: cygwin/newlib types patchs
> > > Robert Collins wrote:
> > > >
> > > >
> > > > Uhmm yes :] I've actually put the cygwin ones in cygwin/types.h,
> > as
> > > > long as it's system specific it doesn't really matter.
> > > >
> > >
> > > So, what are you proposing? I still contend that removing all the
> > system pthread
> > > types into the sys directories is the clean way to implement this
> > the best
> > > long term solution for adding other system pthread implementations
> > the future.
> > > I don't think overriding the entire types header is warranted.
> > >
> > > Unless you have a better proposal, I am going to do this so it
> > save me the work
> > > if as part of your change you simply split the pthread types into
> > sys/pthreadtypes.h and
> > > put the RTEMS stuff in the RTEMS directory and the Cygwin stuff in
> > Cygwin directory.
> > >
> > > -- Jeff J.
> > >
> > I don't know how rtems is laid out - what I am proposing was
> > src/newlib/libc/include/sys/types.h includes <cygwin/types.h> (which
> > only overrides pthreads at the moment)
> > src/winsup/cygwin/include/cygwin/types.h contains the types that
> > conflicting with rtems.
> > Where should I #include the rtems header from?
> src/newlib/libc/include/sys/types.h should include
<sys/pthreadtypes.h>. Ideally, this can be
> protected by a check for #if defined (_POSIX_THREADS) in which case
<sys/features.h> must be
> included outside of the RTEMS check and
src/newlib/libc/include/sys/features.h must be updated to
> set _POSIX_THREADS for Cygwin.
> A default src/newlib/libc/include/sys/pthreadtypes.h can be made which
has defaults for all of the
> pthread types (your generic void * types) or alternatively these types
can be put in
> Put the RTEMS pthread type stuff from sys/types.h into
> (no need for RTEMS markers and you should bring along the #include
> If you are ok with the PTHREAD constants from sys/types.h then put
them into pthread.h where they
> belong. If there is conflict between RTEMS and Cygwin for the values
of the constants, then add __
> versions in the appropriate system-specific pthreadtypes.h and add a
check in pthread.h to allow
> overriding the constants with their __ versions.
> -- Jeff J.
Sorry It's taken me so long to get back to this. Currently cygwin
completely ignores the newlib pthread.h
If you look at the patch I initally submitted to cygwin,
It includes a cygwin specific header (which already existed, although it
was blank). As such it's a step in the direction you've outlined. Rather
than tackle the full job now I'd like to see this go in as is. It fixes
some build problems on cygwin. I'm happy to follow this up with a more
comprehensive tackle cleaning the whole lot up, but I'm running out of
space for separate working directories with my current cygwin work -
which is new features, not existing code reorganisation. For me, that's
a higher priority..
More information about the Newlib