diff options
Diffstat (limited to 'src/supplemental')
| -rw-r--r-- | src/supplemental/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/supplemental/idhash/CMakeLists.txt | 11 | ||||
| -rw-r--r-- | src/supplemental/idhash/idhash.h | 27 | ||||
| -rw-r--r-- | src/supplemental/util/CMakeLists.txt | 10 | ||||
| -rw-r--r-- | src/supplemental/util/idhash.c (renamed from src/supplemental/idhash/idhash.c) | 6 | ||||
| -rw-r--r-- | src/supplemental/util/idhash_test.c (renamed from src/supplemental/idhash/idhash_test.c) | 4 |
6 files changed, 15 insertions, 48 deletions
diff --git a/src/supplemental/CMakeLists.txt b/src/supplemental/CMakeLists.txt index 3fa254e7..2dcf228e 100644 --- a/src/supplemental/CMakeLists.txt +++ b/src/supplemental/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2021 Staysail Systems, Inc. <info@staystail.tech> +# Copyright 2024 Staysail Systems, Inc. <info@staystail.tech> # # This software is supplied under the terms of the MIT License, a # copy of which should be located in the distribution where this @@ -11,8 +11,7 @@ nng_directory(supplemental) add_subdirectory(base64) add_subdirectory(http) -add_subdirectory(idhash) add_subdirectory(sha1) add_subdirectory(tls) add_subdirectory(util) -add_subdirectory(websocket)
\ No newline at end of file +add_subdirectory(websocket) diff --git a/src/supplemental/idhash/CMakeLists.txt b/src/supplemental/idhash/CMakeLists.txt deleted file mode 100644 index 3a9bbb0b..00000000 --- a/src/supplemental/idhash/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright 2023 Staysail Systems, Inc. <info@staysail.tech> -# -# This software is supplied under the terms of the MIT License, a -# copy of which should be located in the distribution where this -# file was obtained (LICENSE.txt). A copy of the license may also be -# found online at https://opensource.org/licenses/MIT. -# - -nng_sources_if(NNG_SUPP_IDHASH idhash.c idhash.h) -nng_test_if(NNG_SUPP_IDHASH idhash_test) diff --git a/src/supplemental/idhash/idhash.h b/src/supplemental/idhash/idhash.h deleted file mode 100644 index 5fd8f235..00000000 --- a/src/supplemental/idhash/idhash.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright 2023 Staysail Systems, Inc. <info@staysail.tech> -// -// This software is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -#ifndef NNG_SUPPLEMENTAL_IDHASH_IDHASH_H -#define NNG_SUPPLEMENTAL_IDHASH_IDHASH_H - -#include <nng/nng.h> - -typedef struct nng_id_map_s nng_id_map; - -#define NNG_MAP_RANDOM 1 - -NNG_DECL int nng_id_map_alloc( - nng_id_map **map, uint64_t lo, uint64_t hi, int flags); -NNG_DECL void nng_id_map_free(nng_id_map *map); -NNG_DECL void *nng_id_get(nng_id_map *, uint64_t); -NNG_DECL int nng_id_set(nng_id_map *, uint64_t, void *); -NNG_DECL int nng_id_alloc(nng_id_map *, uint64_t *, void *); -NNG_DECL int nng_id_remove(nng_id_map *, uint64_t); - -#endif // NNG_SUPPLEMENTAL_IDHASH_IDHASH_H diff --git a/src/supplemental/util/CMakeLists.txt b/src/supplemental/util/CMakeLists.txt index 5a144da9..f62026fb 100644 --- a/src/supplemental/util/CMakeLists.txt +++ b/src/supplemental/util/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> +# Copyright 2024 Staysail Systems, Inc. <info@staysail.tech> # # This software is supplied under the terms of the MIT License, a # copy of which should be located in the distribution where this @@ -7,5 +7,9 @@ # found online at https://opensource.org/licenses/MIT. # -nng_sources(options.c platform.c) -nng_headers(nng/supplemental/util/options.h nng/supplemental/util/platform.h) +nng_sources(idhash.c options.c platform.c) +nng_headers( + nng/supplemental/util/idhash.h + nng/supplemental/util/options.h + nng/supplemental/util/platform.h) +nng_test(idhash_test) diff --git a/src/supplemental/idhash/idhash.c b/src/supplemental/util/idhash.c index 051b686a..cf48df3e 100644 --- a/src/supplemental/idhash/idhash.c +++ b/src/supplemental/util/idhash.c @@ -1,5 +1,5 @@ // -// Copyright 2023 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech> // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -7,7 +7,9 @@ // found online at https://opensource.org/licenses/MIT. // -#include "supplemental/idhash/idhash.h" +#include <nng/nng.h> +#include <nng/supplemental/util/idhash.h> + #include "core/nng_impl.h" struct nng_id_map_s { diff --git a/src/supplemental/idhash/idhash_test.c b/src/supplemental/util/idhash_test.c index 367f34bc..5bbdc4fb 100644 --- a/src/supplemental/idhash/idhash_test.c +++ b/src/supplemental/util/idhash_test.c @@ -1,5 +1,5 @@ // -// Copyright 2023 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech> // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -9,7 +9,7 @@ #include <nuts.h> -#include "idhash.h" +#include <nng/supplemental/util/idhash.h> void test_id_basic(void) |
