summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-07-30 13:36:17 -0400
committerJune McEnroe <june@causal.agency>2020-07-30 13:36:17 -0400
commita142ebcf43b7032ad29a383cba9407e7540b2d4a (patch)
treeae53c39fe1f97b4b5cca890ad828cc6556ab697f
parentRemove use of strlcat (diff)
downloadcatgirl-a142ebcf43b7032ad29a383cba9407e7540b2d4a.tar.gz
catgirl-a142ebcf43b7032ad29a383cba9407e7540b2d4a.zip
Define explicit_bzero using memset_s on macOS
-rw-r--r--chat.h3
-rwxr-xr-xconfigure6
2 files changed, 6 insertions, 3 deletions
diff --git a/chat.h b/chat.h
index 1dfe119..fd8f81a 100644
--- a/chat.h
+++ b/chat.h
@@ -295,6 +295,3 @@ int getopt_config(
 	int argc, char *const *argv,
 	const char *optstring, const struct option *longopts, int *longindex
 );
-
-// Defined in libcrypto if missing from libc:
-void explicit_bzero(void *b, size_t len);
diff --git a/configure b/configure
index b11679d..8282dc7 100755
--- a/configure
+++ b/configure
@@ -45,6 +45,12 @@ case "$(uname)" in
 		config libcrypto libtls ncursesw
 		defvar OPENSSL_BIN openssl exec_prefix /bin/openssl
 		;;
+	(Darwin)
+		cflags -D__STDC_WANT_LIB_EXT1__=1
+		cflags "-D'explicit_bzero(b,l)=memset_s((b),(l),0,(l))'"
+		config libcrypto libtls ncursesw
+		defvar OPENSSL_BIN openssl exec_prefix /bin/openssl
+		;;
 	(*)
 		config libcrypto libtls ncursesw
 		defvar OPENSSL_BIN openssl exec_prefix /bin/openssl
l/commit/handle.c?h=twitch&id=9ccb25a1a5589be4091b684fbde9b83800fe1f6e&follow=1'>Fix /me formatting side-effectsJune McEnroe 2018-08-07Define ui.c BUF_LEN with enumJune McEnroe 2018-08-07Hack clang into checking uiFmt format stringsJune McEnroe 2018-08-07Handle PART and QUIT without messagesJune McEnroe 2018-08-07Make safe filling the who bufferJune McEnroe 2018-08-07Add reverse and reset IRC formatting codesJune McEnroe 2018-08-06Rewrite line editing again, add formattingJune McEnroe 2018-08-06Fix allocation size in vaswprintfJune McEnroe 2018-08-06Implement word wrappingJune McEnroe 2018-08-06Use wchar_t strings for all of UIJune McEnroe 2018-08-06Rename line editing functionsJune McEnroe 2018-08-05Initialize all possible color pairsJune McEnroe 2018-08-05Refactor color initializationJune McEnroe 2018-08-05Add ^L redrawJune McEnroe 2018-08-05Use 16 colors if availableJune McEnroe 2018-08-05Limit parsed colors to number of mIRC colorsJune McEnroe 2018-08-04Show source link on exitJune McEnroe 2018-08-04Implement line editing, scrollingJune McEnroe 2018-08-04Handle /topicJune McEnroe