This is the mail archive of the
mailing list for the Cygwin project.
- From: Mark Hadfield <m dot hadfield at niwa dot co dot nz>
- To: cygwin at cygwin dot com
- Cc: Uwe Schulzweida <Uwe dot Schulzweida at zmaw dot de>
- Date: Wed, 12 Jul 2006 10:39:23 +1200
- Subject: Pthread.h issue
I am trying to build version 1.0.0 of the CDO (Climate Data Operators)
There is a problem with the pthread-related code. The problem can be
worked around, but it seems to indicate a problem with some of the macro
definitions in Cygwin's pthread.h.
To cut a long story short, the CDO source includes the following (file
src/pthread_debug.c, function print_pthread_mutexattr, lines 84-87):
#if defined (PTHREAD_PRIO_INHERIT)
POUT3(caller, protocol, PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT,
This expands to valid C code if and only if the macros
PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT and PTHREAD_PRIO_NONE are
defined to integer constants. But the definitions are empty
(/usr/sys/sinclude/pthread.h, lines 63-65):
My work-around (apparently successful but the resulting executables have
not been tested thoroughly) is to override the above with
#define PTHREAD_PRIO_INHERIT 1
#define PTHREAD_PRIO_NONE 1
#define PTHREAD_PRIO_PROTECT 1
So, why would Cygwin pthread have empty definitions for these macros? Is
it safe to override the definitions? Would it be safer to omit the code
that uses them on this platform?
Mark Hadfield "Kei puwaha te tai nei, Hoea tahi tatou"
National Institute for Water and Atmospheric Research (NIWA)
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html