On Thu, Jun 14, 2007 at 05:26:39PM -0400, Mark Johnson wrote:
This patch has the includes need to build on Solaris.
I've been using ifdef linux & ifndef linux to distinguish
between solaris and linux at this point.
Looks ok aside from
+#ifndef __linux__
+#define NAME_MAX 14
+#endif
The #ifndef should test against NAME_MAX itself, rather than __linux__
Also, NAME_MAX is intended to be the maximum length of an unqualified
filename, so 14 characters is rather too small. 255 is what Linux has
it defined as, so I'd go for that unless Solaris has a different named
constant for maximum filename length ? I know BSD uses MAXNAMLEN,
but NAME_MAX is POSIX
I'm not sure what the preference is...
I don't think it really matters one way or the other when we're only
having to worry about a #ifdef choice between 2 platforms. If someone
ports libvirt to BSD then we can adapt to whichever results in smaller
code as needed.
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules:
http://search.cpan.org/~danberr/ -=|
|=- Projects:
http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|