joswa / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

Problem cross compiling mongoose.c (PATH_MAX not defined) #303

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm trying to compile mongoose for a project destined to a embedded device. The 
device has a embedded linux based on uClib.

When I try to compile the program I get several issues about PATH_MAX not 
defined.

Looking into your code I have seen that you have several "hacks" in order to 
define this variable, but in my compilation it doesn't work.

In my environment this variable it's defined in 
uClinux-dist/linux-2.4.x/include/linux/limits.h, with the value 4096.

For my in order to be able to compile mongoose, I have included the following 
lines just before of the first mongoose routine:

#ifndef PATH_MAX
#define PATH_MAX 4096
#endif

(I have tried to change the #define for "#include <linux/limits.h>" but it 
doesn't work, it seems that it takes another limits.h, because it finds the 
file, but not define PATH_MAX)

Searching in Internet I have read that posix recommends to define PATH_MAX, but 
it's not mandatory.

May be you include a default value if not defined at the end (as I have 
defined, or may be a smaller one, or a bigger one). I haven't analyze for what 
PATH_MAX it's defined, and then I don't know if it will be better bigger, or 
smaller.

Thanks in advance.

Original issue reported on code.google.com by ricondo....@gmail.com on 16 Dec 2011 at 9:57

GoogleCodeExporter commented 9 years ago
Submitted 1e632d3, thanks.

Original comment by valenok on 22 Sep 2012 at 2:50