From: Raphael Kubo da Costa <kubo@pr...> - 2010-08-25 20:17:36
On Wednesday 25 August 2010 16:30:04 Joerg Sonnenberger wrote:
> On Wed, Aug 25, 2010 at 08:32:28PM +0200, Vincent Torri wrote:
> > On Mon, 23 Aug 2010, Joerg Sonnenberger wrote:
> > >On Sun, Aug 22, 2010 at 06:08:38AM +0200, Vincent Torri wrote:
> > >>>-#if defined (__MacOSX__) || defined (__FreeBSD__) || (defined
> > >>>(__MACH__) && \ - defined (__APPLE__))
> > >>>-# include <sys/syslimits.h>
> > >>>-#endif
> > >>>+#include <limits.h>
> > >>
> > >>Did Joerg try that on all the platforms that were in the #define ? If
> > >>no, revert this. I did ask people where the nedded constant were
> > >>located, and it was not in limits.h
> > >
> > >The original version before my change clearly doesn't work on POSIX
> > >compliant systems. For FreeBSD, sys/limits.h has been included by
> > >limits.h for at least 7 years and they did some header reorg at the
> > >time. I can't say for Darwin, but I would strongly surprised as I have
> > >enough code using PATH_MAX and co without ever including sys/limits.h.
> > >So can you demonstrate any breakage or is this just a theoretical
> > >remark?
> > I was in contact with 2 mac os x users and one freebsd user. I try
> > to fixed the compilation, and limits.h was not sufficient.
> Not enough for WHAT? Given that Mac OS X is supposedly certified for
> POSIX compliants, that would be surprising. It would also disagree what
> I have been told today when asking exactly this question.
FWIW, on FreeBSD at least, limits.h includes both sys/limits.h and
sys/syslimits.h (the latter only if __POSIX_VISIBLE is defined). See
Raphael Kubo da Costa
ProFUSION embedded systems