curl-library
Re: [autobuild] those FreeBSD warnings
Date: Tue, 02 Mar 2004 18:14:33 -0600
I emailed the maintainer of the FreeBSD curl port, but never got a
response, so I'm assuming he doesn't mind sharing his patches.
I'll attach them here, but I'm not sure we need them, since the build
looks ok now (although we might want to consider patch-lib::url.c). I
must have fat-fingered something earlier. There still are a couple
warnings about select() not being prototyped in the tests/lib files.
I'll send patches for that separately.
Joe
--- configure.curl Mon Jun 24 17:23:46 2002
+++ configure Mon Jun 24 17:24:10 2002
@@ -9868,8 +9868,10 @@
EXTRA_SSL= ;;
*)
EXTRA_SSL=$OPT_SSL
+ if [ ! "$EXTRA_SSL" = "/usr" ]; then
LDFLAGS="$LDFLAGS -L$EXTRA_SSL/lib"
CPPFLAGS="$CPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include"
+ fi
;;
esac
--- lib/hostip.c.orig Tue May 13 05:12:17 2003
+++ lib/hostip.c Sun Jun 15 18:44:13 2003
@@ -497,11 +497,11 @@
/* now, shrink the allocated buffer to the size we actually need, which
most often is only a fraction of the original alloc */
- newbuf=(char *)realloc(*buf, (int)bufptr-(int)(*buf));
+ newbuf=(char *)realloc(*buf, (int)(bufptr-*buf));
/* if the alloc moved, we need to adjust things again */
if(newbuf != *buf)
- hostcache_fixoffset((struct hostent*)newbuf, (int)newbuf-(int)*buf);
+ hostcache_fixoffset((struct hostent*)newbuf, (int)(newbuf-*buf));
/* setup the return */
*buf = newbuf;
--- lib/url.c.old Wed Nov 27 17:22:24 2002
+++ lib/url.c Wed Nov 27 17:23:29 2002
@@ -288,6 +288,10 @@
data->set.proxytype = CURLPROXY_HTTP; /* defaults to HTTP proxy */
+#if defined(__FreeBSD_version)
+ data->set.no_signal = TRUE; /* different handling of signals and threads */
+#endif /* __FreeBSD_version */
+
/* create an array with connection data struct pointers */
data->state.numconnects = 5; /* hard-coded right now */
data->state.connects = (struct connectdata **)
--- src/main.c.orig Wed Dec 10 15:14:31 2003
+++ src/main.c Wed Dec 10 15:14:48 2003
@@ -3350,7 +3350,7 @@
closed, as is done above here */
if(config->remote_time && outs.filename) {
/* as libcurl if we got a time. Pretty please */
- long filetime;
+ time_t filetime;
curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
if(filetime >= 0) {
struct utimbuf times;
--- tests/server/getpart.c.orig Wed Dec 10 15:15:52 2003
+++ tests/server/getpart.c Wed Dec 10 15:17:19 2003
@@ -21,7 +21,7 @@
int len = strlen(buffer);
int needed_len = len + *stringlen;
- if(needed_len >= *stralloc) {
+ while(needed_len >= *stralloc) {
char *newptr;
long newsize = needed_len*2; /* get twice the needed size */
- application/x-sh attachment: patch-ltmain.sh