[Coin-discuss] COIN on a Mac

Matthew Saltzman mjs at ces.clemson.edu
Sun Jan 5 13:48:33 EST 2003


On Sun, 5 Jan 2003, Laszlo Ladanyi wrote:

> Errr... The BCP headers were written in the days of egcs 1.1.2 ... I should
> really go back and update them. They will still be needed because even if
> time/rusage are standardized by now the name of 'construct' and 'destroy' is
> still different on various platforms :-(.
>
> --Laci
>
> On Sat, 4 Jan 2003 ScottWelz at aol.com wrote:
>
> > Darwin uses gcc 3.1...here's how the chain goes:

Which glibc?  The headers are actually associated with the library, not
the compiler (which makes sense if you think about it).  The chain I
listed last time appears to date back to at least glibc 2.2.x.  I don't
have anything older to check against.

> > - rusage is referenced by getrusage() declared in sys/resource.h
> > - struct rusage is defined in sys/resource.h also
> > - struct rusage contains fields of type struct timeval
> > - sys/time.h defines struct timeval
> >
> > There aren't any includes in resource.h that get me to sys/time.h.

I would have to conclude that this is a bug in the Darwin header files.
If you want the facilities provided in sys/resource.h, you should need
only include sys/resource.h.  It should not be the programmer's
responsibility to know to also include sys/time.h.

> >
> > BCP requires an operating system specific file where, in a couple of cases,
> > sys/time.h is added as an include (this include is added in the AIX version
> > and the Linux version).   Is this a result of a related issue?

Apparently so, per Laci.  The Linux include of sys/time.h may no longer
be necessary (I think) as most distributions are probably glibc 2.2 now,
but that obviously doesn't solve the whole problem.

It would seem that the best solution is indeed a Darwin-specific inclusion
as you proposed before.


> >
> > Thanks for the help in figuring this out.
> >
> > Scott
> >

-- 
		Matthew Saltzman

Clemson University Math Sciences
mjs at clemson.edu
http://www.math.clemson.edu/~mjs





More information about the Coin-discuss mailing list