Deutsch English Français Italiano |
<180fd2f32d5884e5$6049$1734$802601b3@news.usenetexpress.com> View for Bookmarking (what is this?) Look up another Usenet article |
From: Farley Flud <fsquared@fsquared.linux> Subject: Re: Then there's PATH_MAX Newsgroups: comp.os.linux.advocacy References: <lrnft4Fd071U5@mid.individual.net> User-Agent: Pan/0.146 (Hic habitat felicitas; d7a48b4 gitlab.gnome.org/GNOME/pan.git) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lines: 40 Path: ...!news.roellig-ltd.de!open-news-network.org!weretis.net!feeder8.news.weretis.net!news.neodome.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!news.usenetexpress.com!not-for-mail Date: Tue, 10 Dec 2024 13:12:03 +0000 Nntp-Posting-Date: Tue, 10 Dec 2024 13:12:03 +0000 X-Received-Bytes: 1403 X-Complaints-To: abuse@usenetexpress.com Organization: UsenetExpress - www.usenetexpress.com Message-Id: <180fd2f32d5884e5$6049$1734$802601b3@news.usenetexpress.com> Bytes: 1855 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!