Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2-0]: src/usr.sbin/mtree Pull up revision 1.25 (requested by jmc ...
details: https://anonhg.NetBSD.org/src/rev/3b0d2ae97d72
branches: netbsd-2-0
changeset: 561535:3b0d2ae97d72
user: tron <tron%NetBSD.org@localhost>
date: Tue Jun 22 07:27:05 2004 +0000
description:
Pull up revision 1.25 (requested by jmc in ticket #527):
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
diffstat:
usr.sbin/mtree/misc.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (46 lines):
diff -r b763459fc52d -r 3b0d2ae97d72 usr.sbin/mtree/misc.c
--- a/usr.sbin/mtree/misc.c Tue Jun 22 07:26:45 2004 +0000
+++ b/usr.sbin/mtree/misc.c Tue Jun 22 07:27:05 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: misc.c,v 1.24 2003/08/07 11:25:35 agc Exp $ */
+/* $NetBSD: misc.c,v 1.24.2.1 2004/06/22 07:27:05 tron Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -31,9 +31,13 @@
* @(#)misc.c 8.1 (Berkeley) 6/6/93
*/
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: misc.c,v 1.24 2003/08/07 11:25:35 agc Exp $");
+__RCSID("$NetBSD: misc.c,v 1.24.2.1 2004/06/22 07:27:05 tron Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -244,8 +248,10 @@
return S_IFREG;
case F_LINK:
return S_IFLNK;
+#ifdef S_IFSOCK
case F_SOCK:
return S_IFSOCK;
+#endif
default:
printf("unknown type %d", type);
abort();
@@ -278,8 +284,10 @@
return ("file");
case S_IFLNK:
return ("link");
+#ifdef S_IFSOCK
case S_IFSOCK:
return ("socket");
+#endif
default:
return ("unknown");
}
Home |
Main Index |
Thread Index |
Old Index