> Do I have the green signal to remove fdasd support from Hurd for the time > being, as David suggested? I have checked that this particular problem is > solved by doing so?
Conditionalize the DASD support code (fdasd*, vtoc*) so it's Linux only. There will likely never be a need for DASD support on Hurd.
Please find the patch attached. I have basically checked for the existence of the __s390__ or the __s390x__ constants. If either of them are found, the DASD support code (dasd.c fdasd.c vtoc.c) is compiled. I am not sure whether AC_CHECK_FUNC is the correct way to do it or not? AC_CHECK_DEFINE (http://autoconf-archive.cryp.to/ax_check_define.html) seems to have become obsolete. Should I use AC_CHECK_DECL? This much is enough to get Parted to compile on Hurd. However should the DASD headers (fdasd.h and vtoc.h) in include/parted be also conditionalized? I did not do it, since libparted/arch/linux.c is them #included. Comments? Happy hacking, Debarshi -- GPG key ID: 63D4A5A7 Key server: pgp.mit.edu
diff --git a/configure.ac b/configure.ac index d00fb15..2db260b 100644 --- a/configure.ac +++ b/configure.ac @@ -433,6 +433,12 @@ AC_CHECK_HEADER([execinfo.h], [ ]) ]) +dnl Checks for #defines. +have_s390=no +AC_CHECK_FUNC([__s390__], have_s390=yes, ) +AC_CHECK_FUNC([__s390x__], have_s390=yes, ) +AM_CONDITIONAL([HAVE_S390], [test "$have_s390" = yes]) + dnl check for "check", unit testing library/header PKG_CHECK_MODULES([CHECK], [check >= 0.9.3], have_check=yes, have_check=no) if test "$have_check" != "yes"; then diff --git a/include/parted/Makefile.am b/include/parted/Makefile.am diff --git a/libparted/labels/Makefile.am b/libparted/labels/Makefile.am index 5b0aec4..437f163 100644 --- a/libparted/labels/Makefile.am +++ b/libparted/labels/Makefile.am @@ -3,14 +3,18 @@ # # This file may be modified and/or distributed without restriction. +if HAVE_S390 +S390_SOURCES = dasd.c fdasd.c vtoc.c +else +S390_SOURCES = +endif + partedincludedir = -I$(top_srcdir)/include noinst_LTLIBRARIES = liblabels.la liblabels_la_SOURCES = rdb.c \ bsd.c \ - dasd.c \ - fdasd.c \ - vtoc.c \ + $(S390_SOURCES) \ efi_crc32.c \ dos.c \ dvh.h \
_______________________________________________ parted-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/parted-devel

