[parted-devel] Parted on GNU Hurd based systems

Jim Meyering jim at meyering.net
Thu Mar 15 23:48:49 CET 2007


"Debarshi 'Rishi' Ray" <debarshi.ray at gmail.com> wrote:
...
> diff -urNp parted/configure.ac parted-build/configure.ac
> --- parted/configure.ac	2007-03-14 03:20:44.000000000 +0530
> +++ parted-build/configure.ac	2007-03-16 00:18:49.000000000 +0530
> @@ -433,6 +433,12 @@ AC_CHECK_HEADER([execinfo.h], [
>  	])
>  ])
>
> +dnl Checks for #defines.
> +compile_for_s390=no
> +AC_EGREP_CPP([__s390__], , compile_for_s390=yes)
> +AC_EGREP_CPP([__s390x__], , compile_for_s390=yes)
> +AM_CONDITIONAL([COMPILE_FOR_S390], [test "$compile_for_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 -urNp parted/include/parted/linux.h parted-build/include/parted/linux.h
> --- parted/include/parted/linux.h	2007-03-14 00:42:37.000000000 +0530
> +++ parted-build/include/parted/linux.h	2007-03-16 00:13:31.000000000 +0530
> @@ -23,6 +23,10 @@
>  #include <parted/parted.h>
>  #include <parted/device.h>
>
> +#if defined(__s390__) || defined(__s390x__)
> +#include <parted/fdasd.h>
> +#endif

The above is ok, but the parentheses are unnecessary,
and worth removing, imho.  I felt strongly enough about
that to add a rule in Makefile.maint for coreutils to ensure
that new ones don't creep back in.  Also, indent cpp directives
to reflect nesting.  This too can be checked automatically.
I used to use a program called cppi on a cvs commit hook.

#if defined __s390__ || defined __s390x__
# include <parted/fdasd.h>
#endif

The rest looks fine.



More information about the parted-devel mailing list