FTBFS on Hurd

Lubomir I. Ivanov neolit123 at gmail.com
Wed Aug 27 04:12:41 PDT 2014


On 27 August 2014 12:38, Salvo Tomaselli <tiposchi at tiscali.it> wrote:
> Hello,
>
> subsurface FTBFS on hurd because it uses PATH_MAX, which is not defined there
> (on purpose, they didn't forget it).
>
> https://www.gnu.org/software/hurd/community/gsoc/project_ideas/maxpath.html
>

for the Win32 API and NTFS MAX_PATH actually makes sense, for POSIX
PATH_MAX from limits.h, not so much.
to what exact area of subsurface are you referring to - is it
subsurfacewebservices.cpp by any chance?

> The easy fix would be to just #define it, but I'd like to avoid that.
>
> I'd like to provide a good™ patch for it, that uses malloc. However I'd either
> have to use strlen or try with a smallish buffer and realloc if it isn't
> sufficient.
>
> I'd rather go with the realloc, because anyway it would happen extremely
> infrequently, if the buffer starts with a large enough value.
>
> In both cases anyway, the resulting code would be a bit more complicated, but
> I still think it'd be better this way.
>
> Comments?
>
> If not I'll send a patch using realloc today or tomorrow.
>

anything past 259 bytes might be a bit weird. it's a filepath more
than 3 times the width of a terminal screen in ASCII or ~128
characters of 2byte unicode origin.
a growing buffer could be optional at places, but i don't see it as
crucial for most cases.

lubomir
--


More information about the subsurface mailing list