2) I have "#ifndef __FreeBSD__"-ed out all the si_code values that are
not present on FreeBSD. As was already said on the list changing this
to one #ifdef per value might be desirable.

There are some good news for you here. In the latest version of
parted/ui.c, which you can find in the 'master' branch, we have
defined a dummy value for each of these constants which are not
present. Here is a snippet.

#ifndef ILL_ILLOPC
#  define ILL_ILLOPC (INTMAX - 1)
#endif

#ifndef ILL_ILLOPN
#  define ILL_ILLOPN (INTMAX - 2)
#endif

This will remove the need for having #ifdef...#endif blocks inside the
switch...case structure.

Happy hacking,
Debarshi
--
GPG key ID: 63D4A5A7
Key server: pgp.mit.edu

_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Reply via email to