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: 09 Aug 2000 06:39:57 -0300
- Cc: gcc-patches at gcc dot gnu dot org, Chris Ball <cball at fmco dot com>
- Organization: GCC Team, Red Hat
- References: <200008061854.LAA08536@ce175879.cup.hp.com>
On Aug 6, 2000, Ovidiu Predescu <ovidiu@cup.hp.com> wrote:
> Sun Aug 6 11:54:03 2000 Ovidiu Predescu <ovidiu@cup.hp.com>
> * gthr-posix.h: Integrated Chris Ball's <cball@fmco.com> changes
> to improve the Posix thread support for Objective-C.
> + struct sched_param params;
FYI, this breaks a threads-enabled build on FreeBSD 3.0, that used to
work:
In file included from ../../gcc/gthr-default.h:1,
from /home/css/guest/oliva/src/egcs/gcc/gthr.h:1,
from /home/css/guest/oliva/src/egcs/libobjc/thr-objc.c:31:
/home/css/guest/oliva/src/egcs/gcc/gthr-posix.h: In function `__gthread_objc_thread_set_priority':
/home/css/guest/oliva/src/egcs/gcc/gthr-posix.h:165: storage size of `params' isn't known
/home/css/guest/oliva/src/egcs/gcc/gthr-posix.h: In function `__gthread_objc_thread_get_priority':
/home/css/guest/oliva/src/egcs/gcc/gthr-posix.h:201: storage size of `params' isn't known
It works fine on FreeBSD 4.0 and 3.4, so it's probably some
incompleteness of the Posix threads implementation on FreeBSD 3.0. Do
we care? struct sched_param is defined in <sched.h>, but we never
include this file. Maybe we should? I can find it on all of
GNU/Linux, Solaris 2.5, DU4.0, IRIX 6, HP-UX 10, but not on AIX 4.1
(damn!, that was the last one I checked :-(
Seems like we have to add some configure magic to check whether the
header exists instead of including it unconditionally :-(
--
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