Re: [bug #30065] MAXPATHLEN breaks builds on GNU/Hurd
Francis Russell <[email protected]>
| Newsgroups | gmane.comp.version-control.monotone.devel |
|---|---|
| Message-ID | <[email protected]> |
On 28.03.2012 14:55, Richard Levitte wrote:
> francis> To be honest, I think the big scary warning put me off more
> than the
> francis> patch itself. Although I do note that the patch appears to
> use variable
> francis> length stack allocated arrays which aren't valid in C++.
>
> Huh??? I thought that was one pretty big difference between C and
> C++... Maybe I'm mixing that up with GNUified C/C++...
Now you're confusing me :p
C/C++/C++0x - Stack allocated arrays are fixed length.
C99 - Supports variable length stack allocated arrays.
Though I've noticed g++ will accept them if warnings aren't enabled. I
wouldn't trust them even in C99 though, according to the GCC C99 status
pages, variable length arrays were only properly implemented in GCC4.5
although it happily accepted the syntax in earlier versions.
> I like your implementation, I say do it.
> I dunno if what you say means you want to intermix src/netxx with
> src/{unix/win32}... I'd say don't, netxx is basically some bundled
> source package, and I believe it should stay as independent as
> possible, and just be used by monotone until something else replaces
> it (someone mentioned libevent). However, if you want to implement
> the same thing in src/{unix,win32}/fs.cc, I say try it :-)
Ah, so I haven't studied the monotone source that much. I didn't
realise that netxx was bundled. I simply searched for other uses of
getcwd and found them in src/{unix,win32} as well. It really only makes
sense to commit that implementation if something's actually going to use
it and I thought it might be the src/{unix,win32} code. I just didn't
like the Hurd fix resulting in such a large warning about untested code.
Once monotone builds under Hurd, I believe that there are a number of
unit test failures that occur anyway which will require more effort to
fix anyway.
Francis