From 8cbcc8a4e90de270e61a28e2f4f2cc46b003f883 Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Thu, 2 Oct 2025 16:22:30 +0100 Subject: [PATCH] Use stdbool.h rather than our own bool definition. --- host/hackrf-tools/src/hackrf_clock.c | 7 +------ host/hackrf-tools/src/hackrf_debug.c | 7 +------ host/hackrf-tools/src/hackrf_operacake.c | 7 +------ host/hackrf-tools/src/hackrf_spiflash.c | 7 +------ host/hackrf-tools/src/hackrf_sweep.c | 7 +------ host/hackrf-tools/src/hackrf_transfer.c | 7 +------ host/libhackrf/src/hackrf.c | 7 +------ 7 files changed, 7 insertions(+), 42 deletions(-) diff --git a/host/hackrf-tools/src/hackrf_clock.c b/host/hackrf-tools/src/hackrf_clock.c index 5e070d13..9d293af4 100644 --- a/host/hackrf-tools/src/hackrf_clock.c +++ b/host/hackrf-tools/src/hackrf_clock.c @@ -22,17 +22,12 @@ #include +#include #include #include #include #include -#ifndef bool -typedef int bool; - #define true 1 - #define false 0 -#endif - #define CLOCK_UNDEFINED 0xFF #define REGISTER_INVALID 32767 diff --git a/host/hackrf-tools/src/hackrf_debug.c b/host/hackrf-tools/src/hackrf_debug.c index aa4a0182..73f98090 100644 --- a/host/hackrf-tools/src/hackrf_debug.c +++ b/host/hackrf-tools/src/hackrf_debug.c @@ -24,17 +24,12 @@ #include +#include #include #include #include #include -#ifndef bool -typedef int bool; - #define true 1 - #define false 0 -#endif - #define REGISTER_INVALID 32767 int parse_int(char* s, uint32_t* const value) diff --git a/host/hackrf-tools/src/hackrf_operacake.c b/host/hackrf-tools/src/hackrf_operacake.c index 46525468..6a29e13c 100644 --- a/host/hackrf-tools/src/hackrf_operacake.c +++ b/host/hackrf-tools/src/hackrf_operacake.c @@ -22,17 +22,12 @@ #include +#include #include #include #include #include -#ifndef bool -typedef int bool; - #define true 1 - #define false 0 -#endif - #define FREQ_MIN_MHZ (0) /* 0 MHz */ #define FREQ_MAX_MHZ (7250) /* 7250 MHz */ diff --git a/host/hackrf-tools/src/hackrf_spiflash.c b/host/hackrf-tools/src/hackrf_spiflash.c index 2b9f8b90..46ad1cef 100644 --- a/host/hackrf-tools/src/hackrf_spiflash.c +++ b/host/hackrf-tools/src/hackrf_spiflash.c @@ -23,18 +23,13 @@ #include +#include #include #include #include #include #include -#ifndef bool -typedef int bool; - #define true 1 - #define false 0 -#endif - #ifdef _MSC_VER #ifdef _WIN64 typedef int64_t ssize_t; diff --git a/host/hackrf-tools/src/hackrf_sweep.c b/host/hackrf-tools/src/hackrf_sweep.c index 0ccd3111..4e0e5ec1 100644 --- a/host/hackrf-tools/src/hackrf_sweep.c +++ b/host/hackrf-tools/src/hackrf_sweep.c @@ -23,6 +23,7 @@ #include +#include #include #include #include @@ -38,12 +39,6 @@ #define _FILE_OFFSET_BITS 64 -#ifndef bool -typedef int bool; - #define true 1 - #define false 0 -#endif - #ifdef _WIN32 #define _USE_MATH_DEFINES #include diff --git a/host/hackrf-tools/src/hackrf_transfer.c b/host/hackrf-tools/src/hackrf_transfer.c index fcef4a93..c7c44df9 100644 --- a/host/hackrf-tools/src/hackrf_transfer.c +++ b/host/hackrf-tools/src/hackrf_transfer.c @@ -25,6 +25,7 @@ #include +#include #include #include #include @@ -38,12 +39,6 @@ #include #include -#ifndef bool -typedef int bool; - #define true 1 - #define false 0 -#endif - #ifdef _WIN32 #include diff --git a/host/libhackrf/src/hackrf.c b/host/libhackrf/src/hackrf.c index fdf34488..ae19ef19 100644 --- a/host/libhackrf/src/hackrf.c +++ b/host/libhackrf/src/hackrf.c @@ -23,6 +23,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSI #include "hackrf.h" +#include #include #include #ifndef _WIN32 @@ -38,12 +39,6 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSI #endif #include -#ifndef bool -typedef int bool; - #define true 1 - #define false 0 -#endif - #ifdef HACKRF_BIG_ENDIAN #define TO_LE(x) __builtin_bswap32(x) #define TO_LE64(x) __builtin_bswap64(x)