This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: gcc/gthr-posix.h changes
- To: Ovidiu Predescu <ovidiu at cup dot hp dot com>
- Subject: Re: gcc/gthr-posix.h changes
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 10 Aug 2000 14:17:13 -0300
- Cc: gcc-patches at gcc dot gnu dot org, Chris Ball <cball at fmco dot com>
- Organization: GCC Team, Red Hat
- References: <200008092055.NAA03399@orion.nsr.hp.com>
On Aug 9, 2000, Ovidiu Predescu <ovidiu@cup.hp.com> wrote:
> OK, how about something like this:
> #ifdef HAVE_SCHED_H
> # include <sched.h>
> #endif
> #ifdef HAVE_PTHREAD_H
> # include <pthread.h>
> #endif
> of course, with the appropriate AC_CHECK_HEADER in configure.in:
> AC_CHECK_HEADER(sched.h)
> AC_CHECK_HEADER(pthread.h)
Looks good to me. I think these tests would have to be done in both
GCC's and libobjc's configure.ins.
> Including both pthread.h and sched.h should not do any harm, right?
Hopefully not. Let's try it as you say and see if we find problems on
any known platforms.
Another approach would be to check whether the needed struct is
defined with pthread.h alone, and only test for sched.h otherwise.
But that would require a more complicated configure.in test, so I'd
rather only do it if really needed.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me