X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-nonblocking-socket.h;h=261c56ac2fb052492bdcf42d46f4d0785660278d;hb=d357bb12e2b267dbd4bdbd96f97851f609b9b4a3;hp=5f2268d9c3779c95b6cffb9066a9ede403bb5617;hpb=bce9d2f253449c62e05c030307e4d298ef914df9;p=gnulib.git diff --git a/tests/test-nonblocking-socket.h b/tests/test-nonblocking-socket.h index 5f2268d9c..261c56ac2 100644 --- a/tests/test-nonblocking-socket.h +++ b/tests/test-nonblocking-socket.h @@ -1,6 +1,6 @@ /* Test for nonblocking read and write. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ Linux >= 7350000 (depends on circumstances) FreeBSD >= 107521 OpenBSD >= 28673 - MacOS X >= 680000 (depends on circumstances) + Mac OS X >= 680000 (depends on circumstances) AIX 5.1 >= 125713 AIX 7.1 >= 200000 (depends on circumstances) HP-UX >= 114689 @@ -36,11 +36,15 @@ Solaris 11 2010-11 >= 73729 Cygwin 1.5.x >= 66294401 but then write() fails with ENOBUFS Cygwin 1.7.x >= 163838 (depends on circumstances) - native Win32 >= 66294401 + native Windows >= 66294401 */ -#define SOCKET_DATA_BLOCK_SIZE 1000000 +#if defined __OpenBSD__ +# define SOCKET_DATA_BLOCK_SIZE 100000 +#else +# define SOCKET_DATA_BLOCK_SIZE 1000000 +#endif -/* On Linux, MacOS X, Cygwin 1.5.x, native Win32, +/* On Linux, Mac OS X, Cygwin 1.5.x, native Windows, sockets have very large buffers in the kernel, so that write() calls succeed before the reader has started reading, even if fd is blocking and the amount of data is larger than 1 MB. */