Remove unecessary relative paths when including headers. (#11124)

Currently, we add the repository's top-level dir in the compiler's
header search path. This means that code in every top-level directory
within the repo can include headers sibling top-level directories.

This patch makes header inclusion consistent when it comes to files
that are included from sibling top-level directories within the repo.
This commit is contained in:
vkalintiris 2021-05-24 17:44:50 +03:00 committed by GitHub
parent 277e4f10bc
commit b8cd2bdc50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
69 changed files with 84 additions and 84 deletions

View File

@ -6,7 +6,7 @@ typedef struct aclk_rrdhost_state {
char *claimed_id; // Claimed ID if host has one otherwise NULL
} aclk_rrdhost_state;
#include "../daemon/common.h"
#include "daemon/common.h"
#include "aclk_util.h"
// version for aclk legacy (old cloud arch)

View File

@ -3,9 +3,9 @@
#include "aclk_otp.h"
#include "../daemon/common.h"
#include "daemon/common.h"
#include "../mqtt_websockets/c-rbuf/include/ringbuffer.h"
#include "mqtt_websockets/c-rbuf/include/ringbuffer.h"
// CentOS 7 has older version that doesn't define this
// same goes for MacOS

View File

@ -3,7 +3,7 @@
#ifndef ACLK_OTP_H
#define ACLK_OTP_H
#include "../daemon/common.h"
#include "daemon/common.h"
#include "https_client.h"

View File

@ -4,7 +4,7 @@
#define NETDATA_ACLK_QUERY_QUEUE_H
#include "libnetdata/libnetdata.h"
#include "../daemon/common.h"
#include "daemon/common.h"
typedef enum {
UNKNOWN,

View File

@ -5,7 +5,7 @@
#ifndef ACLK_RX_MSGS_H
#define ACLK_RX_MSGS_H
#include "../daemon/common.h"
#include "daemon/common.h"
#include "libnetdata/libnetdata.h"
int aclk_handle_cloud_message(char *payload);

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_ACLK_STATS_H
#define NETDATA_ACLK_STATS_H
#include "../daemon/common.h"
#include "daemon/common.h"
#include "libnetdata/libnetdata.h"
#define ACLK_STATS_THREAD_NAME "ACLK_Stats"

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "aclk_tx_msgs.h"
#include "../daemon/common.h"
#include "daemon/common.h"
#include "aclk_util.h"
#include "aclk_stats.h"

View File

@ -4,7 +4,7 @@
#include <json-c/json.h>
#include "libnetdata/libnetdata.h"
#include "../daemon/common.h"
#include "daemon/common.h"
#include "mqtt_wss_client.h"
void aclk_send_info_metadata(mqtt_wss_client client, int metadata_submitted, RRDHOST *host);

View File

@ -4,7 +4,7 @@
#include <stdio.h>
#include "../daemon/common.h"
#include "daemon/common.h"
// CentOS 7 has older version that doesn't define this
// same goes for MacOS

View File

@ -4,7 +4,7 @@
#include "https_client.h"
#include "../mqtt_websockets/c-rbuf/include/ringbuffer.h"
#include "mqtt_websockets/c-rbuf/include/ringbuffer.h"
enum http_parse_state {
HTTP_PARSE_INITIAL = 0,

View File

@ -1,6 +1,6 @@
#include "aclk_common.h"
#include "../../daemon/common.h"
#include "daemon/common.h"
#ifdef ENABLE_ACLK
#include <libwebsockets.h>

View File

@ -2,7 +2,7 @@
#define ACLK_COMMON_H
#include "aclk_rrdhost_state.h"
#include "../../daemon/common.h"
#include "daemon/common.h"
extern netdata_mutex_t aclk_shared_state_mutex;
#define ACLK_SHARED_STATE_LOCK netdata_mutex_lock(&aclk_shared_state_mutex)

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_LWS_HTTPS_CLIENT_H
#define NETDATA_LWS_HTTPS_CLIENT_H
#include "../../daemon/common.h"
#include "daemon/common.h"
#include "libnetdata/libnetdata.h"
#define DATAMAXLEN 1024*16

View File

@ -3,7 +3,7 @@
#include "aclk_lws_wss_client.h"
#include "libnetdata/libnetdata.h"
#include "../../daemon/common.h"
#include "daemon/common.h"
#include "aclk_common.h"
#include "aclk_stats.h"

View File

@ -1,7 +1,7 @@
#ifndef ACLK_RRDHOST_STATE_H
#define ACLK_RRDHOST_STATE_H
#include "../../libnetdata/libnetdata.h"
#include "libnetdata/libnetdata.h"
typedef enum aclk_cmd {
ACLK_CMD_CLOUD,

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_ACLK_RX_MSGS_H
#define NETDATA_ACLK_RX_MSGS_H
#include "../../daemon/common.h"
#include "daemon/common.h"
#include "libnetdata/libnetdata.h"
int aclk_handle_cloud_message(char *payload);

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_ACLK_STATS_H
#define NETDATA_ACLK_STATS_H
#include "../../daemon/common.h"
#include "daemon/common.h"
#include "libnetdata/libnetdata.h"
#include "aclk_common.h"

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_AGENT_CLOUD_LINK_H
#define NETDATA_AGENT_CLOUD_LINK_H
#include "../../daemon/common.h"
#include "daemon/common.h"
#include "mqtt.h"
#include "aclk_common.h"

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include <libnetdata/json/json.h>
#include "../../daemon/common.h"
#include "daemon/common.h"
#include "mqtt.h"
#include "aclk_lws_wss_client.h"
#include "aclk_stats.h"

View File

@ -1,11 +1,11 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "claim.h"
#include "../registry/registry_internals.h"
#include "registry/registry_internals.h"
#ifndef ACLK_NG
#include "../aclk/legacy/aclk_common.h"
#include "aclk/legacy/aclk_common.h"
#else
#include "../aclk/aclk.h"
#include "aclk/aclk.h"
#endif
char *claiming_pending_arguments = NULL;

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_CLAIM_H
#define NETDATA_CLAIM_H 1
#include "../daemon/common.h"
#include "daemon/common.h"
extern char *claiming_pending_arguments;
extern struct config cloud_config;

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "cli.h"
#include "../libnetdata/required_dummies.h"
#include "libnetdata/required_dummies.h"
static uv_pipe_t client_pipe;
static uv_write_t write_req;
@ -198,4 +198,4 @@ int main(int argc, char **argv)
uv_close((uv_handle_t *)&client_pipe, NULL);
return exit_status;
}
}

View File

@ -3,6 +3,6 @@
#ifndef NETDATA_CLI_H
#define NETDATA_CLI_H 1
#include "../daemon/common.h"
#include "daemon/common.h"
#endif //NETDATA_CLI_H

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_ALL_H
#define NETDATA_ALL_H 1
#include "../daemon/common.h"
#include "daemon/common.h"
// netdata internal data collection plugins

View File

@ -6,7 +6,7 @@
* Released under GPL v3+
*/
#include "../../libnetdata/libnetdata.h"
#include "libnetdata/libnetdata.h"
// ----------------------------------------------------------------------------

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_SYS_FS_CGROUP_H
#define NETDATA_SYS_FS_CGROUP_H 1
#include "../../daemon/common.h"
#include "daemon/common.h"
#if (TARGET_OS == OS_LINUX)

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_PLUGIN_CHECKS_H
#define NETDATA_PLUGIN_CHECKS_H 1
#include "../../daemon/common.h"
#include "daemon/common.h"
#ifdef NETDATA_INTERNAL_CHECKS

View File

@ -6,7 +6,7 @@
* Released under GPL v3+
*/
#include "../../libnetdata/libnetdata.h"
#include "libnetdata/libnetdata.h"
#include <cups/cups.h>
#include <limits.h>

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_PLUGIN_PROC_DISKSPACE_H
#define NETDATA_PLUGIN_PROC_DISKSPACE_H
#include "../../daemon/common.h"
#include "daemon/common.h"
#if (TARGET_OS == OS_LINUX)

View File

@ -15,7 +15,7 @@
* UCRL-CODE-222073
*/
#include "../../libnetdata/libnetdata.h"
#include "libnetdata/libnetdata.h"
#include <stdio.h>
#include <stdlib.h>

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_PLUGIN_IDLEJITTER_H
#define NETDATA_PLUGIN_IDLEJITTER_H 1
#include "../../daemon/common.h"
#include "daemon/common.h"
#define NETDATA_PLUGIN_HOOK_IDLEJITTER \
{ \

View File

@ -4,7 +4,7 @@
#ifndef NETDATA_PLUGIN_MACOS_H
#define NETDATA_PLUGIN_MACOS_H 1
#include "../../daemon/common.h"
#include "daemon/common.h"
#if (TARGET_OS == OS_MACOS)

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "../../libnetdata/libnetdata.h"
#include "libnetdata/libnetdata.h"
#include <linux/netfilter/nfnetlink_conntrack.h>
#include <libmnl/libmnl.h>
#include <libnetfilter_acct/libnetfilter_acct.h>

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "../../libnetdata/libnetdata.h"
#include "libnetdata/libnetdata.h"
#include <linux/perf_event.h>

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_PLUGINS_D_H
#define NETDATA_PLUGINS_D_H 1
#include "../../daemon/common.h"
#include "daemon/common.h"
#define NETDATA_PLUGIN_HOOK_PLUGINSD \
{ \

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_PLUGINSD_PARSER_H
#define NETDATA_PLUGINSD_PARSER_H
#include "../../parser/parser.h"
#include "parser/parser.h"
typedef struct parser_user_object {

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_PLUGIN_PROC_H
#define NETDATA_PLUGIN_PROC_H 1
#include "../../daemon/common.h"
#include "daemon/common.h"
#if (TARGET_OS == OS_LINUX)

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_ZFS_COMMON_H
#define NETDATA_ZFS_COMMON_H 1
#include "../../daemon/common.h"
#include "daemon/common.h"
#define ZFS_FAMILY_SIZE "size"
#define ZFS_FAMILY_EFFICIENCY "efficiency"

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_STATSD_H
#define NETDATA_STATSD_H 1
#include "../../daemon/common.h"
#include "daemon/common.h"
#define STATSD_LISTEN_PORT 8125
#define STATSD_LISTEN_BACKLOG 4096

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_PLUGIN_TC_H
#define NETDATA_PLUGIN_TC_H 1
#include "../../daemon/common.h"
#include "daemon/common.h"
#if (TARGET_OS == OS_LINUX)

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_PLUGIN_TIMEX_H
#define NETDATA_PLUGIN_TIMEX_H
#include "../../daemon/common.h"
#include "daemon/common.h"
#if (TARGET_OS == OS_LINUX)

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "../../libnetdata/libnetdata.h"
#include "libnetdata/libnetdata.h"
#include <xenstat.h>
#include <libxl.h>

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_ANALYTICS_H
#define NETDATA_ANALYTICS_H 1
#include "../daemon/common.h"
#include "daemon/common.h"
/* Max number of seconds before the first META analytics is sent */
#define ANALYTICS_INIT_SLEEP_SEC 120

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "common.h"
#include "../database/engine/rrdenginelib.h"
#include "database/engine/rrdenginelib.h"
static uv_thread_t thread;
static uv_loop_t* loop;

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_COMMON_H
#define NETDATA_COMMON_H 1
#include "../libnetdata/libnetdata.h"
#include "libnetdata/libnetdata.h"
// ----------------------------------------------------------------------------
// shortcuts for the default netdata configuration

View File

@ -3,9 +3,9 @@
#ifndef NETDATA_METALOGPLUGINSD_H
#define NETDATA_METALOGPLUGINSD_H
#include "../../../collectors/plugins.d/pluginsd_parser.h"
#include "../../../collectors/plugins.d/plugins_d.h"
#include "../../../parser/parser.h"
#include "collectors/plugins.d/pluginsd_parser.h"
#include "collectors/plugins.d/plugins_d.h"
#include "parser/parser.h"
struct metalog_pluginsd_state {
struct metalog_instance *ctx;

View File

@ -11,7 +11,7 @@
#include <Judy.h>
#include <openssl/sha.h>
#include <openssl/evp.h>
#include "../../daemon/common.h"
#include "daemon/common.h"
#include "../rrd.h"
#include "rrddiskprotocol.h"
#include "rrdenginelib.h"

View File

@ -26,17 +26,17 @@ struct rrdengine_instance;
struct pg_cache_page_index;
#endif
#include "../daemon/common.h"
#include "daemon/common.h"
#include "web/api/queries/query.h"
#include "rrdvar.h"
#include "rrdsetvar.h"
#include "rrddimvar.h"
#include "rrdcalc.h"
#include "rrdcalctemplate.h"
#include "../streaming/rrdpush.h"
#include "streaming/rrdpush.h"
#ifndef ACLK_NG
#include "../aclk/legacy/aclk_rrdhost_state.h"
#include "aclk/legacy/aclk_rrdhost_state.h"
#else
#include "aclk/aclk.h"
#endif

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_SQLITE_FUNCTIONS_H
#define NETDATA_SQLITE_FUNCTIONS_H
#include "../../daemon/common.h"
#include "daemon/common.h"
#include "sqlite3.h"
// return a node list

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_HEALTH_H
#define NETDATA_HEALTH_H 1
#include "../daemon/common.h"
#include "daemon/common.h"
#define NETDATA_PLUGIN_HOOK_HEALTH \
{ \

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_INCREMENTAL_PARSER_H
#define NETDATA_INCREMENTAL_PARSER_H 1
#include "../daemon/common.h"
#include "daemon/common.h"
#define PARSER_MAX_CALLBACKS 20
#define PARSER_MAX_RECOVER_KEYWORDS 128

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "../daemon/common.h"
#include "daemon/common.h"
#include "registry_internals.h"
#define REGISTRY_STATUS_OK "ok"

View File

@ -49,7 +49,7 @@
#ifndef NETDATA_REGISTRY_H
#define NETDATA_REGISTRY_H 1
#include "../daemon/common.h"
#include "daemon/common.h"
#define NETDATA_REGISTRY_COOKIE_NAME "netdata_registry_id"

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "../daemon/common.h"
#include "daemon/common.h"
#include "registry_internals.h"
int registry_db_should_be_saved(void) {

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "../daemon/common.h"
#include "daemon/common.h"
#include "registry_internals.h"
int registry_init(void) {

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "../daemon/common.h"
#include "daemon/common.h"
#include "registry_internals.h"
struct registry registry;

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "../daemon/common.h"
#include "daemon/common.h"
#include "registry_internals.h"
void registry_log(char action, REGISTRY_PERSON *p, REGISTRY_MACHINE *m, REGISTRY_URL *u, char *name) {

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "../daemon/common.h"
#include "daemon/common.h"
#include "registry_internals.h"
// ----------------------------------------------------------------------------

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "../daemon/common.h"
#include "daemon/common.h"
#include "registry_internals.h"
// ----------------------------------------------------------------------------

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "../daemon/common.h"
#include "daemon/common.h"
#include "registry_internals.h"
// ----------------------------------------------------------------------------

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "spawn.h"
#include "../database/engine/rrdenginelib.h"
#include "database/engine/rrdenginelib.h"
static uv_thread_t thread;
int spawn_thread_error;

View File

@ -3,7 +3,7 @@
#ifndef NETDATA_SPAWN_H
#define NETDATA_SPAWN_H 1
#include "../daemon/common.h"
#include "daemon/common.h"
#define SPAWN_SERVER_COMMAND_LINE_ARGUMENT "--special-spawn-server"

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "spawn.h"
#include "../database/engine/rrdenginelib.h"
#include "database/engine/rrdenginelib.h"
static uv_process_t process;
static uv_pipe_t spawn_channel;

View File

@ -49,7 +49,7 @@ static void rrdpush_receiver_thread_cleanup(void *ptr) {
}
}
#include "../collectors/plugins.d/pluginsd_parser.h"
#include "collectors/plugins.d/pluginsd_parser.h"
PARSER_RC streaming_timestamp(char **words, void *user, PLUGINSD_ACTION *plugins_action)
{

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "rrdpush.h"
#include "../parser/parser.h"
#include "parser/parser.h"
/*
* rrdpush

View File

@ -3,8 +3,8 @@
#ifndef NETDATA_RRDPUSH_H
#define NETDATA_RRDPUSH_H 1
#include "../database/rrd.h"
#include "../libnetdata/libnetdata.h"
#include "database/rrd.h"
#include "libnetdata/libnetdata.h"
#include "web/server/web_client.h"
#include "daemon/common.h"

View File

@ -99,7 +99,7 @@ typedef struct rrdresult {
#define rrdr_rows(r) ((r)->rows)
#include "../../../database/rrd.h"
#include "database/rrd.h"
extern void rrdr_free(RRDR *r);
extern RRDR *rrdr_create(struct rrdset *st, long n, struct context_param *context_param_list);

View File

@ -1,9 +1,9 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "../../../libnetdata/libnetdata.h"
#include "../../../libnetdata/required_dummies.h"
#include "../../../database/rrd.h"
#include "../../../web/server/web_client.h"
#include "libnetdata/libnetdata.h"
#include "libnetdata/required_dummies.h"
#include "database/rrd.h"
#include "web/server/web_client.h"
#include <setjmp.h>
#include <cmocka.h>
#include <stdbool.h>

View File

@ -1,9 +1,9 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "../../../libnetdata/libnetdata.h"
#include "../../../libnetdata/required_dummies.h"
#include "../../../database/rrd.h"
#include "../../../web/server/web_client.h"
#include "libnetdata/libnetdata.h"
#include "libnetdata/required_dummies.h"
#include "database/rrd.h"
#include "web/server/web_client.h"
#include <setjmp.h>
#include <cmocka.h>
#include <stdbool.h>