Sujet : Re: Then there's PATH_MAX
De : guhnoo-basher (at) *nospam* linux.advocaca (DFS)
Groupes : comp.os.linux.advocacyDate : 10. Dec 2024, 04:42:48
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vj8dbn$q2oj$2@dont-email.me>
References : 1
User-Agent : Betterbird (Windows)
On 12/9/2024 1:09 AM, vallor wrote:
Try this one, DFS:
#include <stdio.h>
#include <limits.h>
#ifdef __linux__
#include <linux/limits.h>
#endif
int main (void)
{
printf("%d\n",PATH_MAX);
return 0;
}
Here, I get:
_[/nfs/ds/src/vallor/path_max]_(vallor@lm)🐧_
$ make
tcc -g -O2 -std=c90 -Wall -Werror -pedantic query_PATH_MAX.c -o query_PATH_MAX
_[/nfs/ds/src/vallor/path_max]_(vallor@lm)🐧_
$ ./query_PATH_MAX
4096
If you use tcc, I know the answer you'll get on Windows:
$ ./a.out
259
Ouch! "Here's a nickel, kid..."
Surely you know NTFS supports file paths up to 32,767 characters?
Fortunately, I NEVER run into 'your app software sux' issues. To experience those, just boot a GuhNoo hobbyware distro and run thunar or LibreOffice.