Remove all the "#ifdef __APPLE__" code, to make this actually

build again on Darwin. The code in question is outdated.

OK'd by Wilfredo Sanchez wsanchez@MIT.EDU.
This commit is contained in:
hubertf 2001-02-20 19:45:51 +00:00
parent 7478bd5e34
commit 1156c833f6
3 changed files with 7 additions and 27 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: create.c,v 1.27 2000/10/15 12:27:25 is Exp $ */
/* $NetBSD: create.c,v 1.28 2001/02/20 19:45:51 hubertf Exp $ */
/*-
* Copyright (c) 1989, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: create.c,v 1.27 2000/10/15 12:27:25 is Exp $");
__RCSID("$NetBSD: create.c,v 1.28 2001/02/20 19:45:51 hubertf Exp $");
#endif
#endif /* not lint */
@ -171,21 +171,14 @@ statf(p)
output(&indent, "nlink=%u", p->fts_statp->st_nlink);
if (keys & F_SIZE && S_ISREG(p->fts_statp->st_mode))
output(&indent, "size=%lld", (long long)p->fts_statp->st_size);
#ifndef __APPLE__
# ifdef BSD4_4
#ifdef BSD4_4
if (keys & F_TIME)
output(&indent, "time=%ld.%ld",
(long)p->fts_statp->st_mtimespec.tv_sec,
p->fts_statp->st_mtimespec.tv_nsec);
# else
#else
output(&indent, "time=%ld.%ld",
p->fts_statp->st_mtime, 0);
# endif
#else
if (keys & F_TIME)
output(&indent, "time=%ld.%ld",
p->fts_statp->st_mtimespec.ts_sec,
p->fts_statp->st_mtimespec.ts_nsec);
#endif
if (keys & F_CKSUM && S_ISREG(p->fts_statp->st_mode)) {
if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0 ||

View File

@ -1,4 +1,4 @@
/* $NetBSD: extern.h,v 1.8 2000/10/11 20:23:54 is Exp $ */
/* $NetBSD: extern.h,v 1.9 2001/02/20 19:45:51 hubertf Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -37,10 +37,6 @@
#include "mtree.h"
#ifdef __APPLE__
#include <fts.h>
#endif
int compare __P((char *, NODE *, FTSENT *));
int crc __P((int, u_int32_t *, u_int32_t *));
void cwalk __P((void));

View File

@ -1,4 +1,4 @@
/* $NetBSD: spec.c,v 1.19 2000/10/10 14:30:41 enami Exp $ */
/* $NetBSD: spec.c,v 1.20 2001/02/20 19:45:51 hubertf Exp $ */
/*-
* Copyright (c) 1989, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)spec.c 8.2 (Berkeley) 4/28/95";
#else
__RCSID("$NetBSD: spec.c,v 1.19 2000/10/10 14:30:41 enami Exp $");
__RCSID("$NetBSD: spec.c,v 1.20 2001/02/20 19:45:51 hubertf Exp $");
#endif
#endif /* not lint */
@ -242,21 +242,12 @@ set(t, ip)
mtree_err("memory allocation error");
break;
case F_TIME:
#ifndef __APPLE__
ip->st_mtimespec.tv_sec =
(time_t)strtoul(val, &ep, 10);
#else
ip->st_mtimespec.ts_sec =
(time_t)strtoul(val, &ep, 10);
#endif
if (*ep != '.')
mtree_err("invalid time %s", val);
val = ep + 1;
#ifndef __APPLE__
ip->st_mtimespec.tv_nsec = strtol(val, &ep, 10);
#else
ip->st_mtimespec.ts_nsec = strtol(val, &ep, 10);
#endif
if (*ep)
mtree_err("invalid time %s", val);
break;