diff options
| author | Douglas B. Rumbaugh <doug@douglasrumbaugh.com> | 2025-09-19 16:54:04 -0400 |
|---|---|---|
| committer | Douglas B. Rumbaugh <doug@douglasrumbaugh.com> | 2025-09-19 16:55:35 -0400 |
| commit | 292c5fb43f5402bcbd2c26607543f5bfc815e8e5 (patch) | |
| tree | 01f558b6b2ede7ea0786f1366a56fec873456ccc /include/cdf.h | |
| parent | 44aa2be93d86e5bac3768962f4fea14a4b3778d3 (diff) | |
| download | math-utils-292c5fb43f5402bcbd2c26607543f5bfc815e8e5.tar.gz | |
Portability and Bugfixes
Diffstat (limited to 'include/cdf.h')
| -rw-r--r-- | include/cdf.h | 12 |
1 files changed, 4 insertions, 8 deletions
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 <stdlib.h> #include <unistd.h> #include <stdio.h> @@ -11,6 +14,7 @@ #include <ctype.h> #include <string.h> #include <stdint.h> +#include <inttypes.h> #include <assert.h> 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 - - |