[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] PATH_MAX



On 13/01/2013 14:13, Miro Kropáček wrote:
what is the proper way for user apps how to ask for path maximum? Simple
#include <limits.h> doesn't help, PATH_MAX is still undefined.

There is a problem when building GCC without --with-headers. The limits.h is not generated correctly, and PATH_MAX is missing. I fixed that issue in my gcc-4.4.3-mint-20100123. See my build script for my "Dirty hack":
http://vincent.riviere.free.fr/soft/m68k-atari-mint/archives/gcc-4.6.3-mint-20120503-bin-cygwin-howto.txt

Since you built your own GCC recently, I suppose that you missed that step.
As a quick fix, you can get that limits.h from my binaries.

I even tried -D__USE_POSIX and still no luck.

Those double underscore defines are private ones, do not use them.
Use -D_POSIX_SOURCE or -D_GNU_SOURCE instead, when appropriate.

--
Vincent Rivière