diff --git a/configure.ac b/configure.ac index 954e1faf1..f5c92669e 100644 --- a/configure.ac +++ b/configure.ac @@ -85,7 +85,7 @@ AC_CONFIG_MACRO_DIR([third_party/nlbuild-autotools/repo/autoconf/m4]) # Tell autoconf what file the package is using to aggregate C preprocessor # defines. # -AC_CONFIG_HEADERS([include/openthread-config.h]) +AC_CONFIG_HEADERS([include/openthread-config-generic.h]) # # Figure out what the canonical build and host tuples are. diff --git a/examples/apps/cli/main.c b/examples/apps/cli/main.c index b98129ea4..54c6af306 100644 --- a/examples/apps/cli/main.c +++ b/examples/apps/cli/main.c @@ -26,11 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include diff --git a/examples/apps/ncp/main.c b/examples/apps/ncp/main.c index a3d434c5d..ffc63af89 100644 --- a/examples/apps/ncp/main.c +++ b/examples/apps/ncp/main.c @@ -26,11 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include diff --git a/examples/platforms/cc2538/alarm.c b/examples/platforms/cc2538/alarm.c index c5e729124..252f3ab0c 100644 --- a/examples/platforms/cc2538/alarm.c +++ b/examples/platforms/cc2538/alarm.c @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include #include diff --git a/examples/platforms/cc2538/diag.c b/examples/platforms/cc2538/diag.c index d270d2cbf..68f234b06 100644 --- a/examples/platforms/cc2538/diag.c +++ b/examples/platforms/cc2538/diag.c @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include #include diff --git a/examples/platforms/cc2538/flash.c b/examples/platforms/cc2538/flash.c index 243ab8ffe..dcf79413f 100644 --- a/examples/platforms/cc2538/flash.c +++ b/examples/platforms/cc2538/flash.c @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include "platform-cc2538.h" diff --git a/examples/platforms/cc2538/radio.c b/examples/platforms/cc2538/radio.c index 2f97ccd06..d203f1656 100644 --- a/examples/platforms/cc2538/radio.c +++ b/examples/platforms/cc2538/radio.c @@ -32,7 +32,7 @@ * */ -#include +#include #include #include #include diff --git a/examples/platforms/da15000/alarm.c b/examples/platforms/da15000/alarm.c index e651f065f..3c7389b60 100644 --- a/examples/platforms/da15000/alarm.c +++ b/examples/platforms/da15000/alarm.c @@ -31,11 +31,7 @@ * Platform abstraction for the alarm */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include #include diff --git a/examples/platforms/da15000/flash.c b/examples/platforms/da15000/flash.c index 9b77079bd..9164aaf98 100644 --- a/examples/platforms/da15000/flash.c +++ b/examples/platforms/da15000/flash.c @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include +#include #include #include diff --git a/examples/platforms/da15000/uart.c b/examples/platforms/da15000/uart.c index 3353deac9..23b9b8396 100644 --- a/examples/platforms/da15000/uart.c +++ b/examples/platforms/da15000/uart.c @@ -26,11 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include #include diff --git a/examples/platforms/efr32/alarm.c b/examples/platforms/efr32/alarm.c index 3aceb9be5..9406ad891 100644 --- a/examples/platforms/efr32/alarm.c +++ b/examples/platforms/efr32/alarm.c @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include #include diff --git a/examples/platforms/efr32/diag.c b/examples/platforms/efr32/diag.c index 3c930d97f..4c2db4591 100644 --- a/examples/platforms/efr32/diag.c +++ b/examples/platforms/efr32/diag.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include diff --git a/examples/platforms/efr32/flash.c b/examples/platforms/efr32/flash.c index 19709fe8b..a8bd52157 100644 --- a/examples/platforms/efr32/flash.c +++ b/examples/platforms/efr32/flash.c @@ -31,7 +31,7 @@ * This file implements the OpenThread platform abstraction for the non-volatile storage. */ -#include +#include #include #include "utils/code_utils.h" diff --git a/examples/platforms/efr32/logging.c b/examples/platforms/efr32/logging.c index 2a0f1c265..a9971ee56 100644 --- a/examples/platforms/efr32/logging.c +++ b/examples/platforms/efr32/logging.c @@ -32,11 +32,7 @@ * */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include #include diff --git a/examples/platforms/efr32/radio.c b/examples/platforms/efr32/radio.c index 22e496f27..cf3e5305d 100644 --- a/examples/platforms/efr32/radio.c +++ b/examples/platforms/efr32/radio.c @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include #include diff --git a/examples/platforms/emsk/flash.c b/examples/platforms/emsk/flash.c index 01c3b3620..890ede8f2 100644 --- a/examples/platforms/emsk/flash.c +++ b/examples/platforms/emsk/flash.c @@ -32,7 +32,7 @@ * */ -#include +#include #include "openthread/platform/alarm.h" #include #include diff --git a/examples/platforms/kw41z/logging.c b/examples/platforms/kw41z/logging.c index 94d9facd7..0e7c364a3 100644 --- a/examples/platforms/kw41z/logging.c +++ b/examples/platforms/kw41z/logging.c @@ -35,12 +35,7 @@ #include #include "fsl_device_registers.h" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif - +#include #include "openthread/platform/logging.h" #if OPENTHREAD_ENABLE_CLI_LOGGING diff --git a/examples/platforms/nrf52840/alarm.c b/examples/platforms/nrf52840/alarm.c index 4ef93236a..5c970e2fc 100644 --- a/examples/platforms/nrf52840/alarm.c +++ b/examples/platforms/nrf52840/alarm.c @@ -46,7 +46,7 @@ #include "drivers/nrf_drv_clock.h" #include "hal/nrf_rtc.h" -#include +#include #include #define RTC_FREQUENCY 32768ULL diff --git a/examples/platforms/nrf52840/logging.c b/examples/platforms/nrf52840/logging.c index 95d2bc37d..0bb24e3f3 100644 --- a/examples/platforms/nrf52840/logging.c +++ b/examples/platforms/nrf52840/logging.c @@ -42,7 +42,7 @@ #include "platform-nrf5.h" #include -#include +#include #include #if (OPENTHREAD_CONFIG_ENABLE_DEFAULT_LOG_OUTPUT == 0) diff --git a/examples/platforms/nrf52840/platform.c b/examples/platforms/nrf52840/platform.c index 9faaa2420..6a41cd6b1 100644 --- a/examples/platforms/nrf52840/platform.c +++ b/examples/platforms/nrf52840/platform.c @@ -38,7 +38,7 @@ #include "platform-nrf5.h" #include -#include +#include void __cxa_pure_virtual(void) { while (1); } diff --git a/examples/platforms/nrf52840/radio.c b/examples/platforms/nrf52840/radio.c index d8cf96b1e..14c55ae26 100644 --- a/examples/platforms/nrf52840/radio.c +++ b/examples/platforms/nrf52840/radio.c @@ -32,11 +32,7 @@ * */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include // NRF tools use #define PACKAGE - for other purposes // ie: the physical package the chip comes in // This conflicts with the GNU Autoconf "PACAKGE" define @@ -58,7 +54,7 @@ #include "drivers/nrf_drv_radio802154.h" #include -#include +#include #include #define SHORT_ADDRESS_SIZE 2 diff --git a/examples/platforms/posix/diag.c b/examples/platforms/posix/diag.c index 495682a33..88ec53d9f 100644 --- a/examples/platforms/posix/diag.c +++ b/examples/platforms/posix/diag.c @@ -33,7 +33,7 @@ #include #include -#include +#include #include #include #include diff --git a/examples/platforms/posix/flash.c b/examples/platforms/posix/flash.c index 7e1ef7f8f..e4a62ac59 100644 --- a/examples/platforms/posix/flash.c +++ b/examples/platforms/posix/flash.c @@ -35,7 +35,7 @@ #include #include -#include +#include #include "utils/code_utils.h" #include "utils/flash.h" diff --git a/examples/platforms/posix/platform-posix.h b/examples/platforms/posix/platform-posix.h index 11bc73ed1..cda65ba5c 100644 --- a/examples/platforms/posix/platform-posix.h +++ b/examples/platforms/posix/platform-posix.h @@ -35,11 +35,7 @@ #ifndef PLATFORM_POSIX_H_ #define PLATFORM_POSIX_H_ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include #include diff --git a/include/openthread/Makefile.am b/include/openthread/Makefile.am index afb4e419c..5ec7b906e 100644 --- a/include/openthread/Makefile.am +++ b/include/openthread/Makefile.am @@ -51,6 +51,7 @@ openthread_headers = \ cli.h \ coap.h \ commissioner.h \ + config.h \ crypto.h \ border_router.h \ dataset.h \ diff --git a/include/openthread/child_supervision.h b/include/openthread/child_supervision.h index 9e8d5f40e..2c7c53e91 100644 --- a/include/openthread/child_supervision.h +++ b/include/openthread/child_supervision.h @@ -35,11 +35,7 @@ #ifndef OPENTHREAD_CHILD_SUPERVISION_H_ #define OPENTHREAD_CHILD_SUPERVISION_H_ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "openthread/types.h" diff --git a/include/openthread/coap.h b/include/openthread/coap.h index 96c14225e..3ac7067ce 100644 --- a/include/openthread/coap.h +++ b/include/openthread/coap.h @@ -35,11 +35,7 @@ #ifndef OPENTHREAD_COAP_H_ #define OPENTHREAD_COAP_H_ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include diff --git a/include/openthread/config.h b/include/openthread/config.h new file mode 100644 index 000000000..d3247e028 --- /dev/null +++ b/include/openthread/config.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2017, The OpenThread Authors. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holder nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * @file + * @brief + * This file includes required defines config header. + */ + +#ifndef OPENTHREAD_CONFIG_H_ +#define OPENTHREAD_CONFIG_H_ + +#if !defined(OPENTHREAD_CONFIG_FILE) +#define OPENTHREAD_CONFIG_FILE +#endif + +#include OPENTHREAD_CONFIG_FILE + +#endif //OPENTHREAD_CONFIG_H_ + + + diff --git a/include/openthread/dns.h b/include/openthread/dns.h index 1d9df51c2..465ccffb9 100644 --- a/include/openthread/dns.h +++ b/include/openthread/dns.h @@ -35,11 +35,7 @@ #ifndef OPENTHREAD_DNS_H_ #define OPENTHREAD_DNS_H_ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include #include diff --git a/include/openthread/jam_detection.h b/include/openthread/jam_detection.h index bf8a557fc..fa8f59b7b 100644 --- a/include/openthread/jam_detection.h +++ b/include/openthread/jam_detection.h @@ -35,11 +35,7 @@ #ifndef OPENTHREAD_JAM_DETECTION_H_ #define OPENTHREAD_JAM_DETECTION_H_ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include diff --git a/include/openthread/tmf_proxy.h b/include/openthread/tmf_proxy.h index 3778076bd..7e6a29a3d 100644 --- a/include/openthread/tmf_proxy.h +++ b/include/openthread/tmf_proxy.h @@ -35,11 +35,7 @@ #ifndef OPENTHREAD_TMF_PROXY_H_ #define OPENTHREAD_TMF_PROXY_H_ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp index 98e1a21b3..084356f7f 100644 --- a/src/cli/cli.cpp +++ b/src/cli/cli.cpp @@ -31,11 +31,7 @@ * This file implements the CLI interpreter. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "cli.hpp" diff --git a/src/cli/cli.hpp b/src/cli/cli.hpp index e0a03ff2c..e9fd4708c 100644 --- a/src/cli/cli.hpp +++ b/src/cli/cli.hpp @@ -34,11 +34,7 @@ #ifndef CLI_HPP_ #define CLI_HPP_ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include diff --git a/src/cli/cli_coap.cpp b/src/cli/cli_coap.cpp index 2b204c688..f6dd9386e 100644 --- a/src/cli/cli_coap.cpp +++ b/src/cli/cli_coap.cpp @@ -31,11 +31,7 @@ * This file implements a simple CLI for the CoAP service. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #if OPENTHREAD_ENABLE_APPLICATION_COAP diff --git a/src/cli/cli_console.cpp b/src/cli/cli_console.cpp index d9d8698b9..59174a19d 100644 --- a/src/cli/cli_console.cpp +++ b/src/cli/cli_console.cpp @@ -31,11 +31,7 @@ * This file implements the CLI server on the CONSOLE service. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "cli_console.hpp" diff --git a/src/cli/cli_dataset.cpp b/src/cli/cli_dataset.cpp index 51c611493..a1eb83895 100644 --- a/src/cli/cli_dataset.cpp +++ b/src/cli/cli_dataset.cpp @@ -31,11 +31,7 @@ * This file implements the CLI interpreter. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "cli_dataset.hpp" diff --git a/src/cli/cli_instance.cpp b/src/cli/cli_instance.cpp index db403f71a..7c759eebb 100644 --- a/src/cli/cli_instance.cpp +++ b/src/cli/cli_instance.cpp @@ -31,11 +31,7 @@ * This file implements the CLI interpreter Instance related functions. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include #include diff --git a/src/cli/cli_uart.cpp b/src/cli/cli_uart.cpp index 523cd76bf..f3d859937 100644 --- a/src/cli/cli_uart.cpp +++ b/src/cli/cli_uart.cpp @@ -31,11 +31,7 @@ * This file implements the CLI server on the UART service. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "cli_uart.hpp" diff --git a/src/cli/cli_udp.cpp b/src/cli/cli_udp.cpp index 8f5e11e4e..2b8a94350 100644 --- a/src/cli/cli_udp.cpp +++ b/src/cli/cli_udp.cpp @@ -31,11 +31,7 @@ * This file implements the CLI server on a UDP socket. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "cli_udp.hpp" diff --git a/src/core/api/border_router_api.cpp b/src/core/api/border_router_api.cpp index 6b5e52808..8a2c46a5b 100644 --- a/src/core/api/border_router_api.cpp +++ b/src/core/api/border_router_api.cpp @@ -31,11 +31,7 @@ * This file implements the OpenThread Border Router API. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #if OPENTHREAD_ENABLE_BORDER_ROUTER diff --git a/src/core/api/coap_api.cpp b/src/core/api/coap_api.cpp index a7cee59ae..4c913fec9 100644 --- a/src/core/api/coap_api.cpp +++ b/src/core/api/coap_api.cpp @@ -31,6 +31,8 @@ * This file implements the OpenThread CoAP API. */ +#include + #include #include "openthread-instance.h" diff --git a/src/core/api/commissioner_api.cpp b/src/core/api/commissioner_api.cpp index 8c74490d4..28836ee7e 100644 --- a/src/core/api/commissioner_api.cpp +++ b/src/core/api/commissioner_api.cpp @@ -31,6 +31,8 @@ * This file implements the OpenThread Commissioner API. */ +#include + #include #include "openthread-instance.h" diff --git a/src/core/api/crypto_api.cpp b/src/core/api/crypto_api.cpp index ac4a7790c..df2ea8dab 100644 --- a/src/core/api/crypto_api.cpp +++ b/src/core/api/crypto_api.cpp @@ -31,6 +31,7 @@ * This file implements the OpenThread Crypto API. */ +#include #include #include "common/code_utils.hpp" diff --git a/src/core/api/dataset_api.cpp b/src/core/api/dataset_api.cpp index 9377ba3fe..33aaaff5e 100644 --- a/src/core/api/dataset_api.cpp +++ b/src/core/api/dataset_api.cpp @@ -31,6 +31,8 @@ * This file implements the OpenThread Operational Dataset API (for both FTD and MTD). */ +#include + #include #include "openthread-instance.h" diff --git a/src/core/api/dataset_ftd_api.cpp b/src/core/api/dataset_ftd_api.cpp index 50deef112..7a60c7a8e 100644 --- a/src/core/api/dataset_ftd_api.cpp +++ b/src/core/api/dataset_ftd_api.cpp @@ -31,6 +31,8 @@ * This file implements the OpenThread Operational Dataset API (FTD only). */ +#include + #if OPENTHREAD_FTD #include diff --git a/src/core/api/dhcp6_api.cpp b/src/core/api/dhcp6_api.cpp index 504a90e21..451a1728f 100644 --- a/src/core/api/dhcp6_api.cpp +++ b/src/core/api/dhcp6_api.cpp @@ -31,7 +31,9 @@ * This file implements the OpenThread DHCPv6 API. */ +#include #include + #include #include "openthread-instance.h" diff --git a/src/core/api/dns_api.cpp b/src/core/api/dns_api.cpp index f763b8f20..71e696b5d 100644 --- a/src/core/api/dns_api.cpp +++ b/src/core/api/dns_api.cpp @@ -31,6 +31,8 @@ * This file implements the OpenThread UDP API. */ +#include + #include #include "openthread-instance.h" diff --git a/src/core/api/icmp6_api.cpp b/src/core/api/icmp6_api.cpp index 46ccf050d..3f83eb0d7 100644 --- a/src/core/api/icmp6_api.cpp +++ b/src/core/api/icmp6_api.cpp @@ -31,6 +31,8 @@ * This file implements the OpenThread ICMPv6 API. */ +#include + #include #include "openthread-instance.h" diff --git a/src/core/api/instance_api.cpp b/src/core/api/instance_api.cpp index 5dbc69eb0..2a096e433 100644 --- a/src/core/api/instance_api.cpp +++ b/src/core/api/instance_api.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "instance_api.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include #include diff --git a/src/core/api/ip6_api.cpp b/src/core/api/ip6_api.cpp index 92aea4be6..29d72fb68 100644 --- a/src/core/api/ip6_api.cpp +++ b/src/core/api/ip6_api.cpp @@ -33,6 +33,8 @@ #define WPP_NAME "ip6_api.tmh" +#include + #include #include "openthread-instance.h" diff --git a/src/core/api/jam_detection_api.cpp b/src/core/api/jam_detection_api.cpp index 7df5894c0..16ad85c26 100644 --- a/src/core/api/jam_detection_api.cpp +++ b/src/core/api/jam_detection_api.cpp @@ -31,6 +31,8 @@ * This file implements the OpenThread Jam Detection API. */ +#include + #include #include "openthread-instance.h" diff --git a/src/core/api/joiner_api.cpp b/src/core/api/joiner_api.cpp index 2da5a366d..88a27fe20 100644 --- a/src/core/api/joiner_api.cpp +++ b/src/core/api/joiner_api.cpp @@ -31,6 +31,8 @@ * This file implements the OpenThread Joiner API. */ +#include + #include #include "openthread-instance.h" diff --git a/src/core/api/link_api.cpp b/src/core/api/link_api.cpp index 489185a14..84ff8df8c 100644 --- a/src/core/api/link_api.cpp +++ b/src/core/api/link_api.cpp @@ -31,6 +31,8 @@ * This file implements the OpenThread Link API. */ +#include + #include #include "openthread-instance.h" diff --git a/src/core/api/link_raw_api.cpp b/src/core/api/link_raw_api.cpp index a6e7d24cf..bd33390a9 100644 --- a/src/core/api/link_raw_api.cpp +++ b/src/core/api/link_raw_api.cpp @@ -31,12 +31,13 @@ * This file implements the OpenThread Link Raw API. */ +#include +#include +#include #include #include #include "openthread-instance.h" -#include "common/debug.hpp" -#include "common/logging.hpp" #if OPENTHREAD_ENABLE_RAW_LINK_API diff --git a/src/core/api/message_api.cpp b/src/core/api/message_api.cpp index 488b58229..fb016f118 100644 --- a/src/core/api/message_api.cpp +++ b/src/core/api/message_api.cpp @@ -30,6 +30,7 @@ * @file * This file implements the OpenThread Message API. */ +#include #include diff --git a/src/core/api/netdata_api.cpp b/src/core/api/netdata_api.cpp index 69d7d1770..3ab370ca5 100644 --- a/src/core/api/netdata_api.cpp +++ b/src/core/api/netdata_api.cpp @@ -30,6 +30,7 @@ * @file * This file implements the OpenThread Network Data API. */ +#include #include diff --git a/src/core/api/tasklet_api.cpp b/src/core/api/tasklet_api.cpp index 787aaedb5..1b6e6a00f 100644 --- a/src/core/api/tasklet_api.cpp +++ b/src/core/api/tasklet_api.cpp @@ -33,6 +33,7 @@ #define WPP_NAME "tasklet_api.tmh" +#include #include #include "openthread-instance.h" diff --git a/src/core/api/thread_api.cpp b/src/core/api/thread_api.cpp index 065369925..2aba7e23c 100644 --- a/src/core/api/thread_api.cpp +++ b/src/core/api/thread_api.cpp @@ -33,6 +33,8 @@ #define WPP_NAME "thread_api.tmh" +#include + #include #include diff --git a/src/core/api/thread_ftd_api.cpp b/src/core/api/thread_ftd_api.cpp index a69376395..beb7a44a2 100644 --- a/src/core/api/thread_ftd_api.cpp +++ b/src/core/api/thread_ftd_api.cpp @@ -33,16 +33,11 @@ #define WPP_NAME "thread_ftd_api.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #if OPENTHREAD_FTD #include - #include "openthread-core-config.h" #include "openthread-instance.h" diff --git a/src/core/api/tmf_proxy_api.cpp b/src/core/api/tmf_proxy_api.cpp index d841bcd23..cc4d9218d 100644 --- a/src/core/api/tmf_proxy_api.cpp +++ b/src/core/api/tmf_proxy_api.cpp @@ -31,6 +31,7 @@ * This file implements the OpenThread TMF proxy API. */ +#include #include #include "openthread-instance.h" diff --git a/src/core/api/udp_api.cpp b/src/core/api/udp_api.cpp index 34df64539..9a4570dee 100644 --- a/src/core/api/udp_api.cpp +++ b/src/core/api/udp_api.cpp @@ -31,6 +31,7 @@ * This file implements the OpenThread UDP API. */ +#include #include #include "openthread-instance.h" diff --git a/src/core/coap/coap.cpp b/src/core/coap/coap.cpp index 9a3e09d69..fe202642c 100644 --- a/src/core/coap/coap.cpp +++ b/src/core/coap/coap.cpp @@ -28,11 +28,7 @@ #define WPP_NAME "coap.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "coap.hpp" diff --git a/src/core/coap/coap_header.cpp b/src/core/coap/coap_header.cpp index c33929efa..9edf0ce38 100644 --- a/src/core/coap/coap_header.cpp +++ b/src/core/coap/coap_header.cpp @@ -31,11 +31,7 @@ * This file implements the CoAP header generation and parsing. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "coap_header.hpp" diff --git a/src/core/coap/coap_secure.cpp b/src/core/coap/coap_secure.cpp index 8f62d9b06..848e88efc 100644 --- a/src/core/coap/coap_secure.cpp +++ b/src/core/coap/coap_secure.cpp @@ -28,11 +28,7 @@ #define WPP_NAME "coap_secure.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "coap_secure.hpp" diff --git a/src/core/common/crc16.cpp b/src/core/common/crc16.cpp index a2877bf99..befa6c567 100644 --- a/src/core/common/crc16.cpp +++ b/src/core/common/crc16.cpp @@ -31,11 +31,7 @@ * This file implements CRC16 computations. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "crc16.hpp" diff --git a/src/core/common/logging.cpp b/src/core/common/logging.cpp index 6d5a9d4e2..ad700935a 100644 --- a/src/core/common/logging.cpp +++ b/src/core/common/logging.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "logging.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "logging.hpp" diff --git a/src/core/common/logging.hpp b/src/core/common/logging.hpp index 44528431a..9f203274a 100644 --- a/src/core/common/logging.hpp +++ b/src/core/common/logging.hpp @@ -34,6 +34,8 @@ #ifndef LOGGING_HPP_ #define LOGGING_HPP_ +#include + #include #include #include "utils/wrap_string.h" diff --git a/src/core/common/message.cpp b/src/core/common/message.cpp index 4048b31bd..4aef8a121 100644 --- a/src/core/common/message.cpp +++ b/src/core/common/message.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "message.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "message.hpp" diff --git a/src/core/common/message.hpp b/src/core/common/message.hpp index 53c26de9f..2d92eae5b 100644 --- a/src/core/common/message.hpp +++ b/src/core/common/message.hpp @@ -34,11 +34,7 @@ #ifndef MESSAGE_HPP_ #define MESSAGE_HPP_ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "utils/wrap_stdint.h" #include "utils/wrap_string.h" diff --git a/src/core/common/tasklet.cpp b/src/core/common/tasklet.cpp index 4370b353f..35d0c6aa8 100644 --- a/src/core/common/tasklet.cpp +++ b/src/core/common/tasklet.cpp @@ -31,11 +31,7 @@ * This file implements the tasklet scheduler. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "tasklet.hpp" diff --git a/src/core/common/timer.cpp b/src/core/common/timer.cpp index 6f34c2e0a..17b70dfc7 100644 --- a/src/core/common/timer.cpp +++ b/src/core/common/timer.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "timer.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "timer.hpp" diff --git a/src/core/common/tlvs.cpp b/src/core/common/tlvs.cpp index 699114010..a4d5b014b 100644 --- a/src/core/common/tlvs.cpp +++ b/src/core/common/tlvs.cpp @@ -31,11 +31,7 @@ * This file implements common methods for manipulating MLE TLVs. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "tlvs.hpp" diff --git a/src/core/common/trickle_timer.cpp b/src/core/common/trickle_timer.cpp index 658008112..f2cf95674 100644 --- a/src/core/common/trickle_timer.cpp +++ b/src/core/common/trickle_timer.cpp @@ -31,11 +31,7 @@ * This file implements the trickle timer logic. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "trickle_timer.hpp" diff --git a/src/core/crypto/aes_ccm.cpp b/src/core/crypto/aes_ccm.cpp index ed422e0e8..d5271fea9 100644 --- a/src/core/crypto/aes_ccm.cpp +++ b/src/core/crypto/aes_ccm.cpp @@ -31,11 +31,7 @@ * This file implements AES-CCM. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "aes_ccm.hpp" diff --git a/src/core/crypto/aes_ecb.cpp b/src/core/crypto/aes_ecb.cpp index 95e3d84af..8db84769c 100644 --- a/src/core/crypto/aes_ecb.cpp +++ b/src/core/crypto/aes_ecb.cpp @@ -31,11 +31,7 @@ * This file implements AES-ECB. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "aes_ecb.hpp" diff --git a/src/core/crypto/hmac_sha256.cpp b/src/core/crypto/hmac_sha256.cpp index fa68f3d8d..3857fb17f 100644 --- a/src/core/crypto/hmac_sha256.cpp +++ b/src/core/crypto/hmac_sha256.cpp @@ -31,11 +31,7 @@ * This file implements HMAC SHA-256. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "hmac_sha256.hpp" diff --git a/src/core/crypto/mbedtls.cpp b/src/core/crypto/mbedtls.cpp index 137bd65eb..e3eff6a2c 100644 --- a/src/core/crypto/mbedtls.cpp +++ b/src/core/crypto/mbedtls.cpp @@ -31,11 +31,7 @@ * This file implements the use of mbedTLS. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "mbedtls.hpp" diff --git a/src/core/crypto/mbedtls.hpp b/src/core/crypto/mbedtls.hpp index 8afe3e536..54ae1140f 100644 --- a/src/core/crypto/mbedtls.hpp +++ b/src/core/crypto/mbedtls.hpp @@ -34,11 +34,7 @@ #ifndef OT_MBEDTLS_HPP_ #define OT_MBEDTLS_HPP_ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include diff --git a/src/core/crypto/pbkdf2_cmac.cpp b/src/core/crypto/pbkdf2_cmac.cpp index 4b0de3fa4..ef676cb5b 100644 --- a/src/core/crypto/pbkdf2_cmac.cpp +++ b/src/core/crypto/pbkdf2_cmac.cpp @@ -31,11 +31,7 @@ * This file implements PBKDF2 using AES-CMAC-PRF-128 */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "pbkdf2_cmac.h" diff --git a/src/core/crypto/sha256.cpp b/src/core/crypto/sha256.cpp index ff497ba81..e178f43fa 100644 --- a/src/core/crypto/sha256.cpp +++ b/src/core/crypto/sha256.cpp @@ -31,11 +31,7 @@ * This file implements SHA-256. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "sha256.hpp" diff --git a/src/core/mac/mac.cpp b/src/core/mac/mac.cpp index 61deb3a58..8a21f48ee 100644 --- a/src/core/mac/mac.cpp +++ b/src/core/mac/mac.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "mac.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "mac.hpp" diff --git a/src/core/mac/mac_blacklist.cpp b/src/core/mac/mac_blacklist.cpp index db2fcf9e7..e87b05833 100644 --- a/src/core/mac/mac_blacklist.cpp +++ b/src/core/mac/mac_blacklist.cpp @@ -31,11 +31,7 @@ * This file implements blacklist IEEE 802.15.4 frame filtering based on MAC address. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "mac_blacklist.hpp" diff --git a/src/core/mac/mac_blacklist.hpp b/src/core/mac/mac_blacklist.hpp index e9198fcbe..ddcaeaf39 100644 --- a/src/core/mac/mac_blacklist.hpp +++ b/src/core/mac/mac_blacklist.hpp @@ -26,11 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #if OPENTHREAD_ENABLE_MAC_WHITELIST #include "mac_blacklist_impl.hpp" diff --git a/src/core/mac/mac_frame.cpp b/src/core/mac/mac_frame.cpp index eb8b596e9..a276648cd 100644 --- a/src/core/mac/mac_frame.cpp +++ b/src/core/mac/mac_frame.cpp @@ -31,11 +31,7 @@ * This file implements IEEE 802.15.4 header generation and processing. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "mac_frame.hpp" diff --git a/src/core/mac/mac_whitelist.cpp b/src/core/mac/mac_whitelist.cpp index f75984671..388d0a3e6 100644 --- a/src/core/mac/mac_whitelist.cpp +++ b/src/core/mac/mac_whitelist.cpp @@ -31,11 +31,7 @@ * This file implements whitelist IEEE 802.15.4 frame filtering based on MAC address. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "mac_whitelist.hpp" diff --git a/src/core/mac/mac_whitelist.hpp b/src/core/mac/mac_whitelist.hpp index e345419fa..175c64b79 100644 --- a/src/core/mac/mac_whitelist.hpp +++ b/src/core/mac/mac_whitelist.hpp @@ -26,11 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #if OPENTHREAD_ENABLE_MAC_WHITELIST #include "mac_whitelist_impl.hpp" diff --git a/src/core/meshcop/announce_begin_client.cpp b/src/core/meshcop/announce_begin_client.cpp index a5b622104..349c4a6a1 100644 --- a/src/core/meshcop/announce_begin_client.cpp +++ b/src/core/meshcop/announce_begin_client.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "announce_begin_client.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "announce_begin_client.hpp" diff --git a/src/core/meshcop/commissioner.cpp b/src/core/meshcop/commissioner.cpp index ac87d73b1..fbb8993e6 100644 --- a/src/core/meshcop/commissioner.cpp +++ b/src/core/meshcop/commissioner.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "commissioner.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "commissioner.hpp" diff --git a/src/core/meshcop/dataset.cpp b/src/core/meshcop/dataset.cpp index c7d6d0998..e9d03e3dd 100644 --- a/src/core/meshcop/dataset.cpp +++ b/src/core/meshcop/dataset.cpp @@ -32,11 +32,7 @@ * */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "dataset.hpp" diff --git a/src/core/meshcop/dataset_manager.cpp b/src/core/meshcop/dataset_manager.cpp index 2b7661fff..9a5409072 100644 --- a/src/core/meshcop/dataset_manager.cpp +++ b/src/core/meshcop/dataset_manager.cpp @@ -34,11 +34,7 @@ #define WPP_NAME "dataset_manager.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "dataset_manager.hpp" diff --git a/src/core/meshcop/dataset_manager_ftd.cpp b/src/core/meshcop/dataset_manager_ftd.cpp index 7d5fedf21..2bbe32f0e 100644 --- a/src/core/meshcop/dataset_manager_ftd.cpp +++ b/src/core/meshcop/dataset_manager_ftd.cpp @@ -36,11 +36,7 @@ #define WPP_NAME "dataset_manager.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include diff --git a/src/core/meshcop/dtls.cpp b/src/core/meshcop/dtls.cpp index 596f97982..b6a242253 100644 --- a/src/core/meshcop/dtls.cpp +++ b/src/core/meshcop/dtls.cpp @@ -32,12 +32,7 @@ */ #define WPP_NAME "dtls.tmh" - -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "dtls.hpp" diff --git a/src/core/meshcop/energy_scan_client.cpp b/src/core/meshcop/energy_scan_client.cpp index 9352fc8a7..f96b5559b 100644 --- a/src/core/meshcop/energy_scan_client.cpp +++ b/src/core/meshcop/energy_scan_client.cpp @@ -32,12 +32,7 @@ */ #define WPP_NAME "energy_scan_client.tmh" - -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "energy_scan_client.hpp" diff --git a/src/core/meshcop/joiner.cpp b/src/core/meshcop/joiner.cpp index 3977334ac..9dcbf086b 100644 --- a/src/core/meshcop/joiner.cpp +++ b/src/core/meshcop/joiner.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "joiner.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "joiner.hpp" diff --git a/src/core/meshcop/joiner_router.cpp b/src/core/meshcop/joiner_router.cpp index e168c4a0d..3cffb0edc 100644 --- a/src/core/meshcop/joiner_router.cpp +++ b/src/core/meshcop/joiner_router.cpp @@ -35,11 +35,7 @@ #define WPP_NAME "joiner_router.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "joiner_router.hpp" diff --git a/src/core/meshcop/leader.cpp b/src/core/meshcop/leader.cpp index d9c2daa03..cb29b7468 100644 --- a/src/core/meshcop/leader.cpp +++ b/src/core/meshcop/leader.cpp @@ -35,11 +35,7 @@ #define WPP_NAME "leader.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "leader.hpp" diff --git a/src/core/meshcop/panid_query_client.cpp b/src/core/meshcop/panid_query_client.cpp index 726e9c666..947ea660f 100644 --- a/src/core/meshcop/panid_query_client.cpp +++ b/src/core/meshcop/panid_query_client.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "panid_query_client.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "panid_query_client.hpp" diff --git a/src/core/meshcop/timestamp.cpp b/src/core/meshcop/timestamp.cpp index e72cb49a2..54a334601 100644 --- a/src/core/meshcop/timestamp.cpp +++ b/src/core/meshcop/timestamp.cpp @@ -31,11 +31,7 @@ * This file implements common MeshCoP timestamp processing. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "timestamp.hpp" diff --git a/src/core/net/dhcp6_client.cpp b/src/core/net/dhcp6_client.cpp index 996553a8f..6f28d39b3 100644 --- a/src/core/net/dhcp6_client.cpp +++ b/src/core/net/dhcp6_client.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "dhcp6_client.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "dhcp6_client.hpp" @@ -51,6 +47,9 @@ #include "net/dhcp6.hpp" #include "thread/thread_netif.hpp" + +#if OPENTHREAD_ENABLE_DHCP6_CLIENT + using ot::Encoding::BigEndian::HostSwap16; using ot::Encoding::BigEndian::HostSwap32; @@ -725,3 +724,6 @@ exit: } // namespace Dhcp6 } // namespace ot + +#endif //OPENTHREAD_ENABLE_DHCP6_CLIENT + diff --git a/src/core/net/dhcp6_server.cpp b/src/core/net/dhcp6_server.cpp index 685598820..8eb5c7fad 100644 --- a/src/core/net/dhcp6_server.cpp +++ b/src/core/net/dhcp6_server.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "dhcp6_server.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "dhcp6_server.hpp" diff --git a/src/core/net/dns_client.cpp b/src/core/net/dns_client.cpp index 19cc68e34..0ddb93bc6 100644 --- a/src/core/net/dns_client.cpp +++ b/src/core/net/dns_client.cpp @@ -26,11 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "dns_client.hpp" diff --git a/src/core/net/icmp6.cpp b/src/core/net/icmp6.cpp index 9db6dda34..7b59affda 100644 --- a/src/core/net/icmp6.cpp +++ b/src/core/net/icmp6.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "icmp6.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "icmp6.hpp" diff --git a/src/core/net/ip6.cpp b/src/core/net/ip6.cpp index d36ccb791..4a062c29d 100644 --- a/src/core/net/ip6.cpp +++ b/src/core/net/ip6.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "ip6.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "ip6.hpp" diff --git a/src/core/net/ip6_address.cpp b/src/core/net/ip6_address.cpp index c3bb4cd16..a63889ce1 100644 --- a/src/core/net/ip6_address.cpp +++ b/src/core/net/ip6_address.cpp @@ -31,11 +31,7 @@ * This file implements IPv6 addresses. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "ip6_address.hpp" diff --git a/src/core/net/ip6_filter.cpp b/src/core/net/ip6_filter.cpp index 8e02c9669..77702c5e1 100644 --- a/src/core/net/ip6_filter.cpp +++ b/src/core/net/ip6_filter.cpp @@ -31,11 +31,7 @@ * This file implements IPv6 datagram filtering. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "ip6_filter.hpp" diff --git a/src/core/net/ip6_mpl.cpp b/src/core/net/ip6_mpl.cpp index 8cf46d79f..3cb3dc213 100644 --- a/src/core/net/ip6_mpl.cpp +++ b/src/core/net/ip6_mpl.cpp @@ -31,11 +31,7 @@ * This file implements MPL. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "ip6_mpl.hpp" diff --git a/src/core/net/ip6_routes.cpp b/src/core/net/ip6_routes.cpp index fd16ad781..076ce67a1 100644 --- a/src/core/net/ip6_routes.cpp +++ b/src/core/net/ip6_routes.cpp @@ -31,11 +31,7 @@ * This file implements IPv6 route tables. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "ip6_routes.hpp" diff --git a/src/core/net/netif.cpp b/src/core/net/netif.cpp index 9aaf84516..e79f1af34 100644 --- a/src/core/net/netif.cpp +++ b/src/core/net/netif.cpp @@ -30,11 +30,7 @@ * @file * This file implements IPv6 network interfaces. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "netif.hpp" diff --git a/src/core/net/udp6.cpp b/src/core/net/udp6.cpp index b3fc31d18..9a497c67a 100644 --- a/src/core/net/udp6.cpp +++ b/src/core/net/udp6.cpp @@ -31,11 +31,7 @@ * This file implements UDP/IPv6 sockets. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "udp6.hpp" diff --git a/src/core/openthread-instance.h b/src/core/openthread-instance.h index 9d3e0f332..2df21cc55 100644 --- a/src/core/openthread-instance.h +++ b/src/core/openthread-instance.h @@ -35,11 +35,7 @@ #ifndef OPENTHREADINSTANCE_H_ #define OPENTHREADINSTANCE_H_ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "utils/wrap_stdint.h" #include "utils/wrap_stdbool.h" diff --git a/src/core/thread/address_resolver.cpp b/src/core/thread/address_resolver.cpp index a43063693..f37eba1e1 100644 --- a/src/core/thread/address_resolver.cpp +++ b/src/core/thread/address_resolver.cpp @@ -35,11 +35,7 @@ #define WPP_NAME "address_resolver.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "address_resolver.hpp" diff --git a/src/core/thread/announce_begin_server.cpp b/src/core/thread/announce_begin_server.cpp index f00288d80..7920bcf43 100644 --- a/src/core/thread/announce_begin_server.cpp +++ b/src/core/thread/announce_begin_server.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "announce_begin_server.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "announce_begin_server.hpp" diff --git a/src/core/thread/data_poll_manager.cpp b/src/core/thread/data_poll_manager.cpp index 104aba69a..a3d2df830 100644 --- a/src/core/thread/data_poll_manager.cpp +++ b/src/core/thread/data_poll_manager.cpp @@ -32,15 +32,9 @@ */ #define WPP_NAME "data_poll_manager.tmh" - -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "data_poll_manager.hpp" - #include #include "common/code_utils.hpp" diff --git a/src/core/thread/energy_scan_server.cpp b/src/core/thread/energy_scan_server.cpp index 04ece8ff7..fb8c3a3ad 100644 --- a/src/core/thread/energy_scan_server.cpp +++ b/src/core/thread/energy_scan_server.cpp @@ -32,15 +32,14 @@ */ #define WPP_NAME "energy_scan_server.tmh" +#include + -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif #include "energy_scan_server.hpp" + + #include #include "coap/coap_header.hpp" diff --git a/src/core/thread/key_manager.cpp b/src/core/thread/key_manager.cpp index c962a91d4..2f82bdb29 100644 --- a/src/core/thread/key_manager.cpp +++ b/src/core/thread/key_manager.cpp @@ -32,11 +32,7 @@ */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "key_manager.hpp" diff --git a/src/core/thread/link_quality.cpp b/src/core/thread/link_quality.cpp index cc19d25f1..7bcdbc6ba 100644 --- a/src/core/thread/link_quality.cpp +++ b/src/core/thread/link_quality.cpp @@ -31,11 +31,7 @@ * This file implements link quality information processing and storage. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "link_quality.hpp" diff --git a/src/core/thread/lowpan.cpp b/src/core/thread/lowpan.cpp index 6f07b9192..430bf65cd 100644 --- a/src/core/thread/lowpan.cpp +++ b/src/core/thread/lowpan.cpp @@ -31,11 +31,7 @@ * This file implements 6LoWPAN header compression. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "lowpan.hpp" diff --git a/src/core/thread/mesh_forwarder.cpp b/src/core/thread/mesh_forwarder.cpp index 34a6b4ce8..2c4e830e5 100644 --- a/src/core/thread/mesh_forwarder.cpp +++ b/src/core/thread/mesh_forwarder.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "mesh_forwarder.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "mesh_forwarder.hpp" diff --git a/src/core/thread/mle.cpp b/src/core/thread/mle.cpp index da8f0be33..77ef4fb59 100644 --- a/src/core/thread/mle.cpp +++ b/src/core/thread/mle.cpp @@ -33,14 +33,9 @@ #define WPP_NAME "mle.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "mle.hpp" - #include #include #include diff --git a/src/core/thread/mle_router.cpp b/src/core/thread/mle_router.cpp index e9c950ad6..14c1b39b2 100644 --- a/src/core/thread/mle_router.cpp +++ b/src/core/thread/mle_router.cpp @@ -34,11 +34,7 @@ #define WPP_NAME "mle_router.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "mle_router.hpp" diff --git a/src/core/thread/network_data.cpp b/src/core/thread/network_data.cpp index 8e1526fee..fdcf168b6 100644 --- a/src/core/thread/network_data.cpp +++ b/src/core/thread/network_data.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "network_data.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "network_data.hpp" diff --git a/src/core/thread/network_data_leader.cpp b/src/core/thread/network_data_leader.cpp index 44e188a99..480511997 100644 --- a/src/core/thread/network_data_leader.cpp +++ b/src/core/thread/network_data_leader.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "network_data_leader.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "network_data_leader.hpp" diff --git a/src/core/thread/network_data_leader.hpp b/src/core/thread/network_data_leader.hpp index e9ac628f4..695199ef1 100644 --- a/src/core/thread/network_data_leader.hpp +++ b/src/core/thread/network_data_leader.hpp @@ -34,6 +34,8 @@ #ifndef NETWORK_DATA_LEADER_HPP_ #define NETWORK_DATA_LEADER_HPP_ +#include + #include "utils/wrap_stdint.h" #include "coap/coap.hpp" diff --git a/src/core/thread/network_data_leader_ftd.cpp b/src/core/thread/network_data_leader_ftd.cpp index c0a767498..a0f9f0bdf 100644 --- a/src/core/thread/network_data_leader_ftd.cpp +++ b/src/core/thread/network_data_leader_ftd.cpp @@ -33,16 +33,11 @@ #if OPENTHREAD_FTD -#define WPP_NAME "network_data_leader_ftd.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#define WPP_NAME "network_data_leader_ftd.tmh" +#include #include "network_data_leader.hpp" - #include #include "coap/coap_header.hpp" diff --git a/src/core/thread/network_data_local.cpp b/src/core/thread/network_data_local.cpp index 4bbabafe7..ad43e2edc 100644 --- a/src/core/thread/network_data_local.cpp +++ b/src/core/thread/network_data_local.cpp @@ -31,11 +31,7 @@ * This file implements the local Thread Network Data. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "network_data_local.hpp" diff --git a/src/core/thread/network_diagnostic.cpp b/src/core/thread/network_diagnostic.cpp index ad7d30e67..35ab09fba 100644 --- a/src/core/thread/network_diagnostic.cpp +++ b/src/core/thread/network_diagnostic.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "network_diagnostic.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "network_diagnostic.hpp" diff --git a/src/core/thread/panid_query_server.cpp b/src/core/thread/panid_query_server.cpp index 621d1341c..dc0d237dc 100644 --- a/src/core/thread/panid_query_server.cpp +++ b/src/core/thread/panid_query_server.cpp @@ -31,13 +31,9 @@ * This file implements the PAN ID Query Server. */ -#define WPP_NAME "panid_query_server.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#define WPP_NAME "panid_query_server.tmh" +#include #include "panid_query_server.hpp" diff --git a/src/core/thread/src_match_controller.cpp b/src/core/thread/src_match_controller.cpp index 956b304cc..d4a15f1ce 100644 --- a/src/core/thread/src_match_controller.cpp +++ b/src/core/thread/src_match_controller.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "src_match_controller.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "src_match_controller.hpp" diff --git a/src/core/thread/thread_netif.cpp b/src/core/thread/thread_netif.cpp index 906decd3f..d57bc2365 100644 --- a/src/core/thread/thread_netif.cpp +++ b/src/core/thread/thread_netif.cpp @@ -32,11 +32,7 @@ * This file implements the Thread network interface. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "thread_netif.hpp" diff --git a/src/core/thread/thread_netif.hpp b/src/core/thread/thread_netif.hpp index e03519439..ca8a04800 100644 --- a/src/core/thread/thread_netif.hpp +++ b/src/core/thread/thread_netif.hpp @@ -34,11 +34,7 @@ #ifndef THREAD_NETIF_HPP_ #define THREAD_NETIF_HPP_ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include diff --git a/src/core/thread/tmf_proxy.cpp b/src/core/thread/tmf_proxy.cpp index 9fca1b2f1..1293b52b1 100644 --- a/src/core/thread/tmf_proxy.cpp +++ b/src/core/thread/tmf_proxy.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "tmf_proxy.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "tmf_proxy.hpp" diff --git a/src/core/thread/topology.cpp b/src/core/thread/topology.cpp index 45e1dbf3b..658b3b53b 100644 --- a/src/core/thread/topology.cpp +++ b/src/core/thread/topology.cpp @@ -33,11 +33,7 @@ #define WPP_NAME "topology.tmh" -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "topology.hpp" diff --git a/src/core/utils/child_supervision.cpp b/src/core/utils/child_supervision.cpp index 2fda98492..434b9d13b 100644 --- a/src/core/utils/child_supervision.cpp +++ b/src/core/utils/child_supervision.cpp @@ -31,11 +31,7 @@ * This file implements the child supervision feature. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "child_supervision.hpp" diff --git a/src/core/utils/child_supervision.hpp b/src/core/utils/child_supervision.hpp index a8bfc86de..4ea7f89e7 100644 --- a/src/core/utils/child_supervision.hpp +++ b/src/core/utils/child_supervision.hpp @@ -35,11 +35,7 @@ #ifndef CHILD_SUPERVISION_HPP_ #define CHILD_SUPERVISION_HPP_ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "common/message.hpp" #include "common/timer.hpp" diff --git a/src/core/utils/jam_detector.cpp b/src/core/utils/jam_detector.cpp index 4775db007..3099eedf6 100644 --- a/src/core/utils/jam_detector.cpp +++ b/src/core/utils/jam_detector.cpp @@ -31,11 +31,7 @@ * This file implements the jam detector feature. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "jam_detector.hpp" diff --git a/src/core/utils/jam_detector.hpp b/src/core/utils/jam_detector.hpp index d16a25f1d..6c7f42c60 100644 --- a/src/core/utils/jam_detector.hpp +++ b/src/core/utils/jam_detector.hpp @@ -34,11 +34,7 @@ #ifndef JAM_DETECTOR_HPP_ #define JAM_DETECTOR_HPP_ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "common/timer.hpp" #include "utils/wrap_stdint.h" diff --git a/src/core/utils/missing_strlcat.c b/src/core/utils/missing_strlcat.c index bfad3b7e6..575267a4e 100644 --- a/src/core/utils/missing_strlcat.c +++ b/src/core/utils/missing_strlcat.c @@ -25,11 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "utils/wrap_string.h" diff --git a/src/core/utils/missing_strlcpy.c b/src/core/utils/missing_strlcpy.c index 4c8bb243a..fa2b49706 100644 --- a/src/core/utils/missing_strlcpy.c +++ b/src/core/utils/missing_strlcpy.c @@ -25,11 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "utils/wrap_string.h" diff --git a/src/core/utils/missing_strnlen.c b/src/core/utils/missing_strnlen.c index a4017f441..0a1ce1a0d 100644 --- a/src/core/utils/missing_strnlen.c +++ b/src/core/utils/missing_strnlen.c @@ -25,11 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "utils/wrap_string.h" diff --git a/src/core/utils/slaac_address.cpp b/src/core/utils/slaac_address.cpp index d896aaf12..2f6e313f4 100644 --- a/src/core/utils/slaac_address.cpp +++ b/src/core/utils/slaac_address.cpp @@ -31,11 +31,7 @@ * This file implements the Thread IPv6 global addresses configuration utilities. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "slaac_address.hpp" diff --git a/src/diag/diag_process.cpp b/src/diag/diag_process.cpp index 87bb11bf5..6161732c8 100644 --- a/src/diag/diag_process.cpp +++ b/src/diag/diag_process.cpp @@ -31,11 +31,7 @@ * This file implements the diagnostics module. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include #include diff --git a/src/diag/diag_process.hpp b/src/diag/diag_process.hpp index 00486bb3d..f569a084c 100644 --- a/src/diag/diag_process.hpp +++ b/src/diag/diag_process.hpp @@ -34,6 +34,8 @@ #ifndef DIAG_PROCESS_HPP_ #define DIAG_PROCESS_HPP_ +#include + #include #include diff --git a/src/diag/openthread-diag.cpp b/src/diag/openthread-diag.cpp index 3ae9f27cb..23e2a0144 100644 --- a/src/diag/openthread-diag.cpp +++ b/src/diag/openthread-diag.cpp @@ -31,6 +31,8 @@ * This file implements the top-level interface to diagnostics module. */ +#include + #include #include #include "utils/wrap_string.h" diff --git a/src/ncp/Makefile.am b/src/ncp/Makefile.am index fa7209869..e187cf6d5 100644 --- a/src/ncp/Makefile.am +++ b/src/ncp/Makefile.am @@ -91,7 +91,13 @@ if OPENTHREAD_BUILD_TESTS noinst_PROGRAMS = spinel-test spinel_test_SOURCES = spinel.c -spinel_test_CFLAGS = -DSPINEL_SELF_TEST=1 $(COMMON_CPPFLAGS) +spinel_test_CFLAGS = \ + $(COMMON_CPPFLAGS) \ + -DSPINEL_SELF_TEST=1 \ + -D_GNU_SOURCE \ + -I$(top_srcdir)/src/core \ + -I$(top_srcdir)/include \ + $(NULL) TESTS = spinel-test diff --git a/src/ncp/hdlc.cpp b/src/ncp/hdlc.cpp index 22e1bf492..8b0fae184 100644 --- a/src/ncp/hdlc.cpp +++ b/src/ncp/hdlc.cpp @@ -30,11 +30,7 @@ * This file implements an HDLC-lite encoder and decoder. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "hdlc.hpp" diff --git a/src/ncp/hdlc.hpp b/src/ncp/hdlc.hpp index d18a3a93a..bb09cf65b 100644 --- a/src/ncp/hdlc.hpp +++ b/src/ncp/hdlc.hpp @@ -32,7 +32,7 @@ #ifndef HDLC_HPP_ #define HDLC_HPP_ - +#include #include namespace ot { diff --git a/src/ncp/ncp_base.cpp b/src/ncp/ncp_base.cpp index 074fb3e9a..872d34ee6 100644 --- a/src/ncp/ncp_base.cpp +++ b/src/ncp/ncp_base.cpp @@ -30,11 +30,7 @@ * This file implements a Spinel interface to the OpenThread stack. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "ncp_base.hpp" diff --git a/src/ncp/ncp_base.hpp b/src/ncp/ncp_base.hpp index f848660c8..4d7d14c48 100644 --- a/src/ncp/ncp_base.hpp +++ b/src/ncp/ncp_base.hpp @@ -33,11 +33,7 @@ #ifndef NCP_BASE_HPP_ #define NCP_BASE_HPP_ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include #include diff --git a/src/ncp/ncp_buffer.cpp b/src/ncp/ncp_buffer.cpp index 8fcc9639b..38d800926 100644 --- a/src/ncp/ncp_buffer.cpp +++ b/src/ncp/ncp_buffer.cpp @@ -30,11 +30,7 @@ * This file implements NCP frame buffer class. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "ncp_buffer.hpp" #include "utils/wrap_string.h" diff --git a/src/ncp/ncp_buffer.hpp b/src/ncp/ncp_buffer.hpp index b5b52f996..2d9fa39a8 100644 --- a/src/ncp/ncp_buffer.hpp +++ b/src/ncp/ncp_buffer.hpp @@ -33,6 +33,7 @@ #ifndef NCP_FRAME_BUFFER_HPP_ #define NCP_FRAME_BUFFER_HPP_ +#include #include #include diff --git a/src/ncp/ncp_spi.cpp b/src/ncp/ncp_spi.cpp index 333704d8b..93ea2ad76 100644 --- a/src/ncp/ncp_spi.cpp +++ b/src/ncp/ncp_spi.cpp @@ -30,11 +30,7 @@ * This file implements a SPI interface to the OpenThread stack. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "ncp_spi.hpp" diff --git a/src/ncp/ncp_spi.hpp b/src/ncp/ncp_spi.hpp index 7494c94ed..56fef5f24 100644 --- a/src/ncp/ncp_spi.hpp +++ b/src/ncp/ncp_spi.hpp @@ -33,11 +33,7 @@ #ifndef NCP_SPI_HPP_ #define NCP_SPI_HPP_ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "ncp/ncp_base.hpp" diff --git a/src/ncp/ncp_uart.cpp b/src/ncp/ncp_uart.cpp index f2dc96750..7c834dbb7 100644 --- a/src/ncp/ncp_uart.cpp +++ b/src/ncp/ncp_uart.cpp @@ -30,11 +30,7 @@ * This file contains definitions for a UART based NCP interface to the OpenThread stack. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "ncp_uart.hpp" diff --git a/src/ncp/ncp_uart.hpp b/src/ncp/ncp_uart.hpp index 00015ce1e..50b90a403 100644 --- a/src/ncp/ncp_uart.hpp +++ b/src/ncp/ncp_uart.hpp @@ -33,11 +33,7 @@ #ifndef NCP_UART_HPP_ #define NCP_UART_HPP_ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include "ncp/hdlc.hpp" #include "ncp/ncp_base.hpp" diff --git a/src/ncp/spinel.c b/src/ncp/spinel.c index 4ef86f3e6..3e12f2020 100644 --- a/src/ncp/spinel.c +++ b/src/ncp/spinel.c @@ -43,6 +43,9 @@ // MARK: - // MARK: Headers + +#include + #include "spinel.h" #include diff --git a/src/ncp/spinel_platform.h b/src/ncp/spinel_platform.h index 151908ff2..9f57cd8f7 100644 --- a/src/ncp/spinel_platform.h +++ b/src/ncp/spinel_platform.h @@ -49,11 +49,7 @@ * */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include #include "utils/wrap_stdbool.h" diff --git a/tests/unit/test_strlcat.c b/tests/unit/test_strlcat.c index 8fd17bd9f..3da5597e0 100644 --- a/tests/unit/test_strlcat.c +++ b/tests/unit/test_strlcat.c @@ -25,11 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include #include diff --git a/tests/unit/test_strlcpy.c b/tests/unit/test_strlcpy.c index 6a5195260..0513ba9e3 100644 --- a/tests/unit/test_strlcpy.c +++ b/tests/unit/test_strlcpy.c @@ -25,11 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include #include diff --git a/tests/unit/test_strnlen.c b/tests/unit/test_strnlen.c index cd6dde00b..73be627a9 100644 --- a/tests/unit/test_strnlen.c +++ b/tests/unit/test_strnlen.c @@ -25,11 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef OPENTHREAD_CONFIG_FILE -#include OPENTHREAD_CONFIG_FILE -#else -#include -#endif +#include #include #include