Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tools XXX...Complete hack for now.



details:   https://anonhg.NetBSD.org/src/rev/27d6508fda69
branches:  trunk
changeset: 517217:27d6508fda69
user:      jmc <jmc%NetBSD.org@localhost>
date:      Thu Nov 08 20:30:54 2001 +0000

description:
XXX...Complete hack for now.

Add a stub for RMD160File which prints out a warning and returns NULL.

This allows mtree to be built when hosting from a 1.5.x box.
The real solution is to convert the src/tools bits into clean portable tools
and not have them so NetBSD-current centric.

diffstat:

 tools/Makefile.host          |   4 +-
 tools/compat/compat_netbsd.h |   3 +-
 tools/compat/nb_rmd.c        |  56 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 60 insertions(+), 3 deletions(-)

diffs (94 lines):

diff -r f3890de645b4 -r 27d6508fda69 tools/Makefile.host
--- a/tools/Makefile.host       Thu Nov 08 20:21:07 2001 +0000
+++ b/tools/Makefile.host       Thu Nov 08 20:30:54 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.host,v 1.6 2001/10/25 02:02:46 thorpej Exp $
+#      $NetBSD: Makefile.host,v 1.7 2001/11/08 20:30:54 jmc Exp $
 
 # Preload <bsd.obj.mk> to set up obj rules (with proper ${.CURDIR}).
 .include <bsd.obj.mk>
@@ -27,7 +27,7 @@
                ${HOST_CPPFLAGS} ${CPPFLAGS}
 MKMAN=         no
 SRCS?=         ${PROG}.c
-SRCS+=         ${HOST_SRCS} nb_progname.c
+SRCS+=         ${HOST_SRCS} nb_progname.c nb_rmd.c
 TIMESTAMP?=    ${HOST_BINDIR}/${HOSTPROGNAME}
 .undef LINKS
 
diff -r f3890de645b4 -r 27d6508fda69 tools/compat/compat_netbsd.h
--- a/tools/compat/compat_netbsd.h      Thu Nov 08 20:21:07 2001 +0000
+++ b/tools/compat/compat_netbsd.h      Thu Nov 08 20:30:54 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_netbsd.h,v 1.1 2001/08/14 11:01:58 tv Exp $     */
+/*     $NetBSD: compat_netbsd.h,v 1.2 2001/11/08 20:30:55 jmc Exp $    */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -41,5 +41,6 @@
 
 extern void setprogname(const char *);
 extern const char *getprogname(void);
+extern char *RMD160File(char *, char *);
 
 #endif
diff -r f3890de645b4 -r 27d6508fda69 tools/compat/nb_rmd.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/compat/nb_rmd.c     Thu Nov 08 20:30:54 2001 +0000
@@ -0,0 +1,56 @@
+/*     $NetBSD: nb_rmd.c,v 1.1 2001/11/08 20:30:55 jmc Exp $ */
+
+/*-
+ * Copyright (c) 2001 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Todd Vierling.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *        This product includes software developed by the NetBSD
+ *        Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* Stub for RMD160File (just to link..this isn't needed for a build) */
+
+#ifdef __NetBSD__
+#include <sys/param.h>
+#if !defined(__NetBSD_Version__) || (__NetBSD_Version__ < 106000000)
+#undef __NetBSD__
+#endif
+#endif
+
+#ifndef __NetBSD__
+#include <stdio.h>
+
+char    *RMD160File(char *x, char *y)
+{
+       fprintf(stderr, "RMD160File not implemented...\n");
+       return NULL;
+}
+#endif



Home | Main Index | Thread Index | Old Index