Then there's PATH_MAX

Liste des GroupesRevenir à col advocacy 
Sujet : Then there's PATH_MAX
De : vallor (at) *nospam* cultnix.org (vallor)
Groupes : comp.os.linux.advocacy
Date : 09. Dec 2024, 07:09:40
Autres entêtes
Message-ID : <lrnft4Fd071U5@mid.individual.net>
User-Agent : Pan/0.161 (Hmm2; be402cc9; Linux-6.12.3)
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..."

--
-v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
   OS: Linux 6.12.3 Release: Mint 21.3 Mem: 258G
   "When I was a kid, I was an imaginary playmate."

Date Sujet#  Auteur
9 Dec 24 * Then there's PATH_MAX13vallor
9 Dec 24 +- Re: Then there's PATH_MAX1Chris Ahlstrom
10 Dec 24 +* Re: Then there's PATH_MAX5DFS
10 Dec 24 i`* Re: Then there's PATH_MAX4Lawrence D'Oliveiro
10 Dec 24 i +- Re: Then there's PATH_MAX1vallor
10 Dec 24 i +- Re: Then there's PATH_MAX1Chris Ahlstrom
11 Dec 24 i `- Re: Then there's PATH_MAX1DFS
10 Dec 24 `* Re: Then there's PATH_MAX6Farley Flud
10 Dec 24  +- Re: Then there's PATH_MAX1Chris Ahlstrom
10 Dec 24  `* Fine, let's see you using pathconf(3) on Windows (was: Re: Then there's PATH_MAX)4vallor
10 Dec 24   `* Re: Fine, let's see you using pathconf(3) on Windows (was: Re: Then there's PATH_MAX)3Farley Flud
10 Dec 24    `* Re: Fine, let's see you using pathconf(3) on Windows (was: Re: Then there's PATH_MAX)2vallor
11 Dec 24     `- Re: Fine, let's see you using pathconf(3) on Windows (was: Re: Then there's PATH_MAX)1vallor

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal