#2016 PATH_MAX

closed-fixed
librarian (5)
5
2012-04-26
2012-04-26
No

sdcclib uses PATH_MAX, which is not required to be defined by any standard unless a limit on path lengths exists (and even then AFAIK only by POSIX). Buildign sdcc fails on Debian GNU/Hurd for me:

philipp@debian:~/sdcc$ make
make -C support/librarian
make[1]: Entering directory `/home/philipp/sdcc/support/librarian'
gcc -fms-extensions -pipe -ggdb -g -O2 -Wall -Wno-parentheses -I. -I../.. -I./../../support/util -I. -c sdcclib.c -o sdcclib.o
sdcclib.c:27:15: error: ‘PATH_MAX’ undeclared here (not in a function)
sdcclib.c: In function ‘AddList’:
sdcclib.c:608:10: warning: unused variable ‘RelName’ [-Wunused-variable]
sdcclib.c:607:10: warning: unused variable ‘SrcName’ [-Wunused-variable]
make[1]: *** [sdcclib.o] Error 1
make[1]: Leaving directory `/home/philipp/sdcc/support/librarian'
make: *** [sdcc-librarian] Error 2

I recommend to
a) remove the dependency on PATH_MAX entirely, if possible
or
b) Use standard C FILENAME_MAX instead (but mind footnote 265 of the C11 standard in that case)

Philipp

Discussion

  • Philipp Klaus Krause

    Fixed in revsision #7644.

    Philipp

     
  • Philipp Klaus Krause

    • assigned_to: nobody --> spth
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks