[Python-Dev] RE: POSIX thread code and Cygwin
Jason Tishler
jason@tishler.net
Sat, 23 Mar 2002 11:08:23 -0500
--Boundary_(ID_j4yM6P+PRN7238IAK+OX5w)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
Jerry,
On Fri, Mar 22, 2002 at 04:16:30PM -0500, Tim Peters wrote:
> [Gerald S. Williams]
> > I submitted another patch to the POSIX threads code.
> > It is under SourceForge as patch number 533681.
> >
> > [snip]
After I saw your patch, I got started thinking...
> I don't understand. If Cygwin requires _rtems_ in order that
> _POSIX_SEMAPHORES be defined, then either Cygwin has a bug here, or Cygwin
> *needs* _rtems_ if you want to use real-time gimmicks like semaphores. In
> either case, I don't think it's Python's place to second-guess the Cygwin
> team: report it as a bug to Cygwin, or do whatever they recommend to get
> _rtems_ defined in the Cygwin build.
I agree with Tim (and Martin) that this is a Cygwin (i.e., newlib)
issue and should not be "fixed" or worked around in Python. Would you
be willing to submit the attached (untested) patch to newlib after giving
it a spin?
I think that Rob Collins forgot to add this missing #define when he
implemented Cygwin semaphore support. If you wish, I can post to
cygwin-developers to verify.
Thanks,
Jason
--Boundary_(ID_j4yM6P+PRN7238IAK+OX5w)
Content-type: text/plain; charset=us-ascii; NAME=features.h.diff
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=features.h.diff
Index: features.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/features.h,v
retrieving revision 1.3
diff -c -C10 -r1.3 features.h
*** features.h 2001/04/12 00:05:57 1.3
--- features.h 2002/03/23 15:53:32
***************
*** 79,94 ****
--- 79,95 ----
#ifdef __CYGWIN__
# define _POSIX_JOB_CONTROL 1
# define _POSIX_SAVED_IDS 0
# define _POSIX_VERSION 199009L
# define _POSIX_THREADS 1
# define _POSIX_THREAD_PROCESS_SHARED 1
# define _POSIX_THREAD_SAFE_FUNCTIONS 1
# define _POSIX_THREAD_PRIORITY_SCHEDULING 1
# define _POSIX_THREAD_ATTR_STACKSIZE 1
+ # define _POSIX_SEMAPHORES 1
#endif
#ifdef __cplusplus
}
#endif
#endif /* _SYS_FEATURES_H */
--Boundary_(ID_j4yM6P+PRN7238IAK+OX5w)--