On Sun, 14 Mar 2010, Szak�ts Viktor wrote: Hi,
> The macro responsible to set maximum filename/path > length in Harbour (HB_PATH_MAX) is now set to 264. > Modern systems can handle much more as maximum path > length (f.e. Windows 32K chars). AFAIR the longer paths are not for FS but for host name in UNC notation though some FS can use much bigger values then OS. > Shouldn't we extend this Harbour constant to handle > more? > There are few issues to take care of: > - This macro is used for both filename and pathname > max length in Harbour, maybe we should have two values > to fix that. It will introduce unnecessary problems in path modifications and it's not clear what does it mean and how to adopt it to different FS limitations. Current meaning is correct. This is the maximum size of complete path. It doesn't matter it's single file in root directory or series of directories. Important is only total size. > - Set this constant to different values depending on > platform. Potentially it's new problem for code which have to exchange data between different Harbour builds. > - Many times the buffer is allocated on stack, we > may need to revise whether using larger buffers here > has any bad side-effect. If you plan to enlarge this value to 32KB then it will be necessary to remove all such places and define that it's illegal to use it directly or indirectly by some other structures like HB_FNAME in C stack variables. For core code it can be done (though with the cost of speed in some cases) but it's potentially serious problem for 3-rd party code. We will probably have to change current code and hide HB_FNAME internals so user can use it on HVM stack. Changing the value of HB_PATH_MAX breaks binary compatibility with existing code so I do not think it's good idea to touch without some serious reasons, i.e. real problems in some FS. best regards, Przemek _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
