Re: Then there's PATH_MAX

Liste des GroupesRevenir à col advocacy 
Sujet : Re: Then there's PATH_MAX
De : fsquared (at) *nospam* fsquared.linux (Farley Flud)
Groupes : comp.os.linux.advocacy
Date : 10. Dec 2024, 14:12:03
Autres entêtes
Organisation : UsenetExpress - www.usenetexpress.com
Message-ID : <180fd2f32d5884e5$6049$1734$802601b3@news.usenetexpress.com>
References : 1
User-Agent : Pan/0.146 (Hic habitat felicitas; d7a48b4 gitlab.gnome.org/GNOME/pan.git)
On Mon, 09 Dec 2024 06:09:40 +0000, vallor wrote:

 
#include <stdio.h>
#include <limits.h>
 
#ifdef __linux__
#include <linux/limits.h>
#endif
 
int main (void)
{
 
printf("%d\n",PATH_MAX);
 
return 0;
}
 

This is bullshit.

PATH_MAX is filesystem dependent and since GNU/Linux, unlike that
pile of garbage Microslop, supports many, many different filesystems
the PATH_MAX macro is unreliable and may be undefined on some machines.

The best and only way to determine file name/path parameters is to
use "pathconf" of "fpathconf:"

https://pubs.opengroup.org/onlinepubs/9799919799/

From the link:

"The pathconf() function was proposed immediately after the sysconf()
function when it was realized that some configurable values may differ
across file system, directory, or device boundaries."


--
Hail Linux!  Hail FOSS!  Hail Stallman!


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