[parted-devel] porting to FreeBSD
Debarshi 'Rishi' Ray
debarshi.ray at gmail.com
Tue Mar 6 19:38:39 CET 2007
> 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
More information about the parted-devel
mailing list