From 4de67dc3f58c3ebdd6f3c8d3effdfb6acc9afb84 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 9 Jul 2012 00:52:53 -0700 Subject: [PATCH] timespec: mark functions with const attributes * lib/timespec.h (timespec_add, timespec_sub, dtotimespec): Mark with _GL_ATTRIBUTE_CONST. --- ChangeLog | 6 ++++++ lib/timespec.h | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ce24403aa..6618aa88b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-07-09 Paul Eggert + + timespec: mark functions with const attributes + * lib/timespec.h (timespec_add, timespec_sub, dtotimespec): + Mark with _GL_ATTRIBUTE_CONST. + 2012-07-07 Ludovic Courtès canonicalize[-lgpl]: handle "guessing" values when cross-building diff --git a/lib/timespec.h b/lib/timespec.h index 388ddb83a..a58707947 100644 --- a/lib/timespec.h +++ b/lib/timespec.h @@ -65,9 +65,12 @@ timespec_sign (struct timespec a) return a.tv_sec < 0 ? -1 : a.tv_sec || a.tv_nsec; } -struct timespec timespec_add (struct timespec, struct timespec); -struct timespec timespec_sub (struct timespec, struct timespec); -struct timespec dtotimespec (double); +struct timespec timespec_add (struct timespec, struct timespec) + _GL_ATTRIBUTE_CONST; +struct timespec timespec_sub (struct timespec, struct timespec) + _GL_ATTRIBUTE_CONST; +struct timespec dtotimespec (double) + _GL_ATTRIBUTE_CONST; /* Return an approximation to A, of type 'double'. */ static inline double -- 2.11.0