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

[FDclone-users:00868] NetBSD 5.0.2でコンパイルエラー



とよたです。

リリースして間もなくで、申し訳ないのですが、
NetBSD 5.0.2 (+  gcc 4.1.3) 環境でコンパイルエラーに
なってしまいます。

[toyota@mustafar]% make
〜snip〜
cc -DNETBSD=1 -O -Wno-attributes    -DFD=3 -c -o dosdisk.o dosdisk.c
In file included from dosdisk.c:42:
/usr/include/sys/disklabel.h:357:1: error: pasting "FS_" and "(" does
not give a valid preprocessing token
In file included from dosdisk.c:42:
/usr/include/sys/disklabel.h:357: error: expected ',' or '}' before '(' token
*** Error code 1

Stop.
make: stopped in /tmp/fdclone/FD-3.00h
*** Error code 1

Stop.
make: stopped in /tmp/fdclone/FD-3.00h

どうやら、sys/disklabel.h で宣言されている
MSDOS がぶつかっているようです。

322  /*
323   * Partition type names, numbers, label-names, fsck prog, and mount prog
324   */
325  #define FSTYPE_DEFN(x) \
326  x(UNUSED,   0, "unused",     NULL,    NULL)   /* unused */ \
327  x(SWAP,     1, "swap",       NULL,    NULL)   /* swap */ \
328  x(V6,       2, "Version 6",  NULL,    NULL)   /* Sixth Edition */ \
329  x(V7,       3, "Version 7",  NULL,    NULL)   /* Seventh Edition */ \
330  x(SYSV,     4, "System V",   NULL,    NULL)   /* System V */ \
331  x(V71K,     5, "4.1BSD",     NULL,    NULL)   /* V7, 1K blocks
(4.1, 2.9) */ \
332  x(V8,    6, "Eighth Edition",NULL,    NULL)   /* Eighth Edition,
4K blocks */ \
333  x(BSDFFS,   7, "4.2BSD",    "ffs",   "ffs")   /* 4.2BSD fast file
system */ \
334  x(MSDOS,    8, "MSDOS",     "msdos", "msdos") /* MSDOS file system */ \
335  x(BSDLFS,   9, "4.4LFS",    "lfs",   "lfs")   /* 4.4BSD
log-structured FS */ \
336  x(OTHER,   10, "unknown",    NULL,    NULL)   /* in use,
unknown/unsupported */\
337  x(HPFS,    11, "HPFS",       NULL,    NULL)   /* OS/2
high-performance FS */ \
338  x(ISO9660, 12, "ISO9660",    NULL,   "cd9660")/* ISO 9660,
normally CD-ROM */ \
339  x(BOOT,    13, "boot",       NULL,    NULL)   /* bootstrap code
in partition */\
340  x(ADOS,    14, "ADOS",       NULL,   "ados")  /* AmigaDOS fast
file system */ \
341  x(HFS,     15, "HFS",        NULL,    NULL)   /* Macintosh HFS */ \
342  x(FILECORE,16, "FILECORE",   NULL, "filecore")/* Acorn Filecore FS */ \
343  x(EX2FS,   17, "Linux Ext2","ext2fs","ext2fs")/* Linux Extended 2 FS */ \
344  x(NTFS,    18, "NTFS",       NULL,   "ntfs")  /* Windows/NT file
system */ \
345  x(RAID,    19, "RAID",       NULL,    NULL)   /* RAIDframe component */ \
346  x(CCD,     20, "ccd",        NULL,    NULL)   /* concatenated
disk component */\
347  x(JFS2,    21, "jfs",        NULL,    NULL)   /* IBM JFS2 */ \
348  x(APPLEUFS,22, "Apple UFS", "ffs",   "ffs")   /* Apple UFS */ \
349  /* XXX this is not the same as FreeBSD.  How to solve? */ \
350  x(VINUM,   23, "vinum",      NULL,    NULL)   /* Vinum */ \
351  x(UDF,     24, "UDF",        NULL,   "udf")  /* UDF */ \
352  x(SYSVBFS, 25, "SysVBFS",    NULL,  "sysvbfs")/* System V boot
file system */ \
353  x(EFS,     26, "EFS",        NULL,   "efs")   /* SGI's Extent Filesystem */
354
355  #ifndef _LOCORE
356  #define FS_TYPENUMS(tag, number, name, fsck, mount)
__CONCAT(FS_,tag=number),
357  enum { FSTYPE_DEFN(FS_TYPENUMS) FSMAXTYPES };
358  #undef  FS_TYPENUMS
359  #endif

334行目を削除してみたら、コンパイルは通るように
なりました。
MSDOS の宣言が絡むと根が深そうで、他に良い
解決法が見つからなかったです。。。

-- 
とよた