Alexander Skwar | 7 Dec 11:52

direnum.c:146: error: 'NAME_MAX' undeclared here (not in a function)

Hi again!

Trying to compile fsvs on S10. It fails:

diff.c:501: warning: format '%d' expects type 'int', but argument 5 has type 'long int'
     CC direnum.c
direnum.c:146: error: 'NAME_MAX' undeclared here (not in a function)
direnum.c: In function 'dir__get_dir_size':
direnum.c:207: warning: label 'ex' defined but not used
gmake[1]: *** [direnum.o] Error 1
gmake: *** [default-target] Error 2

Any ideas? :)

Complete config.log is available at <http://public-files.askwar.s3.amazonaws.com/fsvs/config.log>.

Alexander Skwar
Philipp Marek | 7 Dec 12:07

Re: direnum.c:146: error: 'NAME_MAX' undeclared here (not in a function)

On Friday 07 December 2007 Alexander Skwar wrote:
> Hi again!
>
> Trying to compile fsvs on S10. It fails:
>
> diff.c:501: warning: format '%d' expects type 'int', but argument 5 has
> type 'long int' CC direnum.c
> direnum.c:146: error: 'NAME_MAX' undeclared here (not in a function)
> direnum.c: In function 'dir__get_dir_size':
> direnum.c:207: warning: label 'ex' defined but not used
> gmake[1]: *** [direnum.o] Error 1
> gmake: *** [default-target] Error 2

In http://opengroup.org/onlinepubs/007908799/xsh/rename.html there is said:
	[ENAMETOOLONG]
	 The length of the old or new argument exceeds {PATH_MAX} or a pathname
	 component is longer than {NAME_MAX}.
Which makes me believe that NAME_MAX should be a constant in stdio.h.

But this seems to define only FILENAME_MAX:
	http://opengroup.org/onlinepubs/007908799/xsh/stdio.h.html

> Any ideas? :)
You could try doing something like
	#define NAME_MAX (FILENAME_MAX)
in config.h somewhere.

Regards,

Phil
(Continue reading)

Alexander Skwar | 7 Dec 12:27

Re: direnum.c:146: error: 'NAME_MAX' undeclared here (not in a function)

Hello!

On Dec 7, 2007 12:07 PM, Philipp Marek <philipp <at> marek.priv.at> wrote:
>
> On Friday 07 December 2007 Alexander Skwar wrote:
> > Hi again!
> >
> > Trying to compile fsvs on S10. It fails:
> >
> > diff.c:501: warning: format '%d' expects type 'int', but argument 5 has
> > type 'long int' CC direnum.c
> > direnum.c:146: error: 'NAME_MAX' undeclared here (not in a function)
> > direnum.c: In function 'dir__get_dir_size':
> > direnum.c:207: warning: label 'ex' defined but not used
> > gmake[1]: *** [direnum.o] Error 1
> > gmake: *** [default-target] Error 2
>
> In http://opengroup.org/onlinepubs/007908799/xsh/rename.html there is said:
>        [ENAMETOOLONG]
>         The length of the old or new argument exceeds {PATH_MAX} or a pathname
>         component is longer than {NAME_MAX}.
> Which makes me believe that NAME_MAX should be a constant in stdio.h.
>
> But this seems to define only FILENAME_MAX:
>        http://opengroup.org/onlinepubs/007908799/xsh/stdio.h.html
>
> > Any ideas? :)
> You could try doing something like
>        #define NAME_MAX (FILENAME_MAX)
> in config.h somewhere.
(Continue reading)


Gmane