rcp tries to set the millisecond argument, which might be significant
some day....
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3989
dc483132-0cff-0310-8789-
dd5450dbe970
+Fri Jul 15 15:03:11 1994 Theodore Y. Ts'o (tytso at tsx-11)
+
+ * krcp.c: add utimes() emulation for systems that only have the
+ POSIX utime() call.
+
Mon Jun 27 22:03:48 1994 Theodore Y. Ts'o (tytso at tsx-11)
* krlogind.c: remove spurious debugging #undef of KRB5_KRB4_COMPAT
AC_SET_BUILDTOP
AC_HAVE_LIBRARY(socket)
AC_HAVE_LIBRARY(nsl)
+AC_FUNC_CHECK(utimes,AC_DEFINE(HAS_UTIMES))
KRB_INCLUDE
WITH_KRB5ROOT
WITH_KRB4
}
+#if !defined(HAS_UTIMES)
+#include <utime.h>
+#include <sys/time.h>
+
+/*
+ * We emulate utimes() instead of utime() as necessary because
+ * utimes() is more powerful than utime(), and rcp actually tries to
+ * set the microsecond values; we don't want to take away
+ * functionality unnecessarily.
+ */
+utimes(file, tvp)
+const char *file;
+struct timeval *tvp;
+{
+ struct utimbuf times;
+
+ times.actime = tvp[0].tv_sec;
+ times.modtime = tvp[1].tv_sec;
+ return(utime(file, ×));
+}
+#endif
+
sink(argc, argv)
int argc;