about summary refs log tree commit diff
path: root/time/bits
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-10-19 11:51:48 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-10-27 09:54:50 -0300
commit5d8aa97da2332a818579bbb24880f9d44715448a (patch)
tree649294cdab8924f0905bc9bdc6c03a24627582b9 /time/bits
parent30a0b167d347dd80807d167ee85bf58264fb8b76 (diff)
downloadglibc-5d8aa97da2332a818579bbb24880f9d44715448a.tar.gz
glibc-5d8aa97da2332a818579bbb24880f9d44715448a.tar.xz
glibc-5d8aa97da2332a818579bbb24880f9d44715448a.zip
time: Add 64-bit time_t support for ftime
It basically calls the 64-bit __clock_gettime64 and adds the overflow
check.

Checked on x86_64-linux-gnu and i686-linux-gnu.

Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'time/bits')
-rw-r--r--time/bits/types/struct_timeb.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/time/bits/types/struct_timeb.h b/time/bits/types/struct_timeb.h
new file mode 100644
index 0000000000..1fe60c7131
--- /dev/null
+++ b/time/bits/types/struct_timeb.h
@@ -0,0 +1,15 @@
+#ifndef __timeb_defined
+#define __timeb_defined 1
+
+#include <bits/types/time_t.h>
+
+/* Structure returned by the 'ftime' function.  */
+struct timeb
+  {
+    time_t time;		/* Seconds since epoch, as from 'time'.  */
+    unsigned short int millitm;	/* Additional milliseconds.  */
+    short int timezone;		/* Minutes west of GMT.  */
+    short int dstflag;		/* Nonzero if Daylight Savings Time used.  */
+  };
+
+#endif