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