64 bit maths and privileges

Theo Markettos theo at markettos.org.uk
Sat Aug 31 05:20:47 PDT 2002

I'm looking at writing settimeofday(), which has thrown up a couple of

Firstly, I need to do some shuffling around with 5 byte times (adds,
subtracts and multiplies).  Rather than attempt to do this manually, is
there any 64 bit integer support in UnixLib?  I could use 'long long', but
that would break Norcroft compatibility.  It would be much easier to do it
in assembler, yet it would be nicer if there was a library of such
functions, rather than handcrafting them for each case required.  Does
such a thing exist, or should I write one?

Secondly, currently settimeofday() returns EPERM, as it should do if a
non-root user was calling it.  Are there any plans for UnixLib to impose
any security on programs using it - or shall I just allow them to go their
potentially destructive way as if logged in as root?

Also, a minor point, but the README ought to say that GNU make is
necessary to build GCCSDK - since (eg) the 'make' shipped with OpenBSD is
not GNU make.


Theo Markettos                 theo at markettos.org.uk
Liphook, Hampshire, UK         theom at chiark.greenend.org.uk

More information about the gcc mailing list