diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2014-07-14 19:53:11 +0100 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@googlemail.com> | 2014-07-14 19:53:11 +0100 |
commit | e01c1f1ab3d9d1d4d1bcd7676b85815aeda6f460 (patch) | |
tree | b563d54e1bc1a04a179cd9db5dd7c25593d9c21d | |
parent | 21589529177a394ba33f884464746864c90e5771 (diff) | |
download | Nim-e01c1f1ab3d9d1d4d1bcd7676b85815aeda6f460.tar.gz |
Fixes missing MSG_NOSIGNAL on Mac OS X.
-rw-r--r-- | lib/posix/posix.nim | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim index cdca826ca..8e66336c2 100644 --- a/lib/posix/posix.nim +++ b/lib/posix/posix.nim @@ -1578,8 +1578,17 @@ var ## Terminates a record (if supported by the protocol). MSG_OOB* {.importc, header: "<sys/socket.h>".}: cint ## Out-of-band data. - MSG_NOSIGNAL* {.importc, header: "<sys/socket.h>".}: cint - ## No SIGPIPE generated when an attempt to send is made on a stream-oriented socket that is no longer connected. + +when defined(macosx): + var + MSG_HAVEMORE* {.importc, header: "<sys/socket.h>".}: cint + MSG_NOSIGNAL* = MSG_HAVEMORE +else: + var + MSG_NOSIGNAL* {.importc, header: "<sys/socket.h>".}: cint + ## No SIGPIPE generated when an attempt to send is made on a stream-oriented socket that is no longer connected. + +var MSG_PEEK* {.importc, header: "<sys/socket.h>".}: cint ## Leave received data in queue. MSG_TRUNC* {.importc, header: "<sys/socket.h>".}: cint |