Module Name:    src
Committed By:   tsutsui
Date:           Wed Mar 25 15:26:49 UTC 2009

Modified Files:
        src/distrib/cdrom/macppc_installboot: Makefile cd9660_util.c
            installboot.c installboot.h

Log Message:
Use nbcompat lib in src/tools/compat so that this can be built
on non-NetBSD hosts.  Tested on CYGWIN_NT-5.1-1.5.25-i686.

XXX: this should be merged into src/usr.sbin/installboot.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/distrib/cdrom/macppc_installboot/Makefile
cvs rdiff -u -r1.1 -r1.2 src/distrib/cdrom/macppc_installboot/cd9660_util.c
cvs rdiff -u -r1.3 -r1.4 src/distrib/cdrom/macppc_installboot/installboot.c
cvs rdiff -u -r1.2 -r1.3 src/distrib/cdrom/macppc_installboot/installboot.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/cdrom/macppc_installboot/Makefile
diff -u src/distrib/cdrom/macppc_installboot/Makefile:1.7 src/distrib/cdrom/macppc_installboot/Makefile:1.8
--- src/distrib/cdrom/macppc_installboot/Makefile:1.7	Sun Oct 15 04:24:11 2006
+++ src/distrib/cdrom/macppc_installboot/Makefile	Wed Mar 25 15:26:49 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2006/10/15 04:24:11 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.8 2009/03/25 15:26:49 tsutsui Exp $
 
 HOSTPROG=	macppc_installboot
 SRCS=		installboot.c cd9660.c cd9660_util.c
@@ -12,8 +12,8 @@
 	-rm -rf fs
 	${HOST_INSTALL_DIR} fs
 	${HOST_INSTALL_DIR} fs/cd9660
-	${HOST_INSTALL_FILE} ${NETBSDSRCDIR}/sys/fs/unicode.h fs
-	${HOST_INSTALL_FILE} ${NETBSDSRCDIR}/sys/fs/cd9660/iso.h fs/cd9660
+	${HOST_LN} -s ${NETBSDSRCDIR}/sys/fs/unicode.h fs
+	${HOST_LN} -s ${NETBSDSRCDIR}/sys/fs/cd9660/iso.h fs/cd9660
 .endif
 
 cleandir distclean: cleaninc
@@ -21,4 +21,12 @@
 cleaninc:
 	-rm -rf fs
 
+.include <bsd.own.mk>
+
+.ifndef NOCOMPATLIB
+COMPATOBJ!=	cd ${NETBSDSRCDIR}/tools/compat && ${PRINTOBJDIR}
+.-include	"${COMPATOBJ}/defs.mk"
+HOST_CPPFLAGS+=	-I${NETBSDSRCDIR}/tools/compat
+.endif
+
 .include <bsd.hostprog.mk>

Index: src/distrib/cdrom/macppc_installboot/cd9660_util.c
diff -u src/distrib/cdrom/macppc_installboot/cd9660_util.c:1.1 src/distrib/cdrom/macppc_installboot/cd9660_util.c:1.2
--- src/distrib/cdrom/macppc_installboot/cd9660_util.c:1.1	Sun Sep 17 03:56:03 2006
+++ src/distrib/cdrom/macppc_installboot/cd9660_util.c	Wed Mar 25 15:26:49 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cd9660_util.c,v 1.1 2006/09/17 03:56:03 tsutsui Exp $	*/
+/*	$NetBSD: cd9660_util.c,v 1.2 2009/03/25 15:26:49 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1994
@@ -38,6 +38,9 @@
 
 /* from NetBSD: cd9660_util.c,v 1.5 2004/12/28 01:12:26 jdolecek Exp */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
 
 #include <assert.h>
 #include <sys/param.h>

Index: src/distrib/cdrom/macppc_installboot/installboot.c
diff -u src/distrib/cdrom/macppc_installboot/installboot.c:1.3 src/distrib/cdrom/macppc_installboot/installboot.c:1.4
--- src/distrib/cdrom/macppc_installboot/installboot.c:1.3	Wed May 14 13:29:27 2008
+++ src/distrib/cdrom/macppc_installboot/installboot.c	Wed Mar 25 15:26:49 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: installboot.c,v 1.3 2008/05/14 13:29:27 tsutsui Exp $	*/
+/*	$NetBSD: installboot.c,v 1.4 2009/03/25 15:26:49 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2005 Izumi Tsutsui.  All rights reserved.
@@ -24,6 +24,10 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <err.h>
 #include <fcntl.h>
 #include <stdio.h>

Index: src/distrib/cdrom/macppc_installboot/installboot.h
diff -u src/distrib/cdrom/macppc_installboot/installboot.h:1.2 src/distrib/cdrom/macppc_installboot/installboot.h:1.3
--- src/distrib/cdrom/macppc_installboot/installboot.h:1.2	Mon Apr 28 20:22:53 2008
+++ src/distrib/cdrom/macppc_installboot/installboot.h	Wed Mar 25 15:26:49 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: installboot.h,v 1.2 2008/04/28 20:22:53 martin Exp $	*/
+/*	$NetBSD: installboot.h,v 1.3 2009/03/25 15:26:49 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -43,6 +43,10 @@
 #include <sys/stat.h>
 #include <stdint.h>
 
+#ifndef MAXNAMLEN
+#define MAXNAMLEN	511
+#endif
+
 typedef enum {
 				/* flags from global options */
 	IB_VERBOSE =	1<<0,		/* verbose operation */

Reply via email to