changeset 500:8de8fcdac60e

move everything from libjeffpc-comm into libjeffpc It seemed like a good idea to have two separate libraries - one for the basics and one for the advanced socket wrapping - but it turned out to be nothing but a headache with no actual benefit. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Wed, 25 Jul 2018 12:16:02 -0400
parents 5e09e1e03e90
children a8855fa73a32
files .hgignore CMakeLists.txt jeffpc-comm.mapfile-vers jeffpc.mapfile-vers mapfile-vers
diffstat 5 files changed, 279 insertions(+), 316 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Tue Jun 12 13:03:15 2018 -0400
+++ b/.hgignore	Wed Jul 25 12:16:02 2018 -0400
@@ -14,7 +14,6 @@
 sexpr.tab.h
 
 libjeffpc.so
-libjeffpc-comm.so
 sexpr-repl
 
 hgversion.h
--- a/CMakeLists.txt	Tue Jun 12 13:03:15 2018 -0400
+++ b/CMakeLists.txt	Wed Jul 25 12:16:02 2018 -0400
@@ -102,12 +102,14 @@
 	padding.c
 	qstring.c
 	rand.c
+	scgisvc.c
 	sexpr.c
 	sexpr_dump.c
 	sexpr_eval.c
 	${FLEX_sexpr_OUTPUTS} ${BISON_sexpr_OUTPUTS}
 	slab.c
 	sock.c
+	socksvc.c
 	str.c
 	synch.c
 	taskq.c
@@ -134,20 +136,9 @@
 	nsl
 )
 
