try this one now... :)

Brad Fitzpatrick brad at danga.com
Tue Sep 5 04:58:57 UTC 2006


"Kludge for missing IOV_MAX on 4.x."
http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/openntpd/files/Attic/patch-includes.h?rev=1.1&content-type=text/x-cvsweb-markup

 #ifndef IOV_MAX
+#if defined(__FreeBSD__)
+# define IOV_MAX	1024
+#else
 # define __need_IOV_MAX
 # include <bits/stdio_lim.h>
+#endif
 #endif

I'll do something similar.


On Tue, 5 Sep 2006, Brad Fitzpatrick wrote:

> Eric,
>
> http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/uio.h.html
>
>   "Traditionally, the maximum number of scatter/gather elements the system
>   can process in one call were described by the symbolic value
>   {UIO_MAXIOV}.  In IEEE Std 1003.1-2001 this value is replaced by the
>   constant {IOV_MAX} which can be found in <limits.h>."
>
> Do you have a UIO_MAXIOV defined on FreeBSD 4?
>
> Otherwise, should we just hard-code "10" or something?
>
> - Brad
>
>
> On Mon, 4 Sep 2006, Eric Hodel wrote:
>
> > On Sep 4, 2006, at 6:45 PM, Brad Fitzpatrick wrote:
> >
> > > FreeBSD / Solaris users,
> > >
> > > Could you try this one?
> > >
> > >    http://danga.com/memcached/dist/experimental/memcached-1.2.x-
> > > svn362.tar.gz
> >
> > Its good on FreeBSD 5.4 x86, FreeBSD 6.0 amd64 and FreeBSD 6.1 x86
> >
> > Still not compiling on FreeBSD 4.
> >
> > --- memcached.c.old     Mon Sep  4 18:42:07 2006
> > +++ memcached.c Mon Sep  4 21:11:28 2006
> > @@ -23,6 +23,7 @@
> > #include <sys/un.h>
> > #include <sys/signal.h>
> > #include <sys/resource.h>
> > +#include <sys/uio.h>
> > /* some POSIX systems need the following definition
> >    * to get mlockall flags out of sys/mman.h.  */
> > #ifndef _P1003_1B_VISIBLE
> > @@ -584,8 +585,9 @@
> >       int comm = c->item_comm;
> >       item *old_it;
> >       int delete_locked = 0;
> > -    stats.set_cmds++;
> >       char *key = ITEM_key(it);
> > +
> > +    stats.set_cmds++;
> >       if (strncmp(ITEM_data(it) + it->nbytes - 2, "\r\n", 2) != 0) {
> >           out_string(c, "CLIENT_ERROR bad data chunk");
> >
> > That patch fixes everything except:
> >
> > $ make
> > make  all-recursive
> > Making all in doc
> > cd .. && /bin/sh ./config.status doc/Makefile
> > config.status: creating doc/Makefile
> > source='memcached.c' object='memcached.o' libtool=no  depfile='.deps/
> > memcached.Po' tmpdepfile='.deps/memcached.TPo'  depmode=gcc /usr/
> > local/bin/bash ./depcomp  gcc -DHAVE_CONFIG_H -I. -I. -I.    -I/usr/
> > local/include  -g -O2 -c `test -f 'memcached.c' || echo './'`memcached.c
> > In file included from memcached.c:53:
> > /usr/include/malloc.h:2: warning: #warning "this file includes
> > <malloc.h> which is deprecated, use <stdlib.h> instead"
> > memcached.c: In function `add_iov':
> > memcached.c:484: `IOV_MAX' undeclared (first use in this function)
> > memcached.c:484: (Each undeclared identifier is reported only once
> > memcached.c:484: for each function it appears in.)
> > *** Error code 1
> >
> > Stop in /usr/home/eric/memcached-1.2.x-svn362.
> > *** Error code 1
> >
> > Stop in /usr/home/eric/memcached-1.2.x-svn362.
> > *** Error code 1
> >
> > Stop in /usr/home/eric/memcached-1.2.x-svn362.
> >
> > I can't find an IOV_MAX (or equivalent) in FreeBSD 4's /usr/include
> > that's exposed in the userland.
> >
> > --
> > Eric Hodel - drbrain at segment7.net - http://blog.segment7.net
> > This implementation is HODEL-HASH-9600 compliant
> >
> > http://trackmap.robotcoop.com
> >
> >
> >
>
>


More information about the memcached mailing list