summaryrefslogtreecommitdiff
path: root/math/readstat
diff options
context:
space:
mode:
authorAdriaan de Groot <adridg@FreeBSD.org>2023-02-19 14:02:54 +0100
committerAdriaan de Groot <adridg@FreeBSD.org>2023-02-19 14:07:52 +0100
commita46fb43e0e75b4099d7ea35b7072a3c2ca9362b1 (patch)
tree7f2ca2b23b31b7a5138e530a76378fc65408fbf7 /math/readstat
parentdevel/bear: Update to 3.1.1 (diff)
math/readstat: fix build on 14-CURRENT
In 14-CURRENT, the system compiler is more strict; it looks like In file included from src/readstat_bits.c:9: src/readstat_bits.h:10:29: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] int machine_is_little_endian(); Apply the stricter flags in all builds, then fix the source so that the prototypes are explicitly (void) -- this is a subtlely of C semantics where (void) means "no arguments" and () means "arguments unspecified" that rarely matters. Except now.
Diffstat (limited to 'math/readstat')
-rw-r--r--math/readstat/Makefile3
-rw-r--r--math/readstat/files/patch-src_readstat__bits.h11
-rw-r--r--math/readstat/files/patch-src_readstat__variable.c11
-rw-r--r--math/readstat/files/patch-src_sas_ieee.c11
-rw-r--r--math/readstat/files/patch-src_spss_readstat__por.h11
5 files changed, 47 insertions, 0 deletions
diff --git a/math/readstat/Makefile b/math/readstat/Makefile
index b42ad343b6a1..ed2be537b797 100644
--- a/math/readstat/Makefile
+++ b/math/readstat/Makefile
@@ -1,5 +1,6 @@
PORTNAME= readstat
DISTVERSION= 1.1.8
+PORTREVISION= 1
CATEGORIES= math kde
MASTER_SITES= https://github.com/WizardMac/ReadStat/releases/download/v${DISTVERSION}/
@@ -12,4 +13,6 @@ LICENSE= MIT
USES= libtool
HAS_CONFIGURE= yes
+CFLAGS+= -Werror -Wstrict-prototypes
+
.include <bsd.port.mk>
diff --git a/math/readstat/files/patch-src_readstat__bits.h b/math/readstat/files/patch-src_readstat__bits.h
new file mode 100644
index 000000000000..83dde0c07762
--- /dev/null
+++ b/math/readstat/files/patch-src_readstat__bits.h
@@ -0,0 +1,11 @@
+--- src/readstat_bits.h.orig 2023-02-19 12:35:46 UTC
++++ src/readstat_bits.h
+@@ -7,7 +7,7 @@
+ #undef READSTAT_MACHINE_IS_TWOS_COMPLEMENT
+ #define READSTAT_MACHINE_IS_TWOS_COMPLEMENT 0
+
+-int machine_is_little_endian();
++int machine_is_little_endian(void);
+
+ char ones_to_twos_complement1(char num);
+ int16_t ones_to_twos_complement2(int16_t num);
diff --git a/math/readstat/files/patch-src_readstat__variable.c b/math/readstat/files/patch-src_readstat__variable.c
new file mode 100644
index 000000000000..699c88937a9e
--- /dev/null
+++ b/math/readstat/files/patch-src_readstat__variable.c
@@ -0,0 +1,11 @@
+--- src/readstat_variable.c.orig 2023-02-19 12:39:09 UTC
++++ src/readstat_variable.c
+@@ -2,7 +2,7 @@
+ #include <stdlib.h>
+ #include "readstat.h"
+
+-static readstat_value_t make_blank_value();
++static readstat_value_t make_blank_value(void);
+ static readstat_value_t make_double_value(double dval);
+
+ static readstat_value_t make_blank_value() {
diff --git a/math/readstat/files/patch-src_sas_ieee.c b/math/readstat/files/patch-src_sas_ieee.c
new file mode 100644
index 000000000000..beab46c1713d
--- /dev/null
+++ b/math/readstat/files/patch-src_sas_ieee.c
@@ -0,0 +1,11 @@
+--- src/sas/ieee.c.orig 2023-02-19 12:37:34 UTC
++++ src/sas/ieee.c
+@@ -16,7 +16,7 @@ static void ieee2xpt(unsigned char *ieee, unsigned cha
+
+ #ifndef FLOATREP
+ #define FLOATREP get_native()
+-int get_native();
++int get_native(void);
+ #endif
+
+ void memreverse(void *intp_void, int l) {
diff --git a/math/readstat/files/patch-src_spss_readstat__por.h b/math/readstat/files/patch-src_spss_readstat__por.h
new file mode 100644
index 000000000000..7649ac223461
--- /dev/null
+++ b/math/readstat/files/patch-src_spss_readstat__por.h
@@ -0,0 +1,11 @@
+--- src/spss/readstat_por.h.orig 2023-02-19 12:38:04 UTC
++++ src/spss/readstat_por.h
+@@ -31,7 +31,7 @@ typedef struct por_ctx_s {
+ ck_hash_table_t *var_dict;
+ } por_ctx_t;
+
+-por_ctx_t *por_ctx_init();
++por_ctx_t *por_ctx_init(void);
+ void por_ctx_free(por_ctx_t *ctx);
+ ssize_t por_utf8_encode(const unsigned char *input, size_t input_len,
+ char *output, size_t output_len, uint16_t lookup[256]);