]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_9] missing prototype in time.h
authorEvan Hunt <each@isc.org>
Sat, 11 Jan 2014 04:19:30 +0000 (20:19 -0800)
committerEvan Hunt <each@isc.org>
Sat, 11 Jan 2014 04:19:30 +0000 (20:19 -0800)
lib/isc/win32/include/isc/time.h

index 52f65f6632d1edc7d860e3e1fe38ced03ffeecb3..fe842ab95bd8610fc5b9191e1fc078e7c62b9d8f 100644 (file)
@@ -305,6 +305,36 @@ isc_time_formatISO8601(const isc_time_t *t, char *buf, unsigned int len);
 
 isc_uint32_t
 isc_time_seconds(const isc_time_t *t);
+/*%<
+ * Return the number of seconds since the epoch stored in a time structure.
+ *
+ * Requires:
+ *
+ *\li  't' is a valid pointer.
+ */
+
+isc_result_t
+isc_time_secondsastimet(const isc_time_t *t, time_t *secondsp);
+/*%<
+ * Ensure the number of seconds in an isc_time_t is representable by a time_t.
+ *
+ * Notes:
+ *\li  The number of seconds stored in an isc_time_t might be larger
+ *     than the number of seconds a time_t is able to handle.  Since
+ *     time_t is mostly opaque according to the ANSI/ISO standard
+ *     (essentially, all you can be sure of is that it is an arithmetic type,
+ *     not even necessarily integral), it can be tricky to ensure that
+ *     the isc_time_t is in the range a time_t can handle.  Use this
+ *     function in place of isc_time_seconds() any time you need to set a
+ *     time_t from an isc_time_t.
+ *
+ * Requires:
+ *\li  't' is a valid pointer.
+ *
+ * Returns:
+ *\li  Success
+ *\li  Out of range
+ */
 
 ISC_LANG_ENDDECLS