[rrd-developers] [PATCH] Solve PATH_MAX issues in rrd_graph.{c, h} and rrd_tool.c
Tobias Oetiker
tobi at oetiker.ch
Fri Aug 16 11:15:47 CEST 2013
Hi Svante,
Today Svante Signell wrote:
> On Fri, 2013-08-16 at 09:08 +0200, Tobias Oetiker wrote:
> > Hi Svante,
> >
> > Yesterday Svante Signell wrote:
> >
> > > Hello,
> > >
> > > Attached is an updated Debian patch for 1.4.7-2, from 2009, to avoid
> > > PATH_MAX problems for GNU/Hurd in rrd_graph.{c,h} and rrd_tool.c. This
> > > patch is conditioned on if MAXPATH (and __GLIBC__) is defined or not.
> > >
> > > I would suggest to avoid PATH_MAX (MAXPATH) if possible to maximize
> > > portability and reduce code cluttering. Depending on your decision, the
> > > rest of my patches will be conditioned on PATH_MAX or not (there are
> > > also a number of other Debian patches pending).
> >
> > that patch looks pretty neat I think ...
> >
> > would you integrate it in your upcoming patch ?
>
> So you wan one megapatch for PATH_MAX/MAXPATH issues? Isn't it better to
> create smaller patches that can easily be reverted if something goes
> wrong?
many small patches are fine ... I was just asking, whether you were
plannig to build on this patch
>
> Another issue is if code should be #ifdef-ed or unconditional, e.g.
> using
> #ifdef MAX_PATH or
> #ifndef MAX_PATH
> ...
> #else
> ...
> #endif
> or completely removing the PATH_MAX (MAXPATH) dependency. What about the
> Win32 port? I haven't looked into that.
well, if there IS a limit to the path length by the OS, the code
should observe it I think, or how would you deal with this ?
cheers
tobi
> Thanks,
> Svante
>
>
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900
More information about the rrd-developers
mailing list