summaryrefslogtreecommitdiff
path: root/usr.bin/touch
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>1993-08-07 04:50:32 +0000
committermycroft <mycroft@NetBSD.org>1993-08-07 04:50:32 +0000
commit616b65b6370f34d7fd4f86ea5da50908f0ec5142 (patch)
treed06d7900c86810f1b89cde3cbaac6371c3158838 /usr.bin/touch
parent1a8be6e1aafc358d37793d37d78615c6b3d53a35 (diff)
Add 4.4-specific code in `#ifdef notyet's.
Diffstat (limited to 'usr.bin/touch')
-rw-r--r--usr.bin/touch/touch.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/usr.bin/touch/touch.c b/usr.bin/touch/touch.c
index 54dbe36e9dc..c016fbd916b 100644
--- a/usr.bin/touch/touch.c
+++ b/usr.bin/touch/touch.c
@@ -39,7 +39,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)touch.c 5.5 (Berkeley) 3/7/93";*/
-static char rcsid[] = "$Id: touch.c,v 1.5 1993/08/01 18:04:42 mycroft Exp $";
+static char rcsid[] = "$Id: touch.c,v 1.6 1993/08/07 04:50:32 mycroft Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -61,8 +61,9 @@ void stime_arg2 __P((char *, int, struct timeval *));
void stime_file __P((char *, struct timeval *));
void usage __P((void));
-/*temporary we aren't 4.4 portability hack*/
+#ifndef notyet
#define TIMET_TO_TIMEVAL(timevalp, tp) (timevalp)->tv_sec = *(tp);
+#endif
int
main(argc, argv)
@@ -152,11 +153,17 @@ main(argc, argv)
continue;
if (!aflag)
-/* TIMESPEC_TO_TIMEVAL(&tv[0], &sb.st_atimespec);*/
+#ifdef notyet
+ TIMESPEC_TO_TIMEVAL(&tv[0], &sb.st_atimespec);
+#else
TIMET_TO_TIMEVAL(&tv[0], &sb.st_atime);
+#endif
if (!mflag)
-/* TIMESPEC_TO_TIMEVAL(&tv[1], &sb.st_mtimespec);*/
+#ifdef notyet
+ TIMESPEC_TO_TIMEVAL(&tv[1], &sb.st_mtimespec);
+#else
TIMET_TO_TIMEVAL(&tv[1], &sb.st_mtime);
+#endif
/* Try utimes(2). */
@@ -285,10 +292,16 @@ stime_file(fname, tvp)
if (stat(fname, &sb))
err(1, "%s", fname);
-/* TIMESPEC_TO_TIMEVAL(tvp, &sb.st_atimespec);*/
+#ifdef notyet
+ TIMESPEC_TO_TIMEVAL(tvp, &sb.st_atimespec);
+#else
TIMET_TO_TIMEVAL(tvp, &sb.st_atime);
-/* TIMESPEC_TO_TIMEVAL(tvp + 1, &sb.st_mtimespec);*/
+#endif
+#ifdef notyet
+ TIMESPEC_TO_TIMEVAL(tvp + 1, &sb.st_mtimespec);
+#else
TIMET_TO_TIMEVAL(tvp + 1, &sb.st_mtime);
+#endif
}
int