This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I'm finishing testing the below. Appears to work well, so far...gthr-posix.h already uses other macros defined by other library headers, like _LIBOBJC. gthr-posix-conf.h looks like an overkill to me, but if e.g. libstdc++ headers defined a 0/1 macro always (_GTHREAD_USE_TIMEDLOCK 0 would mean don't define it, _GTHREAD_USE_TIMEDLOCK 1 would mean you can safely assume timedlock is available, and not presence of that macro would lead to inclusion of unistd.h and deciding itself based on _POSIX_TIMEOUTS:
#ifndef _GTHREAD_USE_TIMEDLOCK #include<unistd.h> #ifdef _POSIX_TIMEOUTS #if _POSIX_TIMEOUTS>= 0 #define _GTHREAD_USE_TIMEDLOCK 1 #else #define _GTHREAD_USE_TIMEDLOCK 0 #else #define _GTHREAD_USE_TIMEDLOCK 0 #endif and use
#if _GTHREAD_USE_TIMEDLOCK ... #endif
Attachment:
CL_49745_2
Description: Text document
Attachment:
patch_49745_2
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |