diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-15 14:48:09 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-15 14:48:09 -0800 |
| commit | 573e08a643bac0af91df90582638f1f765dab429 (patch) | |
| tree | ad745bb81608147304b1bb92aeb682353feedcbd /src/platform/posix | |
| parent | 694ad48a9c3b4c3d3a91d323a1601c2c4ebacba9 (diff) | |
| download | nng-573e08a643bac0af91df90582638f1f765dab429.tar.gz nng-573e08a643bac0af91df90582638f1f765dab429.tar.bz2 nng-573e08a643bac0af91df90582638f1f765dab429.zip | |
Compile static *and* shared libraries.
Test code needs to use the static libraries so that they can get access
to the entire set of symbols, including private ones that are not exported.
Diffstat (limited to 'src/platform/posix')
| -rw-r--r-- | src/platform/posix/posix_alloc.c | 5 | ||||
| -rw-r--r-- | src/platform/posix/posix_clock.c | 5 | ||||
| -rw-r--r-- | src/platform/posix/posix_debug.c | 5 | ||||
| -rw-r--r-- | src/platform/posix/posix_ipc.c | 5 | ||||
| -rw-r--r-- | src/platform/posix/posix_net.c | 5 | ||||
| -rw-r--r-- | src/platform/posix/posix_rand.c | 5 | ||||
| -rw-r--r-- | src/platform/posix/posix_thread.c | 5 |
7 files changed, 35 insertions, 0 deletions
diff --git a/src/platform/posix/posix_alloc.c b/src/platform/posix/posix_alloc.c index cce348f3..aef5bbfc 100644 --- a/src/platform/posix/posix_alloc.c +++ b/src/platform/posix/posix_alloc.c @@ -29,4 +29,9 @@ nni_free(void *ptr, size_t size) } +#else + +// Suppress empty symbols warnings in ranlib. +int nni_posix_alloc_not_used = 0; + #endif diff --git a/src/platform/posix/posix_clock.c b/src/platform/posix/posix_clock.c index 6b452cbf..c87fb890 100644 --- a/src/platform/posix/posix_clock.c +++ b/src/platform/posix/posix_clock.c @@ -125,4 +125,9 @@ nni_plat_usleep(nni_duration usec) #endif // NNG_USE_GETTIMEOFDAY +#else + +// Suppress empty symbols warnings in ranlib. +int nni_posix_clock_not_used = 0; + #endif // PLATFORM_POSIX_CLOCK diff --git a/src/platform/posix/posix_debug.c b/src/platform/posix/posix_debug.c index 6199df1d..aa7afaea 100644 --- a/src/platform/posix/posix_debug.c +++ b/src/platform/posix/posix_debug.c @@ -106,4 +106,9 @@ nni_plat_errno(int errnum) } +#else + +// Suppress empty symbols warnings in ranlib. +int nni_posix_debug_not_used = 0; + #endif // PLATFORM_POSIX_DEBUG diff --git a/src/platform/posix/posix_ipc.c b/src/platform/posix/posix_ipc.c index 6044280e..584dc4a9 100644 --- a/src/platform/posix/posix_ipc.c +++ b/src/platform/posix/posix_ipc.c @@ -340,4 +340,9 @@ nni_plat_ipc_accept(nni_plat_ipcsock *s, nni_plat_ipcsock *server) } +#else + +// Suppress empty symbols warnings in ranlib. +int nni_posix_ipc_not_used = 0; + #endif // PLATFORM_POSIX_IPC diff --git a/src/platform/posix/posix_net.c b/src/platform/posix/posix_net.c index f9720b66..b89e7c49 100644 --- a/src/platform/posix/posix_net.c +++ b/src/platform/posix/posix_net.c @@ -391,4 +391,9 @@ nni_plat_tcp_accept(nni_plat_tcpsock *s, nni_plat_tcpsock *server) } +#else + +// Suppress empty symbols warnings in ranlib. +int nni_posix_net_not_used = 0; + #endif // PLATFORM_POSIX_NET diff --git a/src/platform/posix/posix_rand.c b/src/platform/posix/posix_rand.c index 2576a444..76b2ee46 100644 --- a/src/platform/posix/posix_rand.c +++ b/src/platform/posix/posix_rand.c @@ -83,4 +83,9 @@ nni_plat_seed_prng(void *buf, size_t bufsz) } +#else + +// Suppress empty symbols warnings in ranlib. +int nni_posix_rand_not_used = 0; + #endif // PLATFORM_POSIX_RANDOM diff --git a/src/platform/posix/posix_thread.c b/src/platform/posix/posix_thread.c index 7b4dbbdc..91fbdff7 100644 --- a/src/platform/posix/posix_thread.c +++ b/src/platform/posix/posix_thread.c @@ -313,4 +313,9 @@ nni_plat_fini(void) } +#else + +// Suppress empty symbols warnings in ranlib. +int nni_posix_thread_not_used = 0; + #endif |
