From: Phred Phungus on
Alan Curry wrote:
> In article <7v2s6oFsdrU2(a)mid.individual.net>,
> Phred Phungus <Phred(a)example.invalid> wrote:
> |Right. Alan commented elsethread:
> |
> |> Not really... it is used to dynamically query the maximum allowable pathname
> |> length, which is a kernel limitation, but _PC_PATH_MAX and the other
> |> constants you can pass to pathconf() are just part of the libc interface. The
> |> kernel never sees them.
> |>
> |> _PC_PATH_MAX is a numeric constant, used by libc and the callers of libc
> |> (e.g. you) as part of the libc API.
> |
> |So what *is* in the kernel?
>
> By "in the kernel" do you mean in the kernel source, or in the compiled,
> bootable, runnable image? The source uses PATH_MAX, #defined to 4096 in
> include/linux/limits.h. Once it's compiled, #defines are gone, so it's just
> the magic hardcoded number 4096.
>

Interesting. I want to see if I get it yet.

Unlike _PC_PATH_MAX, PATH_MAX *is* in the source that compiles to become
the bootable, runnable image.

Is PATH_MAX a value that unix is required to have when it runs?
--
fred
From: Phred Phungus on
David Schwartz wrote:
> On Mar 1, 2:08 pm, Phred Phungus <Ph...(a)example.invalid> wrote:
>
>> So what *is* in the kernel?
>
> More or less the same thing that's in user space code.

Is there a way for me to ask my computer nicely what this space is?
--
fred
From: David Schwartz on
On Mar 2, 10:36 pm, Phred Phungus <Ph...(a)example.invalid> wrote:
> David Schwartz wrote:
> > On Mar 1, 2:08 pm, Phred Phungus <Ph...(a)example.invalid> wrote:
>
> >> So what *is* in the kernel?
>
> > More or less the same thing that's in user space code.
>
> Is there a way for me to ask my computer nicely what this space is?

I'm not sure I understand your question. The definitions of these
constants is in the header files. That's where humans and compilers
look to find them. Compilers then embed their values in the
executables they make so the headers are not needed at run time.

DS