timespec: mark functions with const attributes
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 9 Jul 2012 07:52:53 +0000 (00:52 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 9 Jul 2012 07:52:53 +0000 (00:52 -0700)
* lib/timespec.h (timespec_add, timespec_sub, dtotimespec):
Mark with _GL_ATTRIBUTE_CONST.

ChangeLog
lib/timespec.h

index ce24403..6618aa8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-07-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+       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  <ludo@gnu.org>
 
        canonicalize[-lgpl]: handle "guessing" values when cross-building
index 388ddb8..a587079 100644 (file)
@@ -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