mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Avoid problem if system doesn't define MSG_DONTWAIT
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25216 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
252fb205c3
commit
9a749d5ad3
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2007-06-03 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/GSHTTPURLHandle.m: define MSG_DONTWAIT as zero if it's not
|
||||||
|
defined ... it should not be needed anyway if the socket is already
|
||||||
|
non-blocking.
|
||||||
|
|
||||||
2007-06-03 Richard Frith-Macdonald <rfm@gnu.org>
|
2007-06-03 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/win32/GSFileHandleWin32.m: Clean up indentation issues etc.
|
* Source/win32/GSFileHandleWin32.m: Clean up indentation issues etc.
|
||||||
|
|
|
@ -1281,6 +1281,9 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
||||||
int result;
|
int result;
|
||||||
unsigned char c;
|
unsigned char c;
|
||||||
|
|
||||||
|
#if !defined(MSG_DONTWAIT)
|
||||||
|
#define MSG_DONTWAIT 0
|
||||||
|
#endif
|
||||||
result = recv(fd, &c, 1, MSG_PEEK | MSG_DONTWAIT);
|
result = recv(fd, &c, 1, MSG_PEEK | MSG_DONTWAIT);
|
||||||
if (result == 0 || (result < 0 && errno != EAGAIN && errno != EINTR))
|
if (result == 0 || (result < 0 && errno != EAGAIN && errno != EINTR))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue