Use stdbool.h rather than our own bool definition.

This commit is contained in:
Martin Ling
2025-10-02 16:22:30 +01:00
parent 3d9e01d24f
commit 8cbcc8a4e9
7 changed files with 7 additions and 42 deletions

View File

@@ -22,17 +22,12 @@
#include <hackrf.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <getopt.h>
#ifndef bool
typedef int bool;
#define true 1
#define false 0
#endif
#define CLOCK_UNDEFINED 0xFF
#define REGISTER_INVALID 32767

View File

@@ -24,17 +24,12 @@
#include <hackrf.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <getopt.h>
#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)

View File

@@ -22,17 +22,12 @@
#include <hackrf.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <string.h>
#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 */

View File

@@ -23,18 +23,13 @@
#include <hackrf.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#include <sys/types.h>
#ifndef bool
typedef int bool;
#define true 1
#define false 0
#endif
#ifdef _MSC_VER
#ifdef _WIN64
typedef int64_t ssize_t;

View File

@@ -23,6 +23,7 @@
#include <hackrf.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -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 <windows.h>

View File

@@ -25,6 +25,7 @@
#include <hackrf.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -38,12 +39,6 @@
#include <errno.h>
#include <inttypes.h>
#ifndef bool
typedef int bool;
#define true 1
#define false 0
#endif
#ifdef _WIN32
#include <windows.h>

View File

@@ -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 <stdbool.h>
#include <stdlib.h>
#include <string.h>
#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 <pthread.h>
#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)