From 6b75f8b8893137dbb2612619b02c826d5bd40feb Mon Sep 17 00:00:00 2001 From: iphydf Date: Wed, 15 Dec 2021 10:26:50 +0000 Subject: [PATCH] chore: Remove config.h. This aligns the autotools build with the cmake build, which doesn't have a config.h file. It also removes the ambiguity of config.h and other/bootstrap_daemon/src/config.h. --- auto_tests/TCP_test.c | 4 ---- auto_tests/bootstrap_test.c | 4 ---- auto_tests/conference_av_test.c | 4 ---- auto_tests/conference_double_invite_test.c | 4 ---- auto_tests/conference_invite_merge_test.c | 4 ---- auto_tests/conference_peer_nick_test.c | 4 ---- auto_tests/conference_simple_test.c | 4 ---- auto_tests/conference_test.c | 4 ---- auto_tests/conference_two_test.c | 4 ---- auto_tests/crypto_test.c | 4 ---- auto_tests/dht_test.c | 4 ---- auto_tests/encryptsave_test.c | 4 ---- auto_tests/file_saving_test.c | 4 ---- auto_tests/file_transfer_test.c | 4 ---- auto_tests/friend_connection_test.c | 4 ---- auto_tests/friend_request_test.c | 4 ---- auto_tests/invalid_tcp_proxy_test.c | 4 ---- auto_tests/invalid_udp_proxy_test.c | 4 ---- auto_tests/lan_discovery_test.c | 4 ---- auto_tests/lossless_packet_test.c | 4 ---- auto_tests/lossy_packet_test.c | 4 ---- auto_tests/messenger_test.c | 4 ---- auto_tests/network_test.c | 4 ---- auto_tests/onion_test.c | 4 ---- auto_tests/overflow_recvq_test.c | 4 ---- auto_tests/overflow_sendq_test.c | 4 ---- auto_tests/reconnect_test.c | 4 ---- auto_tests/save_friend_test.c | 4 ---- auto_tests/save_load_test.c | 4 ---- auto_tests/send_message_test.c | 4 ---- auto_tests/set_name_test.c | 4 ---- auto_tests/set_status_message_test.c | 4 ---- auto_tests/skeleton_test.c | 4 ---- auto_tests/tcp_relay_test.c | 4 ---- auto_tests/tox_many_tcp_test.c | 4 ---- auto_tests/tox_many_test.c | 4 ---- auto_tests/tox_one_test.c | 4 ---- auto_tests/tox_strncasecmp_test.c | 4 ---- auto_tests/toxav_basic_test.c | 4 ---- auto_tests/toxav_many_test.c | 4 ---- auto_tests/typing_test.c | 4 ---- auto_tests/version_test.c | 4 ---- configure.ac | 1 - testing/misc_tools.c | 4 ---- toxcore/crypto_core.c | 6 ------ toxcore/crypto_core_mem.c | 5 ----- toxcore/network.c | 5 ----- toxencryptsave/toxencryptsave.c | 6 ------ 48 files changed, 195 deletions(-) diff --git a/auto_tests/TCP_test.c b/auto_tests/TCP_test.c index e2a666ec..8e7bdcd3 100644 --- a/auto_tests/TCP_test.c +++ b/auto_tests/TCP_test.c @@ -1,7 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include diff --git a/auto_tests/bootstrap_test.c b/auto_tests/bootstrap_test.c index bc2692cf..09018134 100644 --- a/auto_tests/bootstrap_test.c +++ b/auto_tests/bootstrap_test.c @@ -1,7 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include "../testing/misc_tools.h" diff --git a/auto_tests/conference_av_test.c b/auto_tests/conference_av_test.c index d76e0f24..bf4adfe8 100644 --- a/auto_tests/conference_av_test.c +++ b/auto_tests/conference_av_test.c @@ -1,10 +1,6 @@ /* Auto Tests: Conferences AV. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/conference_double_invite_test.c b/auto_tests/conference_double_invite_test.c index c9e64e5b..0e13fca8 100644 --- a/auto_tests/conference_double_invite_test.c +++ b/auto_tests/conference_double_invite_test.c @@ -1,7 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include diff --git a/auto_tests/conference_invite_merge_test.c b/auto_tests/conference_invite_merge_test.c index 21445525..0e285c1e 100644 --- a/auto_tests/conference_invite_merge_test.c +++ b/auto_tests/conference_invite_merge_test.c @@ -1,7 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/conference_peer_nick_test.c b/auto_tests/conference_peer_nick_test.c index 749f9098..1ab85778 100644 --- a/auto_tests/conference_peer_nick_test.c +++ b/auto_tests/conference_peer_nick_test.c @@ -1,7 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include diff --git a/auto_tests/conference_simple_test.c b/auto_tests/conference_simple_test.c index dadd7d62..9dafd862 100644 --- a/auto_tests/conference_simple_test.c +++ b/auto_tests/conference_simple_test.c @@ -1,7 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include diff --git a/auto_tests/conference_test.c b/auto_tests/conference_test.c index 11a7bb06..ac1bdaa8 100644 --- a/auto_tests/conference_test.c +++ b/auto_tests/conference_test.c @@ -1,10 +1,6 @@ /* Auto Tests: Conferences. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/conference_two_test.c b/auto_tests/conference_two_test.c index 00c2d940..4509fbe4 100644 --- a/auto_tests/conference_two_test.c +++ b/auto_tests/conference_two_test.c @@ -3,10 +3,6 @@ // This test triggers a different code path than if we only allocate a single // conference. This is the simplest test possible that triggers it. -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include "../testing/misc_tools.h" #include "../toxcore/tox.h" #include "check_compat.h" diff --git a/auto_tests/crypto_test.c b/auto_tests/crypto_test.c index 5226f9e4..8587020a 100644 --- a/auto_tests/crypto_test.c +++ b/auto_tests/crypto_test.c @@ -1,7 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/dht_test.c b/auto_tests/dht_test.c index c8aaa18c..13f867ce 100644 --- a/auto_tests/dht_test.c +++ b/auto_tests/dht_test.c @@ -1,7 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include "check_compat.h" #include "../testing/misc_tools.h" #include "../toxcore/crypto_core.h" diff --git a/auto_tests/encryptsave_test.c b/auto_tests/encryptsave_test.c index ccb1ee88..c764b3d5 100644 --- a/auto_tests/encryptsave_test.c +++ b/auto_tests/encryptsave_test.c @@ -1,7 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/file_saving_test.c b/auto_tests/file_saving_test.c index 871afd0b..09031dee 100644 --- a/auto_tests/file_saving_test.c +++ b/auto_tests/file_saving_test.c @@ -8,10 +8,6 @@ * works correctly. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/file_transfer_test.c b/auto_tests/file_transfer_test.c index ac1b046c..52f84973 100644 --- a/auto_tests/file_transfer_test.c +++ b/auto_tests/file_transfer_test.c @@ -1,10 +1,6 @@ /* File transfer test. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/friend_connection_test.c b/auto_tests/friend_connection_test.c index 55a930e2..6365df09 100644 --- a/auto_tests/friend_connection_test.c +++ b/auto_tests/friend_connection_test.c @@ -5,10 +5,6 @@ * features. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include typedef struct State { diff --git a/auto_tests/friend_request_test.c b/auto_tests/friend_request_test.c index b13c6a64..fa71b6bf 100644 --- a/auto_tests/friend_request_test.c +++ b/auto_tests/friend_request_test.c @@ -1,10 +1,6 @@ /* Tests that we can add friends. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/invalid_tcp_proxy_test.c b/auto_tests/invalid_tcp_proxy_test.c index 45290a43..1b8afa97 100644 --- a/auto_tests/invalid_tcp_proxy_test.c +++ b/auto_tests/invalid_tcp_proxy_test.c @@ -1,10 +1,6 @@ // Test to make sure that when UDP is disabled, and we set an invalid proxy, // i.e. one that doesn't run a proxy server, then we don't get any connection. -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include "../testing/misc_tools.h" diff --git a/auto_tests/invalid_udp_proxy_test.c b/auto_tests/invalid_udp_proxy_test.c index 1e84e451..5bb8667c 100644 --- a/auto_tests/invalid_udp_proxy_test.c +++ b/auto_tests/invalid_udp_proxy_test.c @@ -1,10 +1,6 @@ // Test that if UDP is enabled, and a proxy is provided that does not support // UDP proxying, we disable UDP. -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include "../testing/misc_tools.h" diff --git a/auto_tests/lan_discovery_test.c b/auto_tests/lan_discovery_test.c index 69bf8e31..38d41359 100644 --- a/auto_tests/lan_discovery_test.c +++ b/auto_tests/lan_discovery_test.c @@ -1,7 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include diff --git a/auto_tests/lossless_packet_test.c b/auto_tests/lossless_packet_test.c index 1b6de806..63302d67 100644 --- a/auto_tests/lossless_packet_test.c +++ b/auto_tests/lossless_packet_test.c @@ -1,10 +1,6 @@ /* Tests that we can send lossless packets. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/lossy_packet_test.c b/auto_tests/lossy_packet_test.c index 5080b006..c4ca213d 100644 --- a/auto_tests/lossy_packet_test.c +++ b/auto_tests/lossy_packet_test.c @@ -1,10 +1,6 @@ /* Tests that we can send lossy packets. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/messenger_test.c b/auto_tests/messenger_test.c index e885e652..db8de65a 100644 --- a/auto_tests/messenger_test.c +++ b/auto_tests/messenger_test.c @@ -10,10 +10,6 @@ * checking that status changes are received, messages can be sent, etc. * All of that is done in a separate test, with two local clients running. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #ifdef VANILLA_NACL diff --git a/auto_tests/network_test.c b/auto_tests/network_test.c index 25997090..29425337 100644 --- a/auto_tests/network_test.c +++ b/auto_tests/network_test.c @@ -1,7 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include diff --git a/auto_tests/onion_test.c b/auto_tests/onion_test.c index 2b37f676..b0908ce6 100644 --- a/auto_tests/onion_test.c +++ b/auto_tests/onion_test.c @@ -1,7 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include diff --git a/auto_tests/overflow_recvq_test.c b/auto_tests/overflow_recvq_test.c index 205dbb11..92e633ca 100644 --- a/auto_tests/overflow_recvq_test.c +++ b/auto_tests/overflow_recvq_test.c @@ -1,10 +1,6 @@ /* Try to overflow the net_crypto packet buffer. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include typedef struct State { diff --git a/auto_tests/overflow_sendq_test.c b/auto_tests/overflow_sendq_test.c index 9601c876..2c02ba05 100644 --- a/auto_tests/overflow_sendq_test.c +++ b/auto_tests/overflow_sendq_test.c @@ -1,10 +1,6 @@ /* Try to overflow the net_crypto packet buffer. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include typedef struct State { diff --git a/auto_tests/reconnect_test.c b/auto_tests/reconnect_test.c index 9ccceb39..a0245ff5 100644 --- a/auto_tests/reconnect_test.c +++ b/auto_tests/reconnect_test.c @@ -5,10 +5,6 @@ * re-established when the instance is resumed. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/save_friend_test.c b/auto_tests/save_friend_test.c index 210dd2bf..110ad2bf 100644 --- a/auto_tests/save_friend_test.c +++ b/auto_tests/save_friend_test.c @@ -1,10 +1,6 @@ /* Auto Tests: Save and load friends. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/save_load_test.c b/auto_tests/save_load_test.c index 42652e47..5dee55bc 100644 --- a/auto_tests/save_load_test.c +++ b/auto_tests/save_load_test.c @@ -1,10 +1,6 @@ /* Tests that we can save and load Tox data. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/send_message_test.c b/auto_tests/send_message_test.c index 8e41006b..42c07bdf 100644 --- a/auto_tests/send_message_test.c +++ b/auto_tests/send_message_test.c @@ -1,10 +1,6 @@ /* Tests that we can send messages to friends. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/set_name_test.c b/auto_tests/set_name_test.c index be1df311..384e22a8 100644 --- a/auto_tests/set_name_test.c +++ b/auto_tests/set_name_test.c @@ -1,10 +1,6 @@ /* Tests that we can set our name. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/set_status_message_test.c b/auto_tests/set_status_message_test.c index aab78106..19e50a1f 100644 --- a/auto_tests/set_status_message_test.c +++ b/auto_tests/set_status_message_test.c @@ -1,10 +1,6 @@ /* Tests that we can set our status message */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/skeleton_test.c b/auto_tests/skeleton_test.c index 30fb185c..4404940a 100644 --- a/auto_tests/skeleton_test.c +++ b/auto_tests/skeleton_test.c @@ -1,7 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include "../testing/misc_tools.h" diff --git a/auto_tests/tcp_relay_test.c b/auto_tests/tcp_relay_test.c index b904055d..6f1ca434 100644 --- a/auto_tests/tcp_relay_test.c +++ b/auto_tests/tcp_relay_test.c @@ -1,7 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include "../testing/misc_tools.h" diff --git a/auto_tests/tox_many_tcp_test.c b/auto_tests/tox_many_tcp_test.c index c1bf522b..92757041 100644 --- a/auto_tests/tox_many_tcp_test.c +++ b/auto_tests/tox_many_tcp_test.c @@ -1,10 +1,6 @@ /* Auto Tests: Many TCP. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/tox_many_test.c b/auto_tests/tox_many_test.c index 59ade859..7381ced5 100644 --- a/auto_tests/tox_many_test.c +++ b/auto_tests/tox_many_test.c @@ -1,10 +1,6 @@ /* Auto Tests: Many clients. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/tox_one_test.c b/auto_tests/tox_one_test.c index 2a280778..ebfe46fe 100644 --- a/auto_tests/tox_one_test.c +++ b/auto_tests/tox_one_test.c @@ -1,10 +1,6 @@ /* Auto Tests: One instance. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include diff --git a/auto_tests/tox_strncasecmp_test.c b/auto_tests/tox_strncasecmp_test.c index 7209facf..1b29d4cb 100644 --- a/auto_tests/tox_strncasecmp_test.c +++ b/auto_tests/tox_strncasecmp_test.c @@ -1,7 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include diff --git a/auto_tests/toxav_basic_test.c b/auto_tests/toxav_basic_test.c index c7d5a98c..5522cc52 100644 --- a/auto_tests/toxav_basic_test.c +++ b/auto_tests/toxav_basic_test.c @@ -1,7 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/toxav_many_test.c b/auto_tests/toxav_many_test.c index fa7c66a4..34e11fb7 100644 --- a/auto_tests/toxav_many_test.c +++ b/auto_tests/toxav_many_test.c @@ -1,7 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/typing_test.c b/auto_tests/typing_test.c index 54577420..6ef3cbd1 100644 --- a/auto_tests/typing_test.c +++ b/auto_tests/typing_test.c @@ -1,10 +1,6 @@ /* Tests that our typing notifications work. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include diff --git a/auto_tests/version_test.c b/auto_tests/version_test.c index aa59fdd8..3f572fe6 100644 --- a/auto_tests/version_test.c +++ b/auto_tests/version_test.c @@ -1,7 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include "../toxcore/tox.h" #include "check_compat.h" diff --git a/configure.ac b/configure.ac index fb297682..6f25662d 100644 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,6 @@ AC_PREREQ([2.65]) AC_INIT([tox], [0.2.13]) AC_CONFIG_AUX_DIR(configure_aux) AC_CONFIG_SRCDIR([toxcore/net_crypto.c]) -AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([foreign 1.10 -Wall subdir-objects tar-ustar]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/testing/misc_tools.c b/testing/misc_tools.c index 7fb6e322..1ff75153 100644 --- a/testing/misc_tools.c +++ b/testing/misc_tools.c @@ -6,10 +6,6 @@ /* * Miscellaneous functions and data structures for doing random things. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #ifndef _POSIX_C_SOURCE // For nanosleep(). #define _POSIX_C_SOURCE 200112L diff --git a/toxcore/crypto_core.c b/toxcore/crypto_core.c index 5b4886b5..1f221338 100644 --- a/toxcore/crypto_core.c +++ b/toxcore/crypto_core.c @@ -3,12 +3,6 @@ * Copyright © 2013 Tox project. */ -//!TOKSTYLE- -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -//!TOKSTYLE+ - /* * Functions for the core crypto. * diff --git a/toxcore/crypto_core_mem.c b/toxcore/crypto_core_mem.c index eccb5f3e..a8298af1 100644 --- a/toxcore/crypto_core_mem.c +++ b/toxcore/crypto_core_mem.c @@ -16,11 +16,6 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -//!TOKSTYLE- -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -//!TOKSTYLE+ // For explicit_bzero. #ifndef _DEFAULT_SOURCE diff --git a/toxcore/network.c b/toxcore/network.c index e89de0bf..6d7209b2 100644 --- a/toxcore/network.c +++ b/toxcore/network.c @@ -2,11 +2,6 @@ * Copyright © 2016-2018 The TokTok team. * Copyright © 2013 Tox project. */ -//!TOKSTYLE- -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -//!TOKSTYLE+ /* * Functions for the core networking. diff --git a/toxencryptsave/toxencryptsave.c b/toxencryptsave/toxencryptsave.c index 81f0002f..7e6db4c8 100644 --- a/toxencryptsave/toxencryptsave.c +++ b/toxencryptsave/toxencryptsave.c @@ -6,12 +6,6 @@ /* * Batch encryption functions. */ -//!TOKSTYLE- -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -//!TOKSTYLE+ - #include "../toxcore/ccompat.h" #include "../toxcore/crypto_core.h" #include "defines.h"