summaryrefslogtreecommitdiff
path: root/libc/time/gmtime_r.c
diff options
context:
space:
mode:
authorProjectRevoTPP <projectrevotpp@hotmail.com>2017-12-20 16:34:35 -0500
committerProjectRevoTPP <projectrevotpp@hotmail.com>2017-12-20 16:34:35 -0500
commit48ef7704c03e7e554c05de01bf8d1d70c16cb6f4 (patch)
tree34d52513de6c903b4f52ef87d885c73472daf469 /libc/time/gmtime_r.c
parentf49e7cbb33e6e27b0ce5eb35244d7241c800a7c1 (diff)
add libc building to agbcc.
Diffstat (limited to 'libc/time/gmtime_r.c')
-rw-r--r--libc/time/gmtime_r.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libc/time/gmtime_r.c b/libc/time/gmtime_r.c
new file mode 100644
index 0000000..7afa021
--- /dev/null
+++ b/libc/time/gmtime_r.c
@@ -0,0 +1,17 @@
+/*
+ * gmtime_r.c
+ */
+
+#include <time.h>
+
+#define _GMT_OFFSET 0
+
+struct tm *
+_DEFUN (gmtime_r, (tim_p, res),
+ _CONST time_t * tim_p _AND
+ struct tm *res)
+{
+ time_t tim = *tim_p + _GMT_OFFSET;
+
+ return (localtime_r (&tim, res));
+}