sys/times.h and mingw

Paulo Jorge Guedes Paulo.Guedes at artelecom.pt
Fri May 26 16:58:20 CEST 2006


> -----Original Message-----
> From: Christian Ehrlicher [mailto:Ch.Ehrlicher at gmx.de]
> Sent: sexta-feira, 26 de Maio de 2006 10:54
> To: KDE on Windows
> Subject: Re: RE: RE: sys/times.h and mingw
> > > > > Paulo Jorge Guedes wrote:
> > > > > >Hi,
> > > > > >
> > > > > >kdelibs/kabc/tests/bigread.cpp doesn't compile because of the
> > > > > >sys/times.h include, that doesn't exist on mingw includes
neither
> > on
> > > > > >kdelibs/win/include/mingw.
> > > > > >
> > > > > >There is already any solution for this on mingw?
> > > > >
> > > > > sys/times.h declares struct tms on Linux, which is used to
> > determine
> > > > the
> > > > > amount of CPU time used by a child process.
> > > > >
> > > > > Is that what bigread.cpp does? If not, it's probably a typo
for
> > time.h
> > > > or
> > > > > sys/time.h.
> > > >
> > > > It's not a typo, bigread.cpp calls times(). I don't know how
much
> > > > times() is used across KDE though, and if we should worry with
this
> > for
> > > > Windows. A quick grep shows it's only used from bigread.cpp and
> > > > bigwrite.cpp so I guess we can #ifdef it.
> > > >
> > > And what's the problem creating a small sys/times.h? Afaik this is
> > already
> > > there for msvc...
> >
> > It's already there for mingw... what is missing is the times
function
> > implementation for both mingw and msvc.
> Then implement a dummy one. Maybe GetSystemTimes() can help you.

Perhaps disabling this test for Windows, as David suggested, would be
better for now?

Paulo




More information about the Kde-windows mailing list