diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-05-05 11:03:33 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-05-06 15:21:33 -0700 |
| commit | 916ba1ab23aa50b855fd795f095eaedb328e84d9 (patch) | |
| tree | b764e37145e7caf8f2fe7d1a3999ab6798c3a095 /src/core | |
| parent | 7ecb0e4a74bbb3d49ebe37a14b2534a242cb930a (diff) | |
| download | nng-916ba1ab23aa50b855fd795f095eaedb328e84d9.tar.gz nng-916ba1ab23aa50b855fd795f095eaedb328e84d9.tar.bz2 nng-916ba1ab23aa50b855fd795f095eaedb328e84d9.zip | |
fixes #396 illumos doesn't build (missing NNG_PLATFORM_POSIX ON)
fixes #397 Need to cast zoneid
fixes #395 sun is predefined on illumos/Solaris
fixes #394 alloca needs to #include <alloca.h>
fixes #399 Cannot use SVR4.2 specific msghdr
fixes #402 getpeerucred needs a NULL initialized ucred
fixes #403 syntax error in posix_tcp - attempt to return void
fixes #407 illumos getegid wrong
fixes #406 nni_idhash_count is dead code
fixes #404 idhash typedef redeclared
fixes #405 warning: newline not last character in file
This is basically a slew of related bug fixes required to make this
work on illumos. Note that the fixes are not "complete", because
more work is required to support port events given that epoll is busted
on illumos.
We also fixed a bunch of things that aren't actually "bugs" per se, but
really just warnings. Silencing them makes things better for everyone.
Apparently not all compilers are equally happy with redundant (but
otherwise identical) typedefs; we use structs in some places instead of
shorter type names to silence these complaints.
Note that IPC permissions (the mode bits on the socket vnode) are not
validated on SunOS systems. This change includes documentation to reflect
that.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/clock.c | 2 | ||||
| -rw-r--r-- | src/core/defs.h | 1 | ||||
| -rw-r--r-- | src/core/file.c | 2 | ||||
| -rw-r--r-- | src/core/idhash.c | 15 | ||||
| -rw-r--r-- | src/core/idhash.h | 4 | ||||
| -rw-r--r-- | src/core/message.c | 2 | ||||
| -rw-r--r-- | src/core/protocol.c | 2 | ||||
| -rw-r--r-- | src/core/strs.c | 2 |
8 files changed, 9 insertions, 21 deletions
diff --git a/src/core/clock.c b/src/core/clock.c index f114daa1..49b972e7 100644 --- a/src/core/clock.c +++ b/src/core/clock.c @@ -19,4 +19,4 @@ void nni_msleep(nni_duration msec) { nni_plat_sleep(msec); -}
\ No newline at end of file +} diff --git a/src/core/defs.h b/src/core/defs.h index 1d656bb2..b9c9b7e5 100644 --- a/src/core/defs.h +++ b/src/core/defs.h @@ -59,7 +59,6 @@ typedef struct nni_proto nni_proto; typedef struct nni_plat_mtx nni_mtx; typedef struct nni_plat_cv nni_cv; -typedef struct nni_idhash nni_idhash; typedef struct nni_thr nni_thr; typedef void (*nni_thr_func)(void *); diff --git a/src/core/file.c b/src/core/file.c index b76fdcda..173a864d 100644 --- a/src/core/file.c +++ b/src/core/file.c @@ -156,4 +156,4 @@ nni_file_unlock(nni_file_lockh *h) { nni_plat_file_unlock(&h->lk); NNI_FREE_STRUCT(h); -}
\ No newline at end of file +} diff --git a/src/core/idhash.c b/src/core/idhash.c index 2bf01d6b..0de83eb1 100644 --- a/src/core/idhash.c +++ b/src/core/idhash.c @@ -1,6 +1,6 @@ // -// Copyright 2017 Garrett D'Amore <garrett@damore.org> -// Copyright 2017 Capitar IT Group BV <info@capitar.com> +// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2018 Capitar IT Group BV <info@capitar.com> // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -306,14 +306,3 @@ nni_idhash_alloc(nni_idhash *h, uint64_t *idp, void *val) return (rv); } - -size_t -nni_idhash_count(nni_idhash *h) -{ - size_t num; - nni_mtx_lock(&h->ih_mtx); - num = h->ih_count; - nni_mtx_unlock(&h->ih_mtx); - - return (num); -} diff --git a/src/core/idhash.h b/src/core/idhash.h index 9dbdd45e..36797a76 100644 --- a/src/core/idhash.h +++ b/src/core/idhash.h @@ -1,6 +1,6 @@ // -// Copyright 2017 Garrett D'Amore <garrett@damore.org> -// Copyright 2017 Capitar IT Group BV <info@capitar.com> +// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2018 Capitar IT Group BV <info@capitar.com> // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this diff --git a/src/core/message.c b/src/core/message.c index 5c396f21..ba3c0e84 100644 --- a/src/core/message.c +++ b/src/core/message.c @@ -627,4 +627,4 @@ uint32_t nni_msg_get_pipe(const nni_msg *m) { return (m->m_pipe); -}
\ No newline at end of file +} diff --git a/src/core/protocol.c b/src/core/protocol.c index 52b9b7fb..ea28ad0a 100644 --- a/src/core/protocol.c +++ b/src/core/protocol.c @@ -95,4 +95,4 @@ nni_proto_sys_fini(void) } nni_proto_inited = 0; nni_mtx_fini(&nni_proto_lk); -}
\ No newline at end of file +} diff --git a/src/core/strs.c b/src/core/strs.c index 66a385d0..98c1a5fa 100644 --- a/src/core/strs.c +++ b/src/core/strs.c @@ -201,4 +201,4 @@ nni_asprintf(char **sp, const char *fmt, ...) va_end(ap); *sp = s; return (0); -}
\ No newline at end of file +} |
