sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: /* sl@0: * Copyright (c) 1999-2004 Damien Miller sl@0: * sl@0: * Permission to use, copy, modify, and distribute this software for any sl@0: * purpose with or without fee is hereby granted, provided that the above sl@0: * copyright notice and this permission notice appear in all copies. sl@0: * sl@0: * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES sl@0: * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF sl@0: * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR sl@0: * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES sl@0: * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN sl@0: * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF sl@0: * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. sl@0: * * Portions Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. sl@0: */ sl@0: sl@0: sl@0: //#ifndef HAVE_UTIMES sl@0: sl@0: EXPORT_C int utimes(const char *filename, const struct timeval *tvp) sl@0: { sl@0: struct utimbuf ub ; sl@0: sl@0: if(!tvp) //NULL CHECK sl@0: { sl@0: return utime(filename ,(struct utimbuf *) tvp) ; sl@0: } sl@0: sl@0: sl@0: ub.actime = tvp[0].tv_sec; sl@0: ub.modtime = tvp[1].tv_sec; sl@0: sl@0: return (utime(filename, &ub)); sl@0: }//#endif