[rrd-developers] [PATCH] Solve PATH_MAX issues in rrd_graph.{c, h} and rrd_tool.c
Svante Signell
svante.signell at gmail.com
Fri Aug 16 13:23:03 CEST 2013
On Fri, 2013-08-16 at 11:15 +0200, Tobias Oetiker wrote:
> Hi Svante,
>
> Today Svante Signell wrote:
>
> > On Fri, 2013-08-16 at 09:08 +0200, Tobias Oetiker wrote:
> > > Hi Svante,
> > >
> > 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
OK, I will continue next with rrd_client.c. Is that one built into the
library librrd*.so* ? Is there an easy way to test with valgrind, as
rrd_deamon.c is, issuing suitable commands?
One issue with rrd_client:get_path is the const definitions. In order to
free the dynamically allocated strings, to avoid memory leaks const has
to be abandoned in some places. OK?
> > 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 ?
What about removing the #ifdef MAXPATH construct from the patch? By
dynamically allocating strings the only limitation is by malloc. That
should work also for win32?
thanks,
Svante
More information about the rrd-developers
mailing list