Index: /trunk/src/emx/ChangeLog.LIBC
===================================================================
--- /trunk/src/emx/ChangeLog.LIBC	(revision 1971)
+++ /trunk/src/emx/ChangeLog.LIBC	(revision 1972)
@@ -8,4 +8,5 @@
         o Disabled the UF_ and SF_ defines in sys/stat.h since we don't have st_flags.
         o Added mkfifo (stub).
+        o Added lutimes and futimes, replacing __utimes.
 
 2005-05-01: knut st. osmundsen <bird-gccos2-spam@anduin.net>
Index: /trunk/src/emx/include/InnoTekLIBC/backend.h
===================================================================
--- /trunk/src/emx/include/InnoTekLIBC/backend.h	(revision 1971)
+++ /trunk/src/emx/include/InnoTekLIBC/backend.h	(revision 1972)
@@ -289,5 +289,5 @@
 
 /**
- * Sets the file access mode of a file.
+ * Sets the file access mode of a symlink.
  *
  * @returns 0 on success.
@@ -297,4 +297,14 @@
  */
 int __libc_Back_fsSymlinkModeSet(const char *pszPath, mode_t Mode);
+
+/**
+ * Sets the file times of a symlink.
+ *
+ * @returns 0 on success.
+ * @returns Negative error code (errno.h) on failure.
+ * @param   pszPath The path to the file to set the mode of.
+ * @param   paTimes Two timevalue structures. If NULL the current time is used.
+ */
+int __libc_Back_fsSymlinkTimesSet(const char *pszPath, const struct timeval *paTimes);
 
 /**
@@ -338,4 +348,24 @@
  */
 int __libc_Back_fsFileModeSetFH(int fh, mode_t Mode);
+
+/**
+ * Sets the file the times of a file.
+ *
+ * @returns 0 on success.
+ * @returns Negative error code (errno.h) on failure.
+ * @param   pszPath The path to the file to set the times of.
+ * @param   paTimes Two timevalue structures. If NULL the current time is used.
+ */
+int __libc_Back_fsFileTimesSet(const char *pszPath, const struct timeval *paTimes);
+
+/**
+ * Sets the file the times of a file by filehandle.
+ *
+ * @returns 0 on success.
+ * @returns Negative error code (errno.h) on failure.
+ * @param   fh      Handle to file.
+ * @param   paTimes Two timevalue structures. If NULL the current time is used.
+ */
+int __libc_Back_fsFileTimesSetFH(int fh, const struct timeval *paTimes);
 
 /**
Index: /trunk/src/emx/include/sys/time.h
===================================================================
--- /trunk/src/emx/include/sys/time.h	(revision 1971)
+++ /trunk/src/emx/include/sys/time.h	(revision 1972)
@@ -41,5 +41,4 @@
  * @changed IBM TCP paranoia.
  * @changed Added hrtime_t and gethrtime from SUN/HP/RTLinux.
- * @todo    Implement futimes() and lutimes().
  */
 
@@ -326,8 +325,8 @@
 __BEGIN_DECLS
 /** @todo int	adjtime(const struct timeval *, struct timeval *); */
-/** @todo int	futimes(int, const struct timeval *); */
+int	futimes(int, const struct timeval *);
 int	getitimer(int, struct itimerval *);
 int	gettimeofday(struct timeval *, struct timezone *);
-/** @todo int	lutimes(const char *, const struct timeval *); */
+int	lutimes(const char *, const struct timeval *);
 int	setitimer(int, const struct itimerval *, struct itimerval *);
 int	settimeofday(const struct timeval *, const struct timezone *);
