Sat Jan 21 20:05:27 2012 UTC ()
Always redefine DEV_BSIZE=512.
All references of DEV_BSIZE in tools are to manipulate target
(i.e. NetBSD's) file images (in installboot(8) and makefs(8) etc.) and
no host's DEV_BSIZE is required for the moment.  Closes PR toolchain/42574.


(tsutsui)
diff -r1.82 -r1.83 src/tools/compat/compat_defs.h

cvs diff -r1.82 -r1.83 src/tools/compat/compat_defs.h (expand / switch to unified diff)

--- src/tools/compat/compat_defs.h 2011/11/03 14:13:53 1.82
+++ src/tools/compat/compat_defs.h 2012/01/21 20:05:27 1.83
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: compat_defs.h,v 1.82 2011/11/03 14:13:53 joerg Exp $ */ 1/* $NetBSD: compat_defs.h,v 1.83 2012/01/21 20:05:27 tsutsui Exp $ */
2 2
3#ifndef __NETBSD_COMPAT_DEFS_H__ 3#ifndef __NETBSD_COMPAT_DEFS_H__
4#define __NETBSD_COMPAT_DEFS_H__ 4#define __NETBSD_COMPAT_DEFS_H__
5 5
6 6
7/* Work around some complete brain damage. */ 7/* Work around some complete brain damage. */
8/* 8/*
9 * Linux: <features.h> turns on _POSIX_SOURCE by default, even though the 9 * Linux: <features.h> turns on _POSIX_SOURCE by default, even though the
10 * program (not the OS) should do that. Preload <features.h> to keep any 10 * program (not the OS) should do that. Preload <features.h> to keep any
11 * of this crap from being pulled in, and undefine _POSIX_SOURCE. 11 * of this crap from being pulled in, and undefine _POSIX_SOURCE.
12 */ 12 */
13 13
14#if defined(__linux__) && HAVE_FEATURES_H 14#if defined(__linux__) && HAVE_FEATURES_H
@@ -1042,29 +1042,29 @@ __GEN_ENDIAN_DEC(64, le) @@ -1042,29 +1042,29 @@ __GEN_ENDIAN_DEC(64, le)
1042#undef LITTLE_ENDIAN 1042#undef LITTLE_ENDIAN
1043#undef PDP_ENDIAN 1043#undef PDP_ENDIAN
1044#define BIG_ENDIAN 4321 1044#define BIG_ENDIAN 4321
1045#define LITTLE_ENDIAN 1234 1045#define LITTLE_ENDIAN 1234
1046#define PDP_ENDIAN 3412 1046#define PDP_ENDIAN 3412
1047 1047
1048#undef BYTE_ORDER 1048#undef BYTE_ORDER
1049#if WORDS_BIGENDIAN 1049#if WORDS_BIGENDIAN
1050#define BYTE_ORDER BIG_ENDIAN 1050#define BYTE_ORDER BIG_ENDIAN
1051#else 1051#else
1052#define BYTE_ORDER LITTLE_ENDIAN 1052#define BYTE_ORDER LITTLE_ENDIAN
1053#endif 1053#endif
1054 1054
1055#ifndef DEV_BSIZE 1055/* all references of DEV_BSIZE in tools are for NetBSD's file images */
 1056#undef DEV_BSIZE
1056#define DEV_BSIZE (1 << 9) 1057#define DEV_BSIZE (1 << 9)
1057#endif 
1058 1058
1059#undef MIN 1059#undef MIN
1060#undef MAX 1060#undef MAX
1061#define MIN(a,b) ((a) < (b) ? (a) : (b)) 1061#define MIN(a,b) ((a) < (b) ? (a) : (b))
1062#define MAX(a,b) ((a) > (b) ? (a) : (b)) 1062#define MAX(a,b) ((a) > (b) ? (a) : (b))
1063 1063
1064#ifndef MAXBSIZE 1064#ifndef MAXBSIZE
1065#define MAXBSIZE (64 * 1024) 1065#define MAXBSIZE (64 * 1024)
1066#endif 1066#endif
1067#ifndef MAXFRAG 1067#ifndef MAXFRAG
1068#define MAXFRAG 8 1068#define MAXFRAG 8
1069#endif 1069#endif
1070#ifndef MAXPHYS 1070#ifndef MAXPHYS