Sujet : Re: Then there's PATH_MAX
De : OFeem1987 (at) *nospam* teleworm.us (Chris Ahlstrom)
Groupes : comp.os.linux.advocacyDate : 09. Dec 2024, 14:08:35
Autres entêtes
Organisation : None
Message-ID : <vj6q4j$dfgl$2@dont-email.me>
References : 1
User-Agent : slrn/1.0.3 (Linux)
vallor wrote this post while blinking in Morse code:
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..."
I remember years ago hitting that path limit with the stupid redundant
directory nesting practised by Visual Studio if you let it set up the project
structure.
Probably fixed by now, as if I cared.
-- Purple humAssorted carsLaser lights, you bring All to prove
You're on the move
and vanishing
-- The Cars