This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH/RFA] Protect use of optional features in gthr-posix.h
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: thorpej at wasabisystems dot com
- Date: Mon, 28 Oct 2002 16:45:01 -0600 (CST)
- Subject: Re: [PATCH/RFA] Protect use of optional features in gthr-posix.h
- Organization: Networks and Infrastructure Lab (IL02/2240), Motorola Labs
> OK for mainline?
>
> * gthr-posix.h: Include <unistd.h> for feature tests.
> (sched_get_priority_max, sched_get_priority_min)
> (pthread_getschedparam, pthread_setschedparam): Only use
> if _POSIX_THREAD_PRIORITY_SCHEDULING is defined.
> (__gthread_objc_thread_set_priority): Don't treat all non-zero
> returns from sched_get_priority_max and sched_get_priority_min
> as an error.
Your patch looks fine to me. I'd agree that the usage of
sched_get_priority_max and sched_get_priority_min is illogical and has
been since the code was installed.
However, since it affects only libobjc not libstdc++ behavior, I will
not assume I can approve it. That said, I'm inclined to treat the
portability part of your patch as obvious if you guarded the inclusion
of unistd.h with a check against HAVE_UNISTD_H (ala sched.h).
libobjc maintainer, is the other half of his patch OK?
Regards,
Loren