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

Re: Comments on xerces-c patch please



On Sat, 2011-08-06 at 00:46 +0200, Jeremie Koenig wrote:
> On Thu, Aug 04, 2011 at 07:10:59PM +0200, Guillem Jover wrote:
> > I guess I was not clear enough, here what we want to check for is if
> > “realpath(path, NULL)” works correctly (notice the NULL argument),
> > before POSIX.1-2008 (and newer GNU/* and FreeBSD systems) this was
> > undefined behaviour, so even if the system has realpath() it might
> > not have what we want from it.
> 
> I'd like to suggest an alternative approach would be to test against
> PATH_MAX itself (eg, #ifndef PATH_MAX). Arguably a system which provides
> neither PATH_MAX not a POSIX.1-2008 realpath() is broken anyway.

Maybe checking against PATH_MAX is a better idea as I did in the (in
this case needless) wget patch proposal sent earlier to the ML. Do you
propose to use the same test for getcwd part as well?

> On Fri, Aug 05, 2011 at 10:38:05AM +0200, Andrea Bolognani wrote:
> > I think Guillem did the right thing here: he explained you exactly why
> > your patch is not ready for submission yet, and how you can make it so.
> 
> (Agreed.)

Yes, he pointed out som minor changes needed to comply with the current
coding standard, that is appreciated. However, no constructive
suggestions were given on what to test against, and no code changes
were proposed. And the web pages does not give any _clear_ hints
either, which code constructs to use for PATH_MAX issues, etc.

So in conclusion: Can we agree that tests can be based on PATH_MAX
existence or not, and skip __GNU__, __GLIBC__ etc constructs? If not I
would very much appreciate somebody writing clear _code_ (not verbal)
examples and publish them to follow when patching non-building
packages. 



Reply to: