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

Re: include problems on hurd autobuilder (MAXPATHLEN undefined)



On Fri, Nov 15, 2002 at 12:35:52AM +0100, Christian Hammers wrote:
> Hi
> 
> http://buildd.debian.org/fetch.php?&pkg=libiodbc2&ver=3.0.6-3.1&arch=hurd-i386&stamp=1023123376&file=log&as=raw
> 
> The GTK frontent in my libiodbc3 ODBC package has a problem on hurd. 
> It needs MAXPATHLEN which is on linux defined in sys/params.h as
> 	sys/param.h:#define MAXPATHLEN  PATH_MAX
> The latter is then defined here:
> 	linux/limits.h:#define PATH_MAX        4096     /* # chars in a path name including nul */
> 
> 
> Can it be that on hurd this is defined somewhere else? Which include
> files should I use there?

Hi,

PATH_MAX is optional: Systems that don't have any fixed limit don't need to
ddefine it (and indeed they shouldn't).  The Hurd is such a system.  As
such, we don't define it, so that all applications notice that they have to
deal with arbitrary long filenames.

The code that uses PATH_MAX should be rewritten to handle filenames of any
length.  There are various strategies to do that.  It depends on what the
code does to determine what the right fix is.

BTW, pathconf on _PC_PATH_MAX usually returns -1 on the Hurd (again
indicating that there is no such limit).

BTW2, the same is true for HOST_MAX.

Thanks,
Marcus


-- 
`Rhubarb is no Egyptian god.' GNU      http://www.gnu.org    marcus@gnu.org
Marcus Brinkmann              The Hurd http://www.gnu.org/software/hurd/
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de/



Reply to: