This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcc/gthr-posix.h changes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]