[PATCH] PATH_MAX may not be defined

Steve Bennett steveb at workware.net.au
Tue Aug 30 04:55:01 UTC 2011


On 30/08/2011, at 5:30 AM, Dmitry V. Levin wrote:

> On Mon, Aug 29, 2011 at 08:43:33PM +1000, Steve Bennett wrote:
>> So define something reasonable in this case
>> 
>> Signed-off-by: Steve Bennett <steveb at workware.net.au>
>> ---
>> pathtrace.c |    4 ++++
>> 1 files changed, 4 insertions(+), 0 deletions(-)
>> 
>> diff --git a/pathtrace.c b/pathtrace.c
>> index b2efd33..553fef7 100644
>> --- a/pathtrace.c
>> +++ b/pathtrace.c
>> @@ -40,6 +40,10 @@
>> 
>> #include "syscall.h"
>> 
>> +#ifndef PATH_MAX
>> +#define PATH_MAX 1024
>> +#endif
> 
> I wonder what kind of Linux platform might that be?

$ arm-linux-gcc -v -xc /dev/null
Using built-in specs.
Target: arm-linux
Configured with: ../configure --target=arm-linux --disable-shared --prefix=/usr/local --with-headers=/home/gerg/src/gnu/arm-linux/linux-2.6.25/include --with-gnu-as --with-gnu-ld --enable-multilib
Thread model: posix
gcc version 4.2.4
#include <...> search starts here:
 /usr/local/lib/gcc/arm-linux/4.2.4/include
 /usr/local/lib/gcc/arm-linux/4.2.4/../../../../arm-linux/sys-include
 /usr/local/lib/gcc/arm-linux/4.2.4/../../../../arm-linux/include
End of search list.
GNU C version 4.2.4 (arm-linux)

With glibc 2.3

Including sys/param.h will bring in linux/limits.h and hence PATH_MAX
on this platform.

Cheers,
Steve

--
µWeb: Embedded Web Framework - http://uweb.workware.net.au/
WorkWare Systems Pty Ltd
W: www.workware.net.au      P: +61 434 921 300
E: steveb at workware.net.au   F: +61 7 3391 6002









More information about the Strace-devel mailing list