aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-osprim-darwin.adb
diff options
context:
space:
mode:
authorRafael Espindola <espindola@google.com>2009-04-20 14:09:46 +0000
committerRafael Espindola <espindola@google.com>2009-04-20 14:09:46 +0000
commitee7d4fba3eb1fe0ef18f4badf1fd71100c99309c (patch)
tree9c8d314cc606457ab4eb9ddec739f1c5d2c92008 /gcc/ada/s-osprim-darwin.adb
parent20ccb780d272cc40cbb95191d5adf63bd7aa4842 (diff)
2009-04-20 Rafael Avila de Espindola <espindola@google.com>plugins
Merge with mainline @146369. * configure.ac (ACX_PKGVERSION): Update. * configure: Regenerate. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/plugins@146426 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-osprim-darwin.adb')
-rw-r--r--gcc/ada/s-osprim-darwin.adb8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/s-osprim-darwin.adb b/gcc/ada/s-osprim-darwin.adb
index 2425cf6e6d0..d47c608a74e 100644
--- a/gcc/ada/s-osprim-darwin.adb
+++ b/gcc/ada/s-osprim-darwin.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;