From 292c5fb43f5402bcbd2c26607543f5bfc815e8e5 Mon Sep 17 00:00:00 2001 From: "Douglas B. Rumbaugh" Date: Fri, 19 Sep 2025 16:54:04 -0400 Subject: Portability and Bugfixes --- include/cdf.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'include/cdf.h') diff --git a/include/cdf.h b/include/cdf.h index 6c218cf..a65caa4 100644 --- a/include/cdf.h +++ b/include/cdf.h @@ -4,6 +4,9 @@ #ifndef H_CDF #define H_CDF +#define _GNU_SOURCE /* Enable getline on Linux */ +#define _POSIX_C_SOURCE 200809L /* Enable POSIX features */ + #include #include #include @@ -11,6 +14,7 @@ #include #include #include +#include #include typedef union { @@ -28,13 +32,5 @@ static int parse_options(int argc, char*const* argv); static void help(); static int process_data(FILE *file); static DistRecord *expand_array(DistRecord *records, size_t *capacity); -static int read_data_int(DistRecord **records, size_t capacity, FILE *file); -static int read_data_uint(DistRecord **records, size_t capacity, FILE *file); -static int read_data_fp(DistRecord **records, size_t capacity, FILE *file); -static int print_data_fp(DistRecord *records, long double *freqs, size_t cnt); -static int print_data_int(DistRecord *records, long double *freqs, size_t cnt); -static int print_data_uint(DistRecord *records, long double *freqs, size_t cnt); #endif - - -- cgit v1.2.3