Index: /trunk/src/emx/src/lib/io/futimes.c
===================================================================
--- /trunk/src/emx/src/lib/io/futimes.c	(revision 1972)
+++ /trunk/src/emx/src/lib/io/futimes.c	(revision 1972)
@@ -0,0 +1,61 @@
+/* $Id$ */
+/** @file
+ *
+ * LIBC - futimes.
+ *
+ * Copyright (c) 2005 knut st. osmundsen <bird@anduin.net>
+ *
+ *
+ * This file is part of kBuild.
+ *
+ * kBuild is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * kBuild is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with kBuild; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+
+/*******************************************************************************
+*   Header Files                                                               *
+*******************************************************************************/
+#include "libc-alias.h"
+#include <sys/time.h>
+#include <errno.h>
+#include <InnoTekLIBC/backend.h>
+#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_IO
+#include <InnoTekLIBC/logstrict.h>
+
+
+/**
+ * Sets the access and modification times of a file.
+ *
+ * @returns 0 on success.
+ * @returns -1 and errno on failure.
+ *
+ * @param   fh          The handle to the file which times to set.
+ * @param   paTimes     Pointer to an array containing the access and modification times in that order.
+ *                      If NULL current time is used.
+ */
+int _STD(futimes)(int fh, const struct timeval *paTimes)
+{
+    LIBCLOG_ENTER("fh=%d paTimes=%p:{{.tv_sec=%ld, .tv_usec=%ld}, {.tv_sec=%ld, .tv_usec=%ld}}\n",
+                  fh, (void *)paTimes,
+                  paTimes ? paTimes[0].tv_sec : ~0, paTimes ? paTimes[0].tv_usec : ~0,
+                  paTimes ? paTimes[1].tv_sec : ~0, paTimes ? paTimes[1].tv_usec : ~0);
+    int rc = __libc_Back_fsFileTimesSetFH(fh, paTimes);
+    if (!rc)
+        LIBCLOG_RETURN_INT(0);
+    errno = -rc;
+    LIBCLOG_RETURN_INT(-1);
+}
+
Index: /trunk/src/emx/src/lib/io/lutimes.c
===================================================================
--- /trunk/src/emx/src/lib/io/lutimes.c	(revision 1972)
+++ /trunk/src/emx/src/lib/io/lutimes.c	(revision 1972)
@@ -0,0 +1,61 @@
+/* $Id$ */
+/** @file
+ *
+ * LIBC - lutimes.
+ *
+ * Copyright (c) 2005 knut st. osmundsen <bird@anduin.net>
+ *
+ *
+ * This file is part of kBuild.
+ *
+ * kBuild is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * kBuild is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with kBuild; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+
+/*******************************************************************************
+*   Header Files                                                               *
+*******************************************************************************/
+#include "libc-alias.h"
+#include <sys/time.h>
+#include <errno.h>
+#include <InnoTekLIBC/backend.h>
+#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_IO
+#include <InnoTekLIBC/logstrict.h>
+
+
+/**
+ * Sets the access and modification times of a symbolic link or file.
+ *
+ * @returns 0 on success.
+ * @returns -1 and errno on failure.
+ *
+ * @param   pszPath     The file which times to set.
+ * @param   paTimes     Pointer to an array containing the access and modification times in that order.
+ *                      If NULL current time is used.
+ */
+int _STD(lutimes)(const char *pszPath, const struct timeval *paTimes)
+{
+    LIBCLOG_ENTER("pszPath=%p:{%s} paTimes=%p:{{.tv_sec=%ld, .tv_usec=%ld}, {.tv_sec=%ld, .tv_usec=%ld}}\n",
+                  (void *)pszPath, pszPath, (void *)paTimes,
+                  paTimes ? paTimes[0].tv_sec : ~0, paTimes ? paTimes[0].tv_usec : ~0,
+                  paTimes ? paTimes[1].tv_sec : ~0, paTimes ? paTimes[1].tv_usec : ~0);
+    int rc = __libc_Back_fsSymlinkTimesSet(pszPath, paTimes);
+    if (!rc)
+        LIBCLOG_RETURN_INT(0);
+    errno = -rc;
+    LIBCLOG_RETURN_INT(-1);
+}
+
Index: /trunk/src/emx/src/lib/io/utime.c
===================================================================
--- /trunk/src/emx/src/lib/io/utime.c	(revision 1971)
+++ /trunk/src/emx/src/lib/io/utime.c	(revision 1972)
@@ -1,31 +1,68 @@
-/* utime.c (emx+gcc) -- Copyright (c) 1990-2000 by Eberhard Mattes */
+/* $Id: $ */
+/** @file
+ *
+ * LIBC - utime.
+ *
+ * Copyright (c) 2005 knut st. osmundsen <bird@anduin.net>
+ *
+ *
+ * This file is part of kBuild.
+ *
+ * kBuild is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * kBuild is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with kBuild; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
 
+
+/*******************************************************************************
+*   Header Files                                                               *
+*******************************************************************************/
 #include "libc-alias.h"
-#include <time.h>
 #include <sys/time.h>
-#include <sys/utime.h>
-#include <emx/time.h>
-#include <emx/syscalls.h>
+#include <utime.h>
+#include <InnoTekLIBC/backend.h>
+#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_IO
+#include <InnoTekLIBC/logstrict.h>
 
-int _STD(utime) (const char *name, const struct utimbuf *times)
+
+/**
+ * Sets the access and modification times of a file.
+ *
+ * @returns 0 on success.
+ * @returns -1 and errno on failure.
+ *
+ * @param   pszPath     The file which times to set.
+ * @param   pTime       Pointer to the access and modification times. If NULL current time is used.
+ */
+int _STD(utime)(const char *pszPath, const struct utimbuf *pTimes)
 {
-  struct timeval tv[2];
-  time_t tmp;
+    LIBCLOG_ENTER("pszPath=%p:{%s} pTimes=%p:{.actime=%d, .modtime=%d}\n",
+                  (void *)pszPath, pszPath, (void *)pTimes,
+                  pTimes ? pTimes->actime : ~0, pTimes ? pTimes->modtime : ~0);
+    int rc;
+    if (pTimes)
+    {
+        struct timeval aTimes[2];
+        aTimes[0].tv_sec = pTimes->actime;
+        aTimes[0].tv_usec = 0;
+        aTimes[1].tv_sec = pTimes->modtime;
+        aTimes[1].tv_usec = 0;
+        rc = utimes(pszPath, &aTimes[0]);
+    }
+    else
+        rc = utimes(pszPath, NULL);
 
-  if (times == NULL)
-    {
-      tv[0].tv_sec = tv[1].tv_sec = time (NULL);
-      tv[0].tv_usec = tv[1].tv_usec = 0;
-    }
-  else
-    {
-      tv[0].tv_sec = times->actime;
-      tv[0].tv_usec = 0;
-      tv[1].tv_sec = times->modtime;
-      tv[1].tv_usec = 0;
-    }
-  if (!_tzset_flag) tzset ();
-  tmp = tv[0].tv_sec; _gmt2loc (&tmp); tv[0].tv_sec = tmp;
-  tmp = tv[1].tv_sec; _gmt2loc (&tmp); tv[1].tv_sec = tmp;
-  return __utimes (name, tv);
+    LIBCLOG_RETURN_INT(rc);
 }
