1. Re: Error: file name for OPEN is too long
- Posted by Matt Lewis <matthewwalkerlewis at gm?il.c?m> Dec 19, 2007
- 489 views
Matt Lewis wrote: > > Juergen Luethje wrote: > > > > > > So concerning full path names on FAT32, Eu's open() function will not > > work with legitimate lengths of 255 to 259 characters. Although it might > > be somewhat unlikely to encounter this problem, i can happen (as it did > > to me). So maybe a future version of Eu can support the maximum allowed > > length of 259 characters? > > Yes, this should probably be addressed. And we should also investigate > this issue for other platforms, since they probably have different > constraints. From /usr/include/linux/limits.h (linux): #define NAME_MAX 255 /* # chars in a file name */ #define PATH_MAX 4096 /* # chars in a path name including nul */ From /usr/include/sys/syslimits.h (FreeBSD): #define NAME_MAX 255 /* # max bytes in a file name */ #define PATH_MAX 1024 /* # max bytes in pathname */ It seems reasonable to pick these values up from the platform correct headers. Matt