FTBFS on Hurd

Salvo Tomaselli tiposchi at tiscali.it
Wed Aug 27 05:49:46 PDT 2014


In data mercoledì 27 agosto 2014 14:12:41, Lubomir I. Ivanov ha scritto:
> 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?
Yes, I used git grep and it seems the only occurrence of that.

I am not aware of the windows complications because I've never written any C 
that was supposed to run on windows in my life.


> 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.

Well consider that currently on linux it allocates 4096 bytes for a filepath, 
which is a bit huge.

So do you think that just adding a define would be okay?

In any case the snprintf doesn't check the return value at the moment so the 
string might be truncated, but with such a huge limit is quite unlikely.
-- 
Salvo Tomaselli

"Io non mi sento obbligato a credere che lo stesso Dio che ci ha dotato di
senso, ragione ed intelletto intendesse che noi ne facessimo a meno."
                -- Galileo Galilei

http://ltworf.github.io/ltworf/


More information about the subsurface mailing list