+
Index: /trunk/src/emx/src/lib/io/utimes.c
===================================================================
--- /trunk/src/emx/src/lib/io/utimes.c	(revision 1971)
+++ /trunk/src/emx/src/lib/io/utimes.c	(revision 1972)
@@ -1,28 +1,61 @@
-/* utimes.c (emx+gcc) -- Copyright (c) 1990-2000 by Eberhard Mattes */
+/* $Id: $ */
+/** @file
+ *
+ * LIBC - utimes.
+ *
+ * Copyright (c) 2005 knut st. osmundsen <bird@anduin.net>
+ *
+ *
+ * This file is part of kBuild.
+ *
+ * kBuild is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * kBuild is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with kBuild; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
 
+
+/*******************************************************************************
+*   Header Files                                                               *
+*******************************************************************************/
 #include "libc-alias.h"
-#include <time.h>
 #include <sys/time.h>
-#include <emx/time.h>
-#include <emx/syscalls.h>
+#include <errno.h>
+#include <InnoTekLIBC/backend.h>
+#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_IO
+#include <InnoTekLIBC/logstrict.h>
 
-int _STD(utimes) (const char *name, const struct timeval *tvp)
+
+/**
+ * Sets the access and modification times of a file.
+ *
+ * @returns 0 on success.
+ * @returns -1 and errno on failure.
+ *
+ * @param   pszPath     The file which times to set.
+ * @param   paTimes     Pointer to an array containing the access and modification times in that order.
+ *                      If NULL current time is used.
+ */
+int _STD(utimes)(const char *pszPath, const struct timeval *paTimes)
 {
-  struct timeval tv[2];
-  time_t tmp;
+    LIBCLOG_ENTER("pszPath=%p:{%s} paTimes=%p:{{.tv_sec=%ld, .tv_usec=%ld}, {.tv_sec=%ld, .tv_usec=%ld}}\n",
+                  (void *)pszPath, pszPath, (void *)paTimes,
+                  paTimes ? paTimes[0].tv_sec : ~0, paTimes ? paTimes[0].tv_usec : ~0,
+                  paTimes ? paTimes[1].tv_sec : ~0, paTimes ? paTimes[1].tv_usec : ~0);
+    int rc = __libc_Back_fsFileTimesSet(pszPath, paTimes);
+    if (!rc)
+        LIBCLOG_RETURN_INT(0);
+    errno = -rc;
+    LIBCLOG_RETURN_INT(-1);
+}
 
-  if (tvp == NULL)
-    {
-      tv[0].tv_sec = tv[1].tv_sec = time (NULL);
-      tv[0].tv_usec = tv[1].tv_usec = 0;
-    }
-  else
-    {
-      tv[0] = tvp[0];
-      tv[1] = tvp[1];
-    }
-  if (!_tzset_flag) tzset ();
-  tmp = tv[0].tv_sec; _gmt2loc (&tmp); tv[0].tv_sec = tmp;
-  tmp = tv[1].tv_sec; _gmt2loc (&tmp); tv[1].tv_sec = tmp;
-  return __utimes (name, tv);
-}
Index: /trunk/src/emx/src/lib/libc.def
===================================================================
--- /trunk/src/emx/src/lib/libc.def	(revision 1971)
+++ /trunk/src/emx/src/lib/libc.def	(revision 1972)
@@ -424,5 +424,5 @@
     "___ulimit" @437
     "___unwind2" @438
-    "___utimes" @439
+    "__std_lutimes" @439
     "___wait" @440
     "___waitpid" @441
@@ -1520,2 +1520,8 @@
     "_fts_set_clientptr" @1525
     "__std_mkfifo" @1526
+    "___libc_Back_fsFileTimesSet" @1527
+    "___libc_Back_fsFileTimesSetFH" @1528
+    "___libc_Back_fsSymlinkTimesSet" @1529
+    "__std_futimes" @1530
+    "___nullstub_function" @1531
+    "___nullstub_data" @1532
Index: /trunk/src/emx/src/lib/libc06b4.def
===================================================================
--- /trunk/src/emx/src/lib/libc06b4.def	(revision 1971)
+++ /trunk/src/emx/src/lib/libc06b4.def	(revision 1972)
@@ -422,5 +422,5 @@
     "___ulimit" @437
     "___unwind2" @438
-    "___utimes" @439
+    "___utimes" = ___nullstub_function @439
     "___wait" @440
     "___waitpid" @441
Index: /trunk/src/emx/src/lib/misc/mknod.c
===================================================================
--- /trunk/src/emx/src/lib/misc/mknod.c	(revision 1971)
+++ /trunk/src/emx/src/lib/misc/mknod.c	(revision 1972)
@@ -41,12 +41,11 @@
 
 /**
- * Hardlinks a file.
- *
- * This is stub. It always fails.
+ * Create a filesystem node.
  *
  * @returns 0 on success.
  * @returns -1 and errno on failure.
- * @param   oldpath     Path to the old (or current if you prefere) file.
- * @param   newpath     Path to the new file.
+ * @param   path        Path to the old
+ * @param   mode        The filemode and type.
+ * @param   dev         Device node id if applies.
  */
 int	 _STD(mknod)(const char *path, mode_t mode, dev_t dev)
@@ -58,13 +57,13 @@
      */
     int rc;
