[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH 2/6] daemon: Missing #includes revealed by cross-compiling.



On Fri, Nov 20, 2009 at 12:39:49PM +0100, Jim Meyering wrote:
> Richard W.M. Jones wrote:
> > On Fri, Nov 20, 2009 at 12:25:13PM +0100, Jim Meyering wrote:
> >> Richard W.M. Jones wrote:
> >> > Subject: [PATCH 2/6] daemon: Missing #includes revealed by cross-compiling.
> >>
> >> Looks fine and obviously safe.
> >> What symbols?
> >
> > The two problems fixed by this are that PATH_MAX requires <limits.h>
> > (on Win32 anyhow), and that various str* and mem* functions were being
> > used without including <string.h> (probably works because this is
> > implicitly included from another header file).
> 
> Did you know that PATH_MAX may not be defined at all?
> Or it may be defined to something outrageously large?
> That's why coding style guidelines often suggest to avoid it altogether.

Sure, but in the cases we care about, it is defined and not
outrageously large.  4096 on Linux, 256(!) on Windows.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]