Re: [hatari-devel] FILENAME_MAX size?

[ Thread Index | Date Index | More Archives ]

Le 22/05/2022 à 01:31, Eero Tamminen a écrit :

According to Glibc docs, FILENAME_MAX should not be used:

But it's used by Hatari for all configuration file paths...

Any idea whether the documented issue only specific to GNU/Hurd, or can FILENAME_MAX be set to something like MAX_INT also on other platforms?

I'm not aware of such issue, but in that case if we want to be safe, maybe we could just replace FILENAME_MAX by PATH_MAX ?

As PATH_MAX seems to not have this MAX_INT problem, it could solve this issue (PATH_MAX contains the path and the filename, so its size should be enough)

Or we could just set HATARI_FILENAME_MAX = 4096 and use it everywhere.

see this page for example for more detailled  informations :


Mail converted by MHonArc 2.6.19+