diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-14 13:00:55 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-14 13:00:55 -0800 |
| commit | f4ce5a285167e7656037096f77f04ab80a010453 (patch) | |
| tree | 48a9746e154872e4a01c9dee465aed716af278be /src/platform/windows/win_debug.c | |
| parent | b639e4d3643b8245b77bc8707a3a864221fad195 (diff) | |
| download | nng-f4ce5a285167e7656037096f77f04ab80a010453.tar.gz nng-f4ce5a285167e7656037096f77f04ab80a010453.tar.bz2 nng-f4ce5a285167e7656037096f77f04ab80a010453.zip | |
Windows TCP now working.
There are lots of changes here, mostly stuff we did in support of
Windows TCP. However, there are some bugs that were fixed, and we
added some new error codes, and generalized the handling of some failures
during accept. Windows IPC (NamedPipes) is still missing.
Diffstat (limited to 'src/platform/windows/win_debug.c')
| -rw-r--r-- | src/platform/windows/win_debug.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/platform/windows/win_debug.c b/src/platform/windows/win_debug.c index 189f5d4c..00fd6493 100644 --- a/src/platform/windows/win_debug.c +++ b/src/platform/windows/win_debug.c @@ -40,26 +40,24 @@ nni_plat_strerror(int errnum) } -#define NNI_ERR(x, y) { x, y }, - // Win32 has its own error codes, but these ones it shares with POSIX. static struct { int sys_err; int nng_err; } nni_plat_errnos[] = { - NNI_ERR(ENOENT, NNG_ENOENT) - NNI_ERR(EINTR, NNG_EINTR) - NNI_ERR(EINVAL, NNG_EINVAL) - NNI_ERR(ENOMEM, NNG_ENOMEM) - NNI_ERR(EACCES, NNG_EPERM) - NNI_ERR(EAGAIN, NNG_EAGAIN) - NNI_ERR(EBADF, NNG_ECLOSED) - NNI_ERR(EBUSY, NNG_EBUSY) - NNI_ERR(ENAMETOOLONG, NNG_EINVAL) - NNI_ERR(EPERM, NNG_EPERM) - NNI_ERR(EPIPE, NNG_ECLOSED) - NNI_ERR(0, 0) // must be last + { ENOENT, NNG_ENOENT }, + { EINTR, NNG_EINTR }, + { EINVAL, NNG_EINVAL }, + { ENOMEM, NNG_ENOMEM }, + { EACCES, NNG_EPERM }, + { EAGAIN, NNG_EAGAIN }, + { EBADF, NNG_ECLOSED }, + { EBUSY, NNG_EBUSY }, + { ENAMETOOLONG, NNG_EINVAL }, + { EPERM, NNG_EPERM }, + { EPIPE, NNG_ECLOSED }, + { 0, 0 } // must be last }; int |
