summaryrefslogtreecommitdiff
path: root/src/port/time.h
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2009-02-28 11:46:52 +0100
committerAndreas Baumann <abaumann@yahoo.com>2009-02-28 11:46:52 +0100
commitb4cf78d1eaed900aa6acbcab01bc8693c88b0275 (patch)
treea4682a8004ee45b46f4f6d4c5e5b980ec1692ea1 /src/port/time.h
parent2e27ca524f38f537e6bf706c7aa7dce79a745e17 (diff)
downloadwolfbones-b4cf78d1eaed900aa6acbcab01bc8693c88b0275.tar.gz
wolfbones-b4cf78d1eaed900aa6acbcab01bc8693c88b0275.tar.bz2
added localtime_r and a stub (which needs mutexes, which we still have to port!)
Diffstat (limited to 'src/port/time.h')
-rw-r--r--src/port/time.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/port/time.h b/src/port/time.h
new file mode 100644
index 0000000..fd2f64f
--- /dev/null
+++ b/src/port/time.h
@@ -0,0 +1,15 @@
+#ifndef __TIME_H
+#define __TIME_H
+
+#include "port/sys.h"
+
+#include <time.h>
+
+#if !defined HAVE_LOCALTIME_R || defined TEST_LOCALTIME_R
+extern struct tm *wolf_port_localtime_r( const time_t *timep, struct tm *result );
+#endif
+#if !defined HAVE_LOCALTIME_R
+#define localtime_r( timep, result ) wolf_port_localtime_r( timep, result )
+#endif
+
+#endif /* ifndef __TIME_H */