From f5a134ac42dbfda2facd110e54e3cc707b55725c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 5 Jul 2004 22:23:25 +0000 Subject: [PATCH] Added empty and non-working versions of mktime() and localtime(). BSD code is not in a good shape, Linux code is pretty ugly - we'll see which one we'll choose :) git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8324 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/libroot/posix/time/Jamfile | 2 ++ src/kernel/libroot/posix/time/localtime.c | 24 +++++++++++++++++++++++ src/kernel/libroot/posix/time/mktime.c | 16 +++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 src/kernel/libroot/posix/time/localtime.c create mode 100644 src/kernel/libroot/posix/time/mktime.c diff --git a/src/kernel/libroot/posix/time/Jamfile b/src/kernel/libroot/posix/time/Jamfile index 3ec06f11a6..44ec5f9ae4 100644 --- a/src/kernel/libroot/posix/time/Jamfile +++ b/src/kernel/libroot/posix/time/Jamfile @@ -2,6 +2,8 @@ SubDir OBOS_TOP src kernel libroot posix time ; KernelMergeObject posix_time.o : <$(SOURCE_GRIST)>asctime.c + <$(SOURCE_GRIST)>localtime.c + <$(SOURCE_GRIST)>mktime.c <$(SOURCE_GRIST)>time.c : -fPIC -DPIC diff --git a/src/kernel/libroot/posix/time/localtime.c b/src/kernel/libroot/posix/time/localtime.c new file mode 100644 index 0000000000..56e4e63b48 --- /dev/null +++ b/src/kernel/libroot/posix/time/localtime.c @@ -0,0 +1,24 @@ +/* +** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. +** Distributed under the terms of the Haiku License. +*/ + + +#include +#include + + +struct tm * +localtime_r(const time_t *_timer, struct tm *tm) +{ + return tm; +} + + +struct tm * +localtime(const time_t *_timer) +{ + static struct tm tm; + return localtime_r(_timer, &tm); +} + diff --git a/src/kernel/libroot/posix/time/mktime.c b/src/kernel/libroot/posix/time/mktime.c new file mode 100644 index 0000000000..5244c5b3c6 --- /dev/null +++ b/src/kernel/libroot/posix/time/mktime.c @@ -0,0 +1,16 @@ +/* +** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. +** Distributed under the terms of the Haiku License. +*/ + + +#include +#include + + +time_t +mktime(struct tm *tm) +{ + return 0; +} +