On 2/20/07, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote:

Am 20.02.2007 um 15:23 schrieb Zoran Vasiljevic:

> Hi!
>
> I haven't updated the sources for quite a long time!
> We don't compile on anything else but Linux :-(
>
> Anyways, the UIO_MAXIOV seems to be defined only for
> Linux. Neither Mac OSX nor Sun Solaris (not to mention
> the Windows) define such constant. By looking arround
> I see people can not find a peace of mind with it.
> It varies between 16 and 1024 on different platforms etc.
> I will be conservative and define that to 16 on all
> systems that have no UIO_MAXIOV unless somebody has a
> better idea.
>

Now, look at that.... Isn't that nice :-(

34      #ifndef UIO_MAXIOV
35      # if defined(__FreeBSD__) || defined(__APPLE__) || defined
(__NetBSD__)
36      /* FreeBSD 4.7 defines it in sys/uio.h only if _KERNEL is
specified */
37      #  define UIO_MAXIOV 1024
38      # elif defined(__sgi)
39      /* IRIX 6.5 has sysconf(_SC_IOV_MAX) which might return 512 or
bigger */
40      #  define UIO_MAXIOV 512
41      # elif defined(__sun)
42      /* Solaris (and SunOS?) defines IOV_MAX instead */
43      #  ifndef IOV_MAX
44      #   define UIO_MAXIOV 16
45      #  else
46      #   define UIO_MAXIOV IOV_MAX
47      #  endif
48      # elif defined(IOV_MAX)
49      #  define UIO_MAXIOV IOV_MAX
50      # else
51      #  error UIO_MAXIOV nor IOV_MAX are defined
52      # endif
53      #endif
54



You've seen this?

 
http://sourceforge.net/tracker/index.php?func=detail&aid=1635894&group_id=130646&atid=719006

I wasn't sure about hard coding the values and don't have a BSD
machine so wanted to check using the Sourceforge compile farm, but
it's been down for weeks...

I'm not sure there is anything else you can do.  It would be good
however to confirm how the various libc implementations handle large
values of IOV.

I believe glibc transparently chops it up into smaller pieces before
passing to the kernel.

If BSD etc. doesn't, we'll have to make sure we're handling that error
correctly.

Reply via email to