-add_library(jeffpc-comm SHARED
-	scgisvc.c
-	socksvc.c
-)
-
-target_link_libraries(jeffpc-comm
-	jeffpc
-)
-
-target_apply_mapfile(jeffpc jeffpc.mapfile-vers)
-target_apply_mapfile(jeffpc-comm jeffpc-comm.mapfile-vers)
+target_apply_mapfile(jeffpc mapfile-vers)
 
 install(TARGETS	jeffpc
-		jeffpc-comm
 	DESTINATION ${CMAKE_INSTALL_LIBDIR}
 	PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
 install(FILES	include/jeffpc/atomic.h
--- a/jeffpc-comm.mapfile-vers	Tue Jun 12 13:03:15 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-#
-# Copyright (c) 2017 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-#
-
-JEFFPC_COMM_0.10 {
-	global:
-		# scgisvc
-		scgisvc;
-
-		# socksvc
-		socksvc;
-
-	local:
-		*;
-};
--- a/jeffpc.mapfile-vers	Tue Jun 12 13:03:15 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,270 +0,0 @@
-#
-# Copyright (c) 2016-2018 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-#
-
-JEFFPC_0.10 {
-	global:
-		# array
-		array_alloc;
-		array_free;
-		array_size;
-		array_truncate;
-
-		# bst
-		bst_add;
-		bst_create;
-		bst_destroy;
-		bst_insert_here;
-		bst_remove;
-
-		# buffer
-		buffer_alloc;
-		buffer_append;
-		buffer_free;
-		buffer_init_const;
-		buffer_init_sink;
-		buffer_seek;
-		buffer_truncate;
-
-		# cbor
-		cbor_pack_array_end;
-		cbor_pack_array_start;
-		cbor_pack_array_vals;
-		cbor_pack_blob;
-		cbor_pack_bool;
-		cbor_pack_break;
-		cbor_pack_cstr_len;
-		cbor_pack_int;
-		cbor_pack_map_end;
-		cbor_pack_map_start;
-		cbor_pack_map_val;
-		cbor_pack_nint;
-		cbor_pack_null;
-		cbor_pack_str;
-		cbor_pack_uint;
-		cbor_pack_val;
-
-		# cstr
-		strcpy_safe;
-
-		# error
-		cmn_err;
-		cmn_verr;
-		jeffpc_assfail3;
-		jeffpc_assfail;
-		jeffpc_log;
-		jeffpc_print;
-		panic;
-		print_stacktrace;
-		save_stacktrace;
-
-		# hexdump
-		hexdump;
-		hexdumpz;
-
-		# init
-		jeffpc_init;
-
-		# io
-		read_file_common;
-		write_file;
-		xpread;
-		xpwrite;
-		xread;
-		xwrite;
-
-		# list
-		list_create;
-		list_destroy;
-		list_move_tail;
-
-		# mem
-		mem_cache_create;
-		mem_cache_destroy;
-		mem_cache_alloc;
-		mem_cache_free;
-		mem_reallocarray;
-		mem_recallocarray;
-
-		# nvlist
-		nvl_convert;
-		nvl_exists;
-		nvl_exists_type;
-		nvl_iter_next;
-		nvl_iter_start;
-		nvl_lookup;
-		nvl_lookup_array;
-		nvl_lookup_blob;
-		nvl_lookup_bool;
-		nvl_lookup_int;
-		nvl_lookup_null;
-		nvl_lookup_nvl;
-		nvl_lookup_str;
-		nvl_merge;
-		nvl_set;
-		nvl_set_array;
-		nvl_set_array_copy;
-		nvl_set_blob;
-		nvl_set_blob_copy;
-		nvl_set_bool;
-		nvl_set_cstr_dup;
-		nvl_set_int;
-		nvl_set_null;
-		nvl_set_nvl;
-		nvl_set_pair;
-		nvl_set_str;
-		nvl_unpack;
-		nvl_unset;
-		nvl_unset_type;
-		nvpair_value_array;
-		nvpair_value_blob;
-		nvpair_value_bool;
-		nvpair_value_int;
-		nvpair_value_null;
-		nvpair_value_nvl;
-		nvpair_value_str;
-
-		# padding
-		check_padding;
-
-		# qstring
-		qstring_parse_len;
-
-		# rand
-		rand32;
-		rand64;
-		rand_buf;
-
-		# sexpr
-		sexpr_alist_lookup_bool;
-		sexpr_alist_lookup_int;
-		sexpr_alist_lookup_list;
-		sexpr_alist_lookup_str;
-		sexpr_alist_lookup_val;
-		sexpr_args_to_list;
-		sexpr_array_to_list;
-		sexpr_assoc;
-		sexpr_car;
-		sexpr_cdr;
-		sexpr_dump;
-		sexpr_dump_file;
-		sexpr_equal;
-		sexpr_eval;
-		sexpr_length;
-		sexpr_list_to_array;
-		sexpr_list_to_val_array;
-		sexpr_nth;
-		sexpr_parse;
-
-		# sock
-		connect_ip;
-
-		# str / sym
-		_strsym_alloc;
-		_strsym_alloc_static;
-		_strsym_cmp;
-		_strsym_dup;
-		_strsym_dup_len;
-		_strsym_len;
-		str_cat;
-		str_empty_string;
-		str_printf;
-		str_vprintf;
-
-		# synch
-		mxinit;
-		mxdestroy;
-		mxlock;
-		mxunlock;
-		rwinit;
-		rwdestroy;
-		rwlock;
-		rwunlock;
-		condinit;
-		conddestroy;
-		condwait;
-		condreltimedwait;
-		condsig;
-		condbcast;
-		barrierinit;
-		barrierdestroy;
-		barrierwait;
-
-		# taskq
-		taskq_create_fixed;
-		taskq_destroy;
-		taskq_dispatch;
-		taskq_wait;
-
-		# tree
-		tree_destroy_nodes;
-		tree_find;
-		tree_first;
-		tree_last;
-		tree_next;
-		tree_prev;
-		tree_swap;
-
-		# unicode
-		utf8_to_utf32;
-		utf32_to_utf8;
-
-		# uuid
-		xdr_xuuid;
-		xuuid_clear;
-		xuuid_compare;
-		xuuid_generate;
-		xuuid_parse;
-		xuuid_unparse;
-
-		# val
-		__val_typename;
-		val_dump_file;
-		val_free;
-		val_alloc_array;
-		val_alloc_array_dup;
-		val_alloc_array_static;
-		val_alloc_blob;
-		val_alloc_blob_dup;
-		val_alloc_blob_static;
-		val_alloc_bool;
-		val_alloc_char;
-		val_alloc_cons;
-		val_alloc_int;
-		val_alloc_null;
-		val_alloc_nvl;
-		val_empty_cons;
-		val_pack;
-		val_size;
-		val_unpack;
-
-		# urldecode
-		urldecode;
-		urldecode_str;
-
-		# version
-		jeffpc_hgrev;
-		jeffpc_hgrev_binary;
-		jeffpc_version;
-
-	local:
-		*;
-};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapfile-vers	Wed Jul 25 12:16:02 2018 -0400
@@ -0,0 +1,276 @@
+#
+# Copyright (c) 2016-2018 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+
+JEFFPC_0.10 {
+	global:
+		# array
+		array_alloc;
+		array_free;
+		array_size;
+		array_truncate;
+
+		# bst
+		bst_add;
+		bst_create;
+		bst_destroy;
+		bst_insert_here;
+		bst_remove;
+
+		# buffer
+		buffer_alloc;
+		buffer_append;
+		buffer_free;
+		buffer_init_const;
+		buffer_init_sink;
+		buffer_seek;
+		buffer_truncate;
+
+		# cbor
+		cbor_pack_array_end;
+		cbor_pack_array_start;
+		cbor_pack_array_vals;
+		cbor_pack_blob;
+		cbor_pack_bool;
+		cbor_pack_break;
+		cbor_pack_cstr_len;
+		cbor_pack_int;
+		cbor_pack_map_end;
+		cbor_pack_map_start;
+		cbor_pack_map_val;
+		cbor_pack_nint;
+		cbor_pack_null;
+		cbor_pack_str;
+		cbor_pack_uint;
+		cbor_pack_val;
+
+		# cstr
+		strcpy_safe;
+
+		# error
+		cmn_err;
+		cmn_verr;
+		jeffpc_assfail3;
+		jeffpc_assfail;
+		jeffpc_log;
+		jeffpc_print;
+		panic;
+		print_stacktrace;
+		save_stacktrace;
+
+		# hexdump
+		hexdump;
+		hexdumpz;
+
+		# init
+		jeffpc_init;
+
+		# io
+		read_file_common;
+		write_file;
+		xpread;
+		xpwrite;
+		xread;
+		xwrite;
+
+		# list
+		list_create;
+		list_destroy;
+		list_move_tail;
+
+		# mem
+		mem_cache_create;
+		mem_cache_destroy;
+		mem_cache_alloc;
+		mem_cache_free;
+		mem_reallocarray;
+		mem_recallocarray;
+
+		# nvlist
+		nvl_convert;
+		nvl_exists;
+		nvl_exists_type;
+		nvl_iter_next;
+		nvl_iter_start;
+		nvl_lookup;
+		nvl_lookup_array;
+		nvl_lookup_blob;
+		nvl_lookup_bool;
+		nvl_lookup_int;
+		nvl_lookup_null;
+		nvl_lookup_nvl;
+		nvl_lookup_str;
+		nvl_merge;
+		nvl_set;
+		nvl_set_array;
+		nvl_set_array_copy;
+		nvl_set_blob;
+		nvl_set_blob_copy;
+		nvl_set_bool;
+		nvl_set_cstr_dup;
+		nvl_set_int;
+		nvl_set_null;
+		nvl_set_nvl;
+		nvl_set_pair;
+		nvl_set_str;
+		nvl_unpack;
+		nvl_unset;
+		nvl_unset_type;
+		nvpair_value_array;
+		nvpair_value_blob;
+		nvpair_value_bool;
+		nvpair_value_int;
+		nvpair_value_null;
+		nvpair_value_nvl;
+		nvpair_value_str;
+
+		# padding
+		check_padding;
+
+		# qstring
+		qstring_parse_len;
+
+		# rand
+		rand32;
+		rand64;
+		rand_buf;
+
+		# scgisvc
+		scgisvc;
+
+		# sexpr
+		sexpr_alist_lookup_bool;
+		sexpr_alist_lookup_int;
+		sexpr_alist_lookup_list;
+		sexpr_alist_lookup_str;
+		sexpr_alist_lookup_val;
+		sexpr_args_to_list;
+		sexpr_array_to_list;
+		sexpr_assoc;
+		sexpr_car;
+		sexpr_cdr;
+		sexpr_dump;
+		sexpr_dump_file;
+		sexpr_equal;
+		sexpr_eval;
+		sexpr_length;
+		sexpr_list_to_array;
+		sexpr_list_to_val_array;
+		sexpr_nth;
+		sexpr_parse;
+
+		# sock
+		connect_ip;
+
+		# socksvc
+		socksvc;
+
+		# str / sym
+		_strsym_alloc;
+		_strsym_alloc_static;
+		_strsym_cmp;
+		_strsym_dup;
+		_strsym_dup_len;
+		_strsym_len;
+		str_cat;
+		str_empty_string;
+		str_printf;
+		str_vprintf;
+
+		# synch
+		mxinit;
+		mxdestroy;
+		mxlock;
+		mxunlock;
+		rwinit;
+		rwdestroy;
+		rwlock;
+		rwunlock;
+		condinit;
+		conddestroy;
+		condwait;
+		condreltimedwait;
+		condsig;
+		condbcast;
+		barrierinit;
+		barrierdestroy;
+		barrierwait;
+
+		# taskq
+		taskq_create_fixed;
+		taskq_destroy;
+		taskq_dispatch;
+		taskq_wait;
+
+		# tree
+		tree_destroy_nodes;
+		tree_find;
+		tree_first;
+		tree_last;
+		tree_next;
+		tree_prev;
+		tree_swap;
+
+		# unicode
+		utf8_to_utf32;
+		utf32_to_utf8;
+
+		# uuid
+		xdr_xuuid;
+		xuuid_clear;
+		xuuid_compare;
+		xuuid_generate;
+		xuuid_parse;
+		xuuid_unparse;
+
+		# val
+		__val_typename;
+		val_dump_file;
+		val_free;
+		val_alloc_array;
+		val_alloc_array_dup;
+		val_alloc_array_static;
+		val_alloc_blob;
+		val_alloc_blob_dup;
+		val_alloc_blob_static;
+		val_alloc_bool;
+		val_alloc_char;
+		val_alloc_cons;
+		val_alloc_int;
+		val_alloc_null;
+		val_alloc_nvl;
+		val_empty_cons;
+		val_pack;
+		val_size;
+		val_unpack;
+
+		# urldecode
+		urldecode;
+		urldecode_str;
+
+		# version
+		jeffpc_hgrev;
+		jeffpc_hgrev_binary;
+		jeffpc_version;
+
+	local:
+		*;
+};