summaryrefslogtreecommitdiffstats
path: root/bin/ls
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2010-03-28 13:16:08 +0000
committered <ed@FreeBSD.org>2010-03-28 13:16:08 +0000
commit543b5e901b744468356547ee61975d9d44fa8f32 (patch)
tree5c6d55680c37f3cbfd9460fbab60d39b1ecb8ae7 /bin/ls
parent4f08ecd7ed8b39a0e0cd094967835fa85d105793 (diff)
downloadFreeBSD-src-543b5e901b744468356547ee61975d9d44fa8f32.zip
FreeBSD-src-543b5e901b744468356547ee61975d9d44fa8f32.tar.gz
Change all our own code to use st_*tim instead of st_*timespec.
Also remove some local patches to diff(1) which are now unneeded.
Diffstat (limited to 'bin/ls')
-rw-r--r--bin/ls/cmp.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/bin/ls/cmp.c b/bin/ls/cmp.c
index badd108..84fb038 100644
--- a/bin/ls/cmp.c
+++ b/bin/ls/cmp.c
@@ -66,17 +66,17 @@ int
modcmp(const FTSENT *a, const FTSENT *b)
{
- if (b->fts_statp->st_mtimespec.tv_sec >
- a->fts_statp->st_mtimespec.tv_sec)
+ if (b->fts_statp->st_mtim.tv_sec >
+ a->fts_statp->st_mtim.tv_sec)
return (1);
- if (b->fts_statp->st_mtimespec.tv_sec <
- a->fts_statp->st_mtimespec.tv_sec)
+ if (b->fts_statp->st_mtim.tv_sec <
+ a->fts_statp->st_mtim.tv_sec)
return (-1);
- if (b->fts_statp->st_mtimespec.tv_nsec >
- a->fts_statp->st_mtimespec.tv_nsec)
+ if (b->fts_statp->st_mtim.tv_nsec >
+ a->fts_statp->st_mtim.tv_nsec)
return (1);
- if (b->fts_statp->st_mtimespec.tv_nsec <
- a->fts_statp->st_mtimespec.tv_nsec)
+ if (b->fts_statp->st_mtim.tv_nsec <
+ a->fts_statp->st_mtim.tv_nsec)
return (-1);
return (strcoll(a->fts_name, b->fts_name));
}
@@ -92,17 +92,17 @@ int
acccmp(const FTSENT *a, const FTSENT *b)
{
- if (b->fts_statp->st_atimespec.tv_sec >
- a->fts_statp->st_atimespec.tv_sec)
+ if (b->fts_statp->st_atim.tv_sec >
+ a->fts_statp->st_atim.tv_sec)
return (1);
- if (b->fts_statp->st_atimespec.tv_sec <
- a->fts_statp->st_atimespec.tv_sec)
+ if (b->fts_statp->st_atim.tv_sec <
+ a->fts_statp->st_atim.tv_sec)
return (-1);
- if (b->fts_statp->st_atimespec.tv_nsec >
- a->fts_statp->st_atimespec.tv_nsec)
+ if (b->fts_statp->st_atim.tv_nsec >
+ a->fts_statp->st_atim.tv_nsec)
return (1);
- if (b->fts_statp->st_atimespec.tv_nsec <
- a->fts_statp->st_atimespec.tv_nsec)
+ if (b->fts_statp->st_atim.tv_nsec <
+ a->fts_statp->st_atim.tv_nsec)
return (-1);
return (strcoll(a->fts_name, b->fts_name));
}
@@ -118,17 +118,17 @@ int
birthcmp(const FTSENT *a, const FTSENT *b)
{
- if (b->fts_statp->st_birthtimespec.tv_sec >
- a->fts_statp->st_birthtimespec.tv_sec)
+ if (b->fts_statp->st_birthtim.tv_sec >
+ a->fts_statp->st_birthtim.tv_sec)
return (1);
- if (b->fts_statp->st_birthtimespec.tv_sec <
- a->fts_statp->st_birthtimespec.tv_sec)
+ if (b->fts_statp->st_birthtim.tv_sec <
+ a->fts_statp->st_birthtim.tv_sec)
return (-1);
- if (b->fts_statp->st_birthtimespec.tv_nsec >
- a->fts_statp->st_birthtimespec.tv_nsec)
+ if (b->fts_statp->st_birthtim.tv_nsec >
+ a->fts_statp->st_birthtim.tv_nsec)
return (1);
- if (b->fts_statp->st_birthtimespec.tv_nsec <
- a->fts_statp->st_birthtimespec.tv_nsec)
+ if (b->fts_statp->st_birthtim.tv_nsec <
+ a->fts_statp->st_birthtim.tv_nsec)
return (-1);
return (strcoll(a->fts_name, b->fts_name));
}
@@ -144,17 +144,17 @@ int
statcmp(const FTSENT *a, const FTSENT *b)
{
- if (b->fts_statp->st_ctimespec.tv_sec >
- a->fts_statp->st_ctimespec.tv_sec)
+ if (b->fts_statp->st_ctim.tv_sec >
+ a->fts_statp->st_ctim.tv_sec)
return (1);
- if (b->fts_statp->st_ctimespec.tv_sec <
- a->fts_statp->st_ctimespec.tv_sec)
+ if (b->fts_statp->st_ctim.tv_sec <
+ a->fts_statp->st_ctim.tv_sec)
return (-1);
- if (b->fts_statp->st_ctimespec.tv_nsec >
- a->fts_statp->st_ctimespec.tv_nsec)
+ if (b->fts_statp->st_ctim.tv_nsec >
+ a->fts_statp->st_ctim.tv_nsec)
return (1);
- if (b->fts_statp->st_ctimespec.tv_nsec <
- a->fts_statp->st_ctimespec.tv_nsec)
+ if (b->fts_statp->st_ctim.tv_nsec <
+ a->fts_statp->st_ctim.tv_nsec)
return (-1);
return (strcoll(a->fts_name, b->fts_name));
}
OpenPOWER on IntegriCloud