From: Leif A Sawyer (axlas@acad2.alaska.edu)
Date: 08/01/92


From: axlas@acad2.alaska.edu (Leif A Sawyer)
Subject: Re: Problems with extfs
Date: 2 Aug 1992 00:53:48 GMT

In article <trussell.712725783@cwis>, trussell@cwis.unomaha.edu (Tim Russell) writes:
> liljeber@klaava.Helsinki.FI (Mika Pekka Liljeberg) writes:
>
>>It wouldn't even compile.
>
>>char buff[get_max_name_len()];
>
>>is not a legal C declaration.
>
> No, but you could easily have a shell script create (or update, via sed)
> a header file in /usr/include that contains the max filename length for that
> system.. Of course, this wouldn't work for precompiled stuff, but would
> kick in anytime something was compiled.
>

Yes, but how about this, since he's trying to do it whil running:

 char *buff;

 buff = (char *) malloc (get_max_name_len());
 if (buff = NULL)
   perror("couldn't allocate buff");

Leif Sawyer

AXLAS@acad2.alaska.edu