curl-library
Re: any day now
Date: Thu, 14 Jun 2007 08:45:20 -0400
On Jun 14, 2007, at 12:03 AM, Dan Fandrich wrote:
> On Wed, Jun 13, 2007 at 06:10:14PM -0400, James Housley wrote:
>> What include is needed for PATH_MAX on these systems. I only have
>> access to BSD style systems and the right include is included.
>
> I'm not sure I'm going to be able to take a look at this in the
> next week
> or two. I doubt it's anything wacky since they're older glibc
> systems--
> probably <sys/param.h>, <unistd.h>, <limits.h>, or <stdio.h>. It
> appears
> from a quick search that PATH_MAX isn't standardized in ANSI C, which
> means that an alternative should be provided if it can't be found,
> and when
> it's available it could be in one of many different places (e.g. see
> http://andre.stechert.org/urwhatu/2005/10/path_max.html ).
In reference to http://curl.haxx.se/auto/log.cgi?
id=20070613111732-20473#prob1 : Looking at the other files in the
tree that use PATH_MAX, and the files that did compile and those that
got the error. It looks like for that system PATH_MAX is defined in
<sys/param.h>
The following patch will cover all the posibilities.
Jim
Index: lib/urldata.h
===================================================================
RCS file: /cvsroot/curl/curl/lib/urldata.h,v
retrieving revision 1.332
diff -u -r1.332 urldata.h
--- lib/urldata.h 12 Jun 2007 21:32:45 -0000 1.332
+++ lib/urldata.h 14 Jun 2007 12:42:21 -0000
@@ -86,6 +86,16 @@
#include <netinet/in.h>
#endif
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
#include "timeval.h"
#ifdef HAVE_ZLIB_H
-- /"\ ASCII Ribbon Campaign . \ / - NO HTML/RTF in e-mail . X - NO Word docs in e-mail . / \ ----------------------------------------------------------------- http://www.FreeBSD.org The Power to Serve jim@TheHousleys.Net http://www.TheHousleys.net --------------------------------------------------------------------- "Eagles may soar, but weasels don't get sucked into jet engines" -- AnonReceived on 2007-06-14