[PATCH] Avoid redefinitions in libc/include/sys/types.h in case __rtems__ is defined

Sebastian Huber sebastian.huber@embedded-brains.de
Mon Feb 28 10:51:00 GMT 2011


Hello,

currently we have in Newlib for RTEMS:

sys/types.h:393:0: warning: "PTHREAD_MUTEX_NORMAL" redefined
sys/types.h:310:0: note: this is the location of the previous definition
sys/types.h:394:0: warning: "PTHREAD_MUTEX_RECURSIVE" redefined
sys/types.h:325:0: note: this is the location of the previous definition
sys/types.h:396:0: warning: "PTHREAD_MUTEX_DEFAULT" redefined
sys/types.h:332:0: note: this is the location of the previous definition

In <sys/features.h> we have

#ifdef __rtems__
...
 #define _UNIX98_THREAD_MUTEX_ATTRIBUTES         1
...
#endif

We include <sys/features.h> in <sys/types.h> before the PTHREAD_MUTEX_*
defines.  The _UNIX98_THREAD_MUTEX_ATTRIBUTES is also used in the RTEMS sources
to enable the attribute specific code.

Why do we have different numeric values for the PTHREAD_MUTEX_* defines?

Have a nice day!

-- 
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: newlib-sys-types.patch
Type: text/x-patch
Size: 4853 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20110228/5c477118/attachment.bin>


More information about the Newlib mailing list