The Testing Area :: November Extensions



Someone recommended replacing _POSIX_PATH_MAX with PATH_MAX - do a quick sed on those files and see if obexftp compiles

For why that is needed, no idea..

Quote
do a quick sed on those files and see if obexftp compiles

- thanks, but how would you do this (i.e. how would you structure the sed command)?

Quote
For why that is needed, no idea..

- What I cannot figure out is why obexftp would compile from /usr (gcc1-with-libs) and not from /opt (compile-3.3.5). As far as I can see the same headers are present - whatever contains PATH_MAX doesn't seem to be found in /opt, but why?

I'm wondering why would replacing those if you get an error on PATH_MAX as well?

Anyways a sed line could be like
Code Sample
sed -e 's/_POSIX_PATH_MAX/PATH_MAX/g' originalfile > newfile


Though those looks more like defines... so you could do something like -D_POSIX_PATH_MAX PATH_MAX but I have my doubts, for the same reason.

EDIT: grepping some header files, it looks like
linux/limits.h:
#define PATH_MAX 4096
in bits/posix1_lim.h:
#define _POSIX_PATH_MAX 256
So maybe you've got some wrong/missing headers or just configure'd wrong somewhere?

Quote
I'm wondering why would replacing those if you get an error on PATH_MAX as well?

- inserting the line "#include <sys/param.h>" towards the beginning of the files with the PATH_MAX error seems to fix things.

Maybe the issue is that I have several limits.h files (the last two seem identical):

../include
../include/linux
../lib/gcc-lib/486-pc-linux-gnu/3.3.5/install-tools/include
../lib/gcc-lib/486-pc-linux-gnu/3.3.5/include

Only the one in ../include/linux contains PATH_MAX

gcc1-with-libs also has several limits.h files (and the first two are exactly the same size as the first two files above):

../include
../include/linux
../lib/gcc-lib/486-linux/3.3.4/include

and again, only the one in ../include/linux contains PATH_MAX.

I have ../include/bits/posix1_lim.h and it contains the POSIX_PATH_MAX statement.

So somehow, the file /usr/include/linux/limits.h gets seen but the file /opt/compile-3.3.5/include/linux/limits.h is not seen, even though I used "export CFLAGS=-I/opt/compile-3.3.5/include"

Is there another flag to set maybe?

If I'm not wrong, CPPFLAGS is intended to be used for includes:
Code Sample
export CPPFLAGS=-I/opt/compile-3.3.5/include

That's what I use anyway. I put only 'optimization stuff' in CFLAGS/CXXFLAGS. And linking stuff goes into LDFLAGS.

Next Page...
original here.