-    switch (S_IFMT)
+    switch (S_IFMT & mode)
     {
         case S_IFDIR:
             rc = mkdir(path, mode);
             break;
-#if 0
         case S_IFIFO:
             rc = mkfifo(path, mode);
             break;
+#if 0
         case S_IFSOCK:
             /* check if right prefix. */
Index: /trunk/src/emx/src/lib/misc/nullstub.c
===================================================================
--- /trunk/src/emx/src/lib/misc/nullstub.c	(revision 1972)
+++ /trunk/src/emx/src/lib/misc/nullstub.c	(revision 1972)
@@ -0,0 +1,47 @@
+/* $Id$ */
+/** @file
+ *
+ * LIBC - compatiblity stubs.
+ *
+ * Copyright (c) 2005 knut st. osmundsen <bird@anduin.net>
+ *
+ *
+ * This file is part of kBuild.
+ *
+ * kBuild is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * kBuild is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with kBuild; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+/*******************************************************************************
+*   Header Files                                                               *
+*******************************************************************************/
+#include <stdlib.h>
+#include <unistd.h>
+
+
+/*******************************************************************************
+*   Global Variables                                                           *
+*******************************************************************************/
+char __nullstub_data[32] = {0};
+
+
+int __nullstub_function(void);
+int __nullstub_function(void)
+{
+    write(2, "\r\n__stub_function\r\n", sizeof("\r\n__stub_function\r\n") - 1);
+    abort();
+    return -1;
+}
+
Index: /trunk/src/emx/src/lib/sys/__utimes.c
===================================================================
--- /trunk/src/emx/src/lib/sys/__utimes.c	(revision 1971)
+++ /trunk/src/emx/src/lib/sys/__utimes.c	(revision 1972)
@@ -1,112 +1,1 @@
-/* sys/utimes.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */
-
-#include "libc-alias.h"
-#define INCL_FSMACROS
-#include <os2emx.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <time.h>
-#include <sys/time.h>
-#include <emx/syscalls.h>
-#include "syscalls.h"
-#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_IO
-#include <InnoTekLIBC/logstrict.h>
-#include <InnoTekLIBC/pathrewrite.h>
-
-
-static void _sys_t2p(time_t sec, PFTIME time, PFDATE date)
-{
-    struct tm *p;
-    USHORT tmp;
-
-    p = gmtime(&sec);
-#if 0                           /* This didn't work in GCC versions <= 2.4 */
-    time->twosecs   = p->tm_sec / 2;
-    time->minutes   = p->tm_min;
-    time->hours     = p->tm_hour;
-    date->day       = p->tm_mday;
-    date->month     = p->tm_mon + 1;
-    date->year      = p->tm_year - 1980 + 1900;
-#else
-    tmp = (p->tm_sec / 2) + (p->tm_min << 5) + (p->tm_hour << 11);
-    *(USHORT *)time = tmp;
-    tmp = p->tm_mday + ((p->tm_mon + 1) << 5) + ((p->tm_year - 80) << 9);
-    *(USHORT *)date = tmp;
-#endif
-}
-
-
-int __utimes(const char *pszPath, const struct timeval *tvp)
-{
-    LIBCLOG_ENTER("pszPath=%s tvp=%p {{%ld,%ld}, {%ld,%ld}}\n", pszPath, (void*)tvp,
-                  tvp ? tvp[0].tv_sec : ~0, tvp ? tvp[0].tv_usec : ~0,
-                  tvp ? tvp[1].tv_sec : ~0, tvp ? tvp[1].tv_usec : ~0);
-    int         cch;
-    ULONG       rc;
-    FILESTATUS3 info;
-    FS_VAR();
-
-    /*
-     * Rewrite the specified file path.
-     */
-    cch = __libc_PathRewrite(pszPath, NULL, 0);
-    if (cch > 0)
-    {
-        char *pszRewritten = alloca(cch);
-        if (!pszRewritten)
-        {
-            errno = ENOMEM;
-            LIBCLOG_RETURN_INT(-1);
-        }
-        cch = __libc_PathRewrite(pszPath, pszRewritten, cch);
-        if (cch > 0)
-            pszPath = pszRewritten;
-        /* else happens when someone changes the rules between the two calls. */
-        else if (cch < 0)
-        {
-            errno = EAGAIN;             /* non-standard, I'm sure. */
-            LIBCLOG_RETURN_INT(-1);
-        }
-    }
-
-    /*
-     * Validate input.
-     */
-    if (    (pszPath[0] == '/' || pszPath[0] == '\\')
-        &&  (pszPath[1] == 'p' || pszPath[1] == 'P')
-        &&  (pszPath[2] == 'i' || pszPath[2] == 'I')
-        &&  (pszPath[3] == 'p' || pszPath[3] == 'P')
-        &&  (pszPath[4] == 'e' || pszPath[4] == 'E')
-        &&  (pszPath[5] == '/' || pszPath[5] == '\\'))
-    {
-        errno = ENOENT;
-        return -1;
-    }
-
-    /*
-     * Query current path info.
-     */
-    FS_SAVE_LOAD();
-    rc = DosQueryPathInfo((PCSZ)pszPath, FIL_STANDARD, &info, sizeof(info));
-    if (rc)
-    {
-        FS_RESTORE();
-        _sys_set_errno(rc);
-        LIBCLOG_RETURN_INT(-1);
-    }
-
-    /*
-     * Apply the new times and update.
-     */
-    _sys_t2p(tvp[0].tv_sec, &info.ftimeLastAccess, &info.fdateLastAccess);
-    _sys_t2p(tvp[1].tv_sec, &info.ftimeLastWrite,  &info.fdateLastWrite);
-    rc = DosSetPathInfo((PCSZ)pszPath, FIL_STANDARD, &info, sizeof(info), 0);
-    FS_RESTORE();
-    if (rc)
-    {
-        _sys_set_errno(rc);
-        LIBCLOG_RETURN_INT(-1);
-    }
-    LIBCLOG_RETURN_INT(0);
-}
+/* dead */
Index: /trunk/src/emx/src/lib/sys/b_fs.h
===================================================================
--- /trunk/src/emx/src/lib/sys/b_fs.h	(revision 1971)
+++ /trunk/src/emx/src/lib/sys/b_fs.h	(revision 1972)
@@ -215,4 +215,14 @@
 
 /**
+ * Sets the file times of a native file.
+ *
+ * @returns 0 on success.
+ * @returns Negative error code (errno.h) on failure.
+ * @param   pszNativePath   Path to the file to set the times of.
+ * @param   paTimes         Two timevalue structures. If NULL the current time is used.
+ */
+int __libc_back_fsNativeFileTimesSet(const char *pszNativePath, const struct timeval *paTimes);
+
+/**
  * Calc the Inode and Dev based on native path.
  *
Index: /trunk/src/emx/src/lib/sys/b_fsFileTimesSet.c
===================================================================
--- /trunk/src/emx/src/lib/sys/b_fsFileTimesSet.c	(revision 1972)
+++ /trunk/src/emx/src/lib/sys/b_fsFileTimesSet.c	(revision 1972)
@@ -0,0 +1,62 @@
+/* $Id$ */
+/** @file
+ *
+ * LIBC SYS Backend - utimes().
+ *
+ * Copyright (c) 2005 knut st. osmundsen <bird@anduin.net>
+ *
+ *
+ * This file is part of InnoTek LIBC.
+ *
+ * InnoTek LIBC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * InnoTek LIBC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with InnoTek LIBC; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+/*******************************************************************************
+*   Header Files                                                               *
+*******************************************************************************/
+#include "b_fs.h"
+#include <sys/stat.h>
+#include <InnoTekLIBC/backend.h>
+#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_FS
+#include <InnoTekLIBC/logstrict.h>
+
+
+/**
+ * Sets the file the times of a file.
+ *
+ * @returns 0 on success.
+ * @returns Negative error code (errno.h) on failure.
+ * @param   pszPath The path to the file to set the times of.
+ * @param   paTimes Two timevalue structures. If NULL the current time is used.
+ */
+int __libc_Back_fsFileTimesSet(const char *pszPath, const struct timeval *paTimes)
+{
+    LIBCLOG_ENTER("pszPath=%p:{%s} paTimes=%p:{{.tv_sec=%ld, .tv_usec=%ld}, {.tv_sec=%ld, .tv_usec=%ld}}\n",
+                  (void *)pszPath, pszPath, (void *)paTimes,
+                  paTimes ? paTimes[0].tv_sec : ~0, paTimes ? paTimes[0].tv_usec : ~0,
+                  paTimes ? paTimes[1].tv_sec : ~0, paTimes ? paTimes[1].tv_usec : ~0);
+
+    /*
+     * Resolve the path.
+     */
+    char szNativePath[PATH_MAX];
+    int rc = __libc_back_fsResolve(pszPath, BACKFS_FLAGS_RESOLVE_FULL | BACKFS_FLAGS_RESOLVE_DIR_MAYBE, szNativePath, NULL);
+    if (!rc)
+        rc = __libc_back_fsNativeFileTimesSet(szNativePath, paTimes);
+
+    LIBCLOG_RETURN_INT(rc);
+}
+
Index: /trunk/src/emx/src/lib/sys/b_fsFileTimesSetFH.c
===================================================================
--- /trunk/src/emx/src/lib/sys/b_fsFileTimesSetFH.c	(revision 1972)
+++ /trunk/src/emx/src/lib/sys/b_fsFileTimesSetFH.c	(revision 1972)
@@ -0,0 +1,188 @@
+/* $Id$ */
+/** @file
+ *
+ * LIBC SYS Backend - futimes.
+ *
+ * Copyright (c) 2005 knut st. osmundsen <bird@innotek.de>
+ *
+ *
+ * This file is part of InnoTek LIBC.
+ *
+ * InnoTek LIBC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * InnoTek LIBC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with InnoTek LIBC; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+
+/*******************************************************************************
+*   Header Files                                                               *
+*******************************************************************************/
+#include "libc-alias.h"
+#define INCL_FSMACROS
+#include <os2emx.h>
+#include "b_fs.h"
+#include "b_time.h"
+#include <string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/fcntl.h>
+#include <sys/timeb.h>
+#include <emx/io.h>
+#include <emx/time.h>
+#include <emx/syscalls.h>
+#include <limits.h>
+#include "syscalls.h"
+#include <InnoTekLIBC/libc.h>
+#include <InnoTekLIBC/backend.h>
+#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_FS
+#include <InnoTekLIBC/logstrict.h>
+
+
+/**
+ * Sets the file the times of a file by filehandle.
+ *
+ * @returns 0 on success.
+ * @returns Negative error code (errno.h) on failure.
+ * @param   fh      Handle to file.
+ * @param   paTimes Two timevalue structures. If NULL the current time is used.
+ */
+int __libc_Back_fsFileTimesSetFH(int fh, const struct timeval *paTimes)
+{
+    LIBCLOG_ENTER("fh=%d paTimes=%p:{{.tv_sec=%ld, .tv_usec=%ld}, {.tv_sec=%ld, .tv_usec=%ld}}\n",
+                  fh, (void *)paTimes,
+                  paTimes ? paTimes[0].tv_sec : ~0, paTimes ? paTimes[0].tv_usec : ~0,
+                  paTimes ? paTimes[1].tv_sec : ~0, paTimes ? paTimes[1].tv_usec : ~0);
+
+    /*
+     * Get filehandle.
+     */
+    PLIBCFH pFH;
+
+    int rc = __libc_FHEx(fh, &pFH);
+    if (!pFH)
+        LIBCLOG_RETURN_INT(rc);
+
+    /*
+     * Check the type.
+     */
+    switch (pFH->fFlags & __LIBC_FH_TYPEMASK)
+    {
+        /* fail */
+        case F_SOCKET:
+        case F_PIPE: /* treat as socket for now */
+            LIBCLOG_RETURN_INT(-EINVAL);
+        /* ignore */
+        case F_DEV:
+            LIBCLOG_RETURN_INT(0);
+
+        /* treat */
+        default:
+        case F_FILE:
+            break;
+    }
+
+    if (!pFH->pOps)
+    {
+        /*
+         * Ok, we can normalize the time.
+         */
+        time_t aTimes[2]; /* seconds since 1970 */
+        if (!paTimes)
+        {
+            struct timeb TimeBuf;
+            __ftime(&TimeBuf);
+            aTimes[0] = TimeBuf.time;
+            aTimes[1] = TimeBuf.time;
+        }
+        else
+        {
+            if (!_tzset_flag)
+                tzset();
+            aTimes[0] = paTimes[0].tv_sec;
+            _gmt2loc(&aTimes[0]);
+            aTimes[1] = paTimes[1].tv_sec;
+            _gmt2loc(&aTimes[1]);
+        }
+
+        /*
+         * Standard OS/2 file handle.
+         */
+        FS_VAR();
+        FS_SAVE_LOAD();
+        union
+        {
+            FILESTATUS3     fsts3;
+            FILESTATUS3L    fsts3L;
+        } info;
+#if OFF_MAX > LONG_MAX
+        int     fLarge = 0;
+#endif
+
+        /*
+         * Get file info.
+         * We have a little hack here, temporarily, write only files
+         * cannot read EAs.
+         */
+#if OFF_MAX > LONG_MAX
+        if (__libc_gpfnDosOpenL)
+        {
+            rc = DosQueryFileInfo(fh, FIL_STANDARDL, &info, sizeof(info.fsts3L));
+            fLarge = 1;
+        }
+        else
+#endif
+            rc = DosQueryFileInfo(fh, FIL_STANDARD, &info, sizeof(info.fsts3));
+        if (rc)
+        {
+            FS_RESTORE();
+            rc = -__libc_native2errno(rc);
+            LIBCLOG_RETURN_INT(rc);
+        }
+
+        /*
+         * Update OS/2 bits.
+         */
+#if OFF_MAX > LONG_MAX
+        if (fLarge)
+        {
+            __libc_back_timeUnix2FileTime(aTimes[0], &info.fsts3L.ftimeLastAccess, &info.fsts3L.fdateLastAccess);
+            __libc_back_timeUnix2FileTime(aTimes[1], &info.fsts3L.ftimeLastWrite,  &info.fsts3L.fdateLastWrite);
+            rc = DosSetFileInfo(fh, FIL_STANDARDL, &info, sizeof(info.fsts3L));
+        }
+        else
+#endif
+        {
+            __libc_back_timeUnix2FileTime(aTimes[0], &info.fsts3.ftimeLastAccess, &info.fsts3.fdateLastAccess);
+            __libc_back_timeUnix2FileTime(aTimes[1], &info.fsts3.ftimeLastWrite,  &info.fsts3.fdateLastWrite);
+            rc = DosSetFileInfo(fh, FIL_STANDARD, &info, sizeof(info.fsts3));
+        }
+        FS_RESTORE();
+        if (rc)
+        {
+            rc = -__libc_native2errno(rc);
+            LIBCLOG_RETURN_INT(rc);
+        }
+    }
+    else
+    {
+        /*
+         * Non-standard handle - fail.
+         */
+        LIBCLOG_RETURN_INT(-EOPNOTSUPP);
+    }
+
+    LIBCLOG_RETURN_INT(0);
+}
+
Index: /trunk/src/emx/src/lib/sys/b_fsNativeFileTimesSet.c
===================================================================
--- /trunk/src/emx/src/lib/sys/b_fsNativeFileTimesSet.c	(revision 1972)
+++ /trunk/src/emx/src/lib/sys/b_fsNativeFileTimesSet.c	(revision 1972)
@@ -0,0 +1,158 @@
+/* $Id$ */
+/** @file
+ *
+ * LIBC SYS Backend - internal [l]utimes.
+ *
+ * Copyright (c) 2005 knut st. osmundsen <bird@innotek.de>
+ *
+ *
+ * This file is part of InnoTek LIBC.
+ *
+ * InnoTek LIBC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * InnoTek LIBC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with InnoTek LIBC; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+
+/*******************************************************************************
+*   Header Files                                                               *
+*******************************************************************************/
+#include "libc-alias.h"
+#define INCL_BASE
+#define INCL_FSMACROS
+#include <os2emx.h>
+#include "b_fs.h"
+#include "b_time.h"
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/timeb.h>
+#include "syscalls.h"
+#include <emx/syscalls.h>
+#include <emx/time.h>
+#include <InnoTekLIBC/libc.h>
+#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_FS
+#include <InnoTekLIBC/logstrict.h>
+
+
+/**
+ * Sets the file times of a native file.
+ *
+ * @returns 0 on success.
+ * @returns Negative error code (errno.h) on failure.
+ * @param   pszNativePath   Path to the file to set the times of.
+ * @param   paTimes         Two timevalue structures. If NULL the current time is used.
+ */
+int __libc_back_fsNativeFileTimesSet(const char *pszNativePath, const struct timeval *paTimes)
+{
+    LIBCLOG_ENTER("pszNativePath=%p:{%s} paTimes=%p:{{.tv_sec=%ld, .tv_usec=%ld}, {.tv_sec=%ld, .tv_usec=%ld}}\n",
+                  (void *)pszNativePath, pszNativePath, (void *)paTimes,
+                  paTimes ? paTimes[0].tv_sec : ~0, paTimes ? paTimes[0].tv_usec : ~0,
+                  paTimes ? paTimes[1].tv_sec : ~0, paTimes ? paTimes[1].tv_usec : ~0);
+    union
+    {
+        FILESTATUS3     fsts3;
+        FILESTATUS3L    fsts3L;
+    } info;
+#if OFF_MAX > LONG_MAX
+    int     fLarge = 0;
+#endif
+    FS_VAR();
+
+    /*
+     * Validate input, refusing named pipes.
+     */
+    if (    (pszNativePath[0] == '/' || pszNativePath[0] == '\\')
+        &&  (pszNativePath[1] == 'p' || pszNativePath[1] == 'P')
+        &&  (pszNativePath[2] == 'i' || pszNativePath[2] == 'I')
+        &&  (pszNativePath[3] == 'p' || pszNativePath[3] == 'P')
+        &&  (pszNativePath[4] == 'e' || pszNativePath[4] == 'E')
+        &&  (pszNativePath[5] == '/' || pszNativePath[5] == '\\'))
+        LIBCLOG_RETURN_INT(-ENOENT);
+
+    /*
+     * If potential device, then perform real check.
+     * (Devices are subject to mode in POSIX.)
+     */
+    /** @todo copy device check from the path resolver. */
+
+    /*
+     * Ok, we can normalize the time.
+     */
+    time_t aTimes[2]; /* seconds since 1970 */
+    if (!paTimes)
+    {
+        struct timeb TimeBuf;
+        __ftime(&TimeBuf);
+        aTimes[0] = TimeBuf.time;
+        aTimes[1] = TimeBuf.time;
+    }
+    else
+    {
+        if (!_tzset_flag)
+            tzset();
+        aTimes[0] = paTimes[0].tv_sec;
+        _gmt2loc(&aTimes[0]);
+        aTimes[1] = paTimes[1].tv_sec;
+        _gmt2loc(&aTimes[1]);
+    }
+
+    /*
+     * Get path info.
+     */
+    FS_SAVE_LOAD();
+    int rc;
+#if OFF_MAX > LONG_MAX
+    if (__libc_gpfnDosOpenL)
+    {
+        rc = DosQueryPathInfo((PCSZ)pszNativePath, FIL_STANDARDL, &info, sizeof(info.fsts3L));
+        fLarge = 1;
+    }
+    else
+#endif
+        rc = DosQueryPathInfo((PCSZ)pszNativePath, FIL_STANDARD, &info, sizeof(info.fsts3));
+    if (rc)
+    {
+        rc = -__libc_native2errno(rc);
+        FS_RESTORE();
+        LIBCLOG_RETURN_INT(rc);
+    }
+
+    /*
+     * Update OS/2 attributes.
+     */
+#if OFF_MAX > LONG_MAX
+    if (fLarge)
+    {
+        __libc_back_timeUnix2FileTime(aTimes[0], &info.fsts3L.ftimeLastAccess, &info.fsts3L.fdateLastAccess);
+        __libc_back_timeUnix2FileTime(aTimes[1], &info.fsts3L.ftimeLastWrite,  &info.fsts3L.fdateLastWrite);
+        rc = DosSetPathInfo((PCSZ)pszNativePath, FIL_STANDARDL, &info, sizeof(info.fsts3L), 0);
+    }
+    else
+#endif
+    {
+        __libc_back_timeUnix2FileTime(aTimes[0], &info.fsts3.ftimeLastAccess, &info.fsts3.fdateLastAccess);
+        __libc_back_timeUnix2FileTime(aTimes[1], &info.fsts3.ftimeLastWrite,  &info.fsts3.fdateLastWrite);
+        rc = DosSetPathInfo((PCSZ)pszNativePath, FIL_STANDARD, &info, sizeof(info.fsts3), 0);
+    }
+
+    FS_RESTORE();
+    if (rc)
+        rc = -__libc_native2errno(rc);
+    LIBCLOG_RETURN_INT(rc);
+}
+
Index: /trunk/src/emx/src/lib/sys/b_fsSymlinkTimesSet.c
===================================================================
--- /trunk/src/emx/src/lib/sys/b_fsSymlinkTimesSet.c	(revision 1972)
+++ /trunk/src/emx/src/lib/sys/b_fsSymlinkTimesSet.c	(revision 1972)
@@ -0,0 +1,62 @@
+/* $Id$ */
+/** @file
+ *
+ * LIBC SYS Backend - lutimes().
+ *
+ * Copyright (c) 2005 knut st. osmundsen <bird@anduin.net>
+ *
+ *
+ * This file is part of InnoTek LIBC.
+ *
+ * InnoTek LIBC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * InnoTek LIBC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with InnoTek LIBC; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+/*******************************************************************************
+*   Header Files                                                               *
+*******************************************************************************/
+#include "b_fs.h"
+#include <sys/stat.h>
+#include <InnoTekLIBC/backend.h>
+#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_FS
+#include <InnoTekLIBC/logstrict.h>
+
+
+/**
+ * Sets the file times of a symlink.
+ *
+ * @returns 0 on success.
+ * @returns Negative error code (errno.h) on failure.
+ * @param   pszPath The path to the file to set the mode of.
+ * @param   paTimes Two timevalue structures. If NULL the current time is used.
+ */
+int __libc_Back_fsSymlinkTimesSet(const char *pszPath, const struct timeval *paTimes)
+{
+    LIBCLOG_ENTER("pszPath=%p:{%s} paTimes=%p:{{.tv_sec=%ld, .tv_usec=%ld}, {.tv_sec=%ld, .tv_usec=%ld}}\n",
+                  (void *)pszPath, pszPath, (void *)paTimes,
+                  paTimes ? paTimes[0].tv_sec : ~0, paTimes ? paTimes[0].tv_usec : ~0,
+                  paTimes ? paTimes[1].tv_sec : ~0, paTimes ? paTimes[1].tv_usec : ~0);
+
+    /*
+     * Resolve the path.
+     */
+    char szNativePath[PATH_MAX];
+    int rc = __libc_back_fsResolve(pszPath, BACKFS_FLAGS_RESOLVE_FULL_SYMLINK | BACKFS_FLAGS_RESOLVE_DIR_MAYBE, szNativePath, NULL);
+    if (!rc)
+        rc = __libc_back_fsNativeFileTimesSet(szNativePath, paTimes);
+
+    LIBCLOG_RETURN_INT(rc);
+}
+
Index: /trunk/src/emx/src/lib/sys/b_time.c
===================================================================
--- /trunk/src/emx/src/lib/sys/b_time.c	(revision 1972)
+++ /trunk/src/emx/src/lib/sys/b_time.c	(revision 1972)
@@ -0,0 +1,63 @@
+/* $Id$ */
+/** @file
+ *
+ * LIBC SYS Backend - times helpers.
+ *
+ * Copyright (c) 2005 knut st. osmundsen <bird@anduin.net>
+ *
+ *
+ * This file is part of kBuild.
+ *
+ * kBuild is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * kBuild is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with kBuild; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+
+/*******************************************************************************
+*   Header Files                                                               *
+*******************************************************************************/
+#include "libc-alias.h"
+#define INCL_FSMACROS
+#include <os2emx.h>
+#include "b_time.h"
+#include <time.h>
+
+
+/**
+ * Converts local unix time to file time.
+ *
+ * @param   Time    Local unix time (secs).
+ * @param   pTime   Where to store the time.
+ * @param   pDate   Where to store the date.
+ */
+void __libc_back_timeUnix2FileTime(time_t Time, PFTIME pTime, PFDATE pDate)
+{
+    struct tm Tm;
+    gmtime_r(&Time, &Tm);
+#if 0                                   /* This didn't work in GCC versions <= 2.4 */
+    time->twosecs   = Tm.tm_sec / 2;
+    time->minutes   = Tm.tm_min;
+    time->hours     = Tm.tm_hour;
+    date->day       = Tm.tm_mday;
+    date->month     = Tm.tm_mon + 1;
+    date->year      = Tm.tm_year - 1980 + 1900;
+#else
+    USHORT us = (Tm.tm_sec / 2) + (Tm.tm_min << 5) + (Tm.tm_hour << 11);
+    *(PUSHORT)pTime = us;
+    us = Tm.tm_mday + ((Tm.tm_mon + 1) << 5) + ((Tm.tm_year - 80) << 9);
+    *(PUSHORT)pDate = us;
+#endif
+}
+
Index: /trunk/src/emx/src/lib/sys/b_time.h
===================================================================
--- /trunk/src/emx/src/lib/sys/b_time.h	(revision 1972)
+++ /trunk/src/emx/src/lib/sys/b_time.h	(revision 1972)
@@ -0,0 +1,41 @@
+/* $Id$ */
+/** @file
+ *
+ * LIBC SYS Backend - time helpers.
+ *
+ * Copyright (c) 2005 knut st. osmundsen <bird@anduin.net>
+ *
+ *
+ * This file is part of kBuild.
+ *
+ * kBuild is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * kBuild is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with kBuild; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifndef __b_time_h__
+#define __b_time_h__
+
+#include <time.h>
+
+/**
+ * Converts local unix time to file time.
+ *
+ * @param   Time    Local unix time (secs).
+ * @param   pTime   Where to store the time.
+ * @param   pDate   Where to store the date.
+ */
+void __libc_back_timeUnix2FileTime(time_t Time, PFTIME pTime, PFDATE pDate);
+
+#endif
