Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: Don't include "config.h" unless needed. #1761

Merged
merged 1 commit into from
Dec 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions toxav/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013-2015 Tox project.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */

#include "audio.h"

#include <stdlib.h>
Expand Down
4 changes: 0 additions & 4 deletions toxav/bwcontroller.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013-2015 Tox project.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */

#include "bwcontroller.h"

#include <assert.h>
Expand Down
4 changes: 0 additions & 4 deletions toxav/groupav.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2014 Tox project.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */

#include "groupav.h"

#include <stdlib.h>
Expand Down
4 changes: 0 additions & 4 deletions toxav/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013-2015 Tox project.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */

#include "msi.h"

#include "../toxcore/logger.h"
Expand Down
4 changes: 0 additions & 4 deletions toxav/rtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013-2015 Tox project.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */

#include "rtp.h"

#include <assert.h>
Expand Down
4 changes: 0 additions & 4 deletions toxav/toxav.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013-2015 Tox project.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */

#include "toxav.h"

#include "msi.h"
Expand Down
4 changes: 0 additions & 4 deletions toxav/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013-2015 Tox project.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */

#include "video.h"

#include <assert.h>
Expand Down
4 changes: 0 additions & 4 deletions toxcore/DHT.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
/*
* An implementation of the DHT as seen in docs/updates/DHT.md
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "DHT.h"

#include "LAN_discovery.h"
Expand Down
4 changes: 0 additions & 4 deletions toxcore/LAN_discovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
/*
* LAN discovery implementation.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "LAN_discovery.h"

#include <string.h>
Expand Down
4 changes: 0 additions & 4 deletions toxcore/Messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
/*
* An implementation of a simple text chat only messenger on the tox network core.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "Messenger.h"

#include <assert.h>
Expand Down
4 changes: 0 additions & 4 deletions toxcore/TCP_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
/*
* Implementation of the TCP relay client part of Tox.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "TCP_client.h"

#include <stdio.h>
Expand Down
4 changes: 0 additions & 4 deletions toxcore/TCP_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
/*
* Handles TCP relay connections between two Tox clients.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "TCP_connection.h"

#include <assert.h>
Expand Down
4 changes: 0 additions & 4 deletions toxcore/TCP_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
/*
* Implementation of the TCP relay server part of Tox.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "TCP_server.h"

#include <stdlib.h>
Expand Down
4 changes: 0 additions & 4 deletions toxcore/crypto_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
*
* NOTE: This code has to be perfect. We don't mess around with encryption.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "crypto_core.h"

#include <stdlib.h>
Expand Down
4 changes: 0 additions & 4 deletions toxcore/friend_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
/*
* Connection to friends.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "friend_connection.h"

#include <stdlib.h>
Expand Down
4 changes: 0 additions & 4 deletions toxcore/friend_requests.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
/*
* Handle friend requests.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "friend_requests.h"

#include <stdlib.h>
Expand Down
4 changes: 0 additions & 4 deletions toxcore/group.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
/*
* Slightly better groupchats implementation.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "group.h"

#include <assert.h>
Expand Down
4 changes: 0 additions & 4 deletions toxcore/list.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
* -Allows for finding ids associated with data such as IPs or public keys in a short time
* -Should only be used if there are relatively few add/remove calls to the list
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "list.h"

#include <stdbool.h>
Expand Down
4 changes: 0 additions & 4 deletions toxcore/logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
/*
* Text logging abstraction.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "logger.h"

#include <assert.h>
Expand Down
4 changes: 0 additions & 4 deletions toxcore/net_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
*
* NOTE: This code has to be perfect. We don't mess around with encryption.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "net_crypto.h"

#include <math.h>
Expand Down
4 changes: 0 additions & 4 deletions toxcore/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
/*
* Functions for the core networking.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#ifdef __APPLE__
#define _DARWIN_C_SOURCE
#endif
Expand Down
4 changes: 0 additions & 4 deletions toxcore/onion.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
/*
* Implementation of the onion part of docs/Prevent_Tracking.txt
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "onion.h"

#include <stdlib.h>
Expand Down
4 changes: 0 additions & 4 deletions toxcore/onion_announce.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
/*
* Implementation of the announce part of docs/Prevent_Tracking.txt
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "onion_announce.h"

#include <stdlib.h>
Expand Down
4 changes: 0 additions & 4 deletions toxcore/onion_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
* Implementation of the client part of docs/Prevent_Tracking.txt (The part that
* uses the onion stuff to connect to the friend)
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "onion_client.h"

#include <stdlib.h>
Expand Down
4 changes: 0 additions & 4 deletions toxcore/ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
/*
* Buffered pinging using cyclic arrays.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "ping.h"

#include <stdlib.h>
Expand Down
4 changes: 0 additions & 4 deletions toxcore/ping_array.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
/*
* Implementation of an efficient array to store that we pinged something.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "ping_array.h"

#include <stdlib.h>
Expand Down
4 changes: 0 additions & 4 deletions toxcore/tox.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
/*
* The Tox public API.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#ifndef __cplusplus
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 600
Expand Down
4 changes: 0 additions & 4 deletions toxcore/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
/*
* Utilities.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 600
#endif
Expand Down