From b2ed7a03e24eec7539c7656a7aff0ea73ec73f34 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 16 Apr 2009 10:33:28 +0200 Subject: [multiple changes] 2009-04-16 Olivier Hainque * gnat_ugn.texi (gnatmem description): Make it explicit that gnatmem is designed to work in association with static runtime library only. 2009-04-16 Thomas Quinot * sem_type.adb: Minor reformatting 2009-04-16 Hristian Kirtchev * s-osprim-darwin.adb, s-osprim-posix.adb (Clock): Add comment concerning return codes of gettimeofday and return value check. 2009-04-16 Ed Falis * s-vxwext-kernel.ads (Int_Lock, Int_Unlock): set to convention C so body can be renaming of imported routines. 2009-04-16 Vasiliy Fofanov * s-asthan-vms-alpha.adb: Disable warnings on alignment in a more targeted fashion. From-SVN: r146149 --- gcc/ada/s-osprim-posix.adb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/ada/s-osprim-posix.adb') diff --git a/gcc/ada/s-osprim-posix.adb b/gcc/ada/s-osprim-posix.adb index 7042830..c02ad98 100644 --- a/gcc/ada/s-osprim-posix.adb +++ b/gcc/ada/s-osprim-posix.adb @@ -78,6 +78,14 @@ package body System.OS_Primitives is pragma Unreferenced (Result); begin + -- The return codes for gettimeofday are as follows (from man pages): + -- EPERM settimeofday is called by someone other than the superuser + -- EINVAL Timezone (or something else) is invalid + -- EFAULT One of tv or tz pointed outside accessible address space + + -- None of these codes signal a potential clock skew, hence the return + -- value is never checked. + Result := gettimeofday (TV'Access, null); return Duration (TV.tv_sec) + Duration (TV.tv_usec) / 10#1#E6; end Clock; -- cgit v1.1