diff options
author | kris <kris@FreeBSD.org> | 2002-10-05 21:00:05 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2002-10-05 21:00:05 +0000 |
commit | ad632f082de1e239b9ff17cc9129301780335713 (patch) | |
tree | 12c70bbf36aa03798f033f0fd699e7d3b2dcec9e /math | |
parent | 9f0ceea3a8ffa991e0b7cb9cf7b29691e840ae9f (diff) | |
download | FreeBSD-ports-ad632f082de1e239b9ff17cc9129301780335713.zip FreeBSD-ports-ad632f082de1e239b9ff17cc9129301780335713.tar.gz |
Fix build without <values.h> present
Diffstat (limited to 'math')
-rw-r--r-- | math/snns/files/patch-ah | 33 | ||||
-rw-r--r-- | math/snns/files/patch-ai | 28 |
2 files changed, 61 insertions, 0 deletions
diff --git a/math/snns/files/patch-ah b/math/snns/files/patch-ah new file mode 100644 index 0000000..0361725 --- /dev/null +++ b/math/snns/files/patch-ah @@ -0,0 +1,33 @@ +--- kernel/sources/learn_f.c.orig Sat Sep 28 20:55:45 2002 ++++ kernel/sources/learn_f.c Sat Sep 28 20:56:31 2002 +@@ -33,6 +33,8 @@ + #include <math.h> + #ifdef HAVE_VALUES_H + #include <values.h> ++#else ++#include <limits.h> + #endif + #include <ctype.h> + +@@ -3896,8 +3898,8 @@ + + /* NULL before first unit */ + topo_ptr = topo_ptr_array; +- xmin_in = ymin_in = MAXINT; +- xmax_in = ymax_in = -MAXINT; ++ xmin_in = ymin_in = INT_MAX; ++ xmax_in = ymax_in = -INT_MAX; + + while ( (input_unit_ptr = * ++topo_ptr ) != NULL) + { +@@ -3967,8 +3969,8 @@ + + /* topo_ptr points now to the NULL before first output unit */ + +- xmin_out = ymin_out = MAXINT; +- xmax_out = ymax_out = -MAXINT; ++ xmin_out = ymin_out = INT_MAX; ++ xmax_out = ymax_out = -INT_MAX; + + while ( (output_unit_ptr = * ++topo_ptr ) != NULL) + { diff --git a/math/snns/files/patch-ai b/math/snns/files/patch-ai new file mode 100644 index 0000000..7e50a1d --- /dev/null +++ b/math/snns/files/patch-ai @@ -0,0 +1,28 @@ +--- kernel/sources/kr_mem.c.orig Sat Sep 28 20:55:39 2002 ++++ kernel/sources/kr_mem.c Sat Sep 28 20:56:45 2002 +@@ -26,6 +26,7 @@ + #include <values.h> + #else + #include <math.h> ++#include <limits.h> + #endif + + +@@ -1023,7 +1024,7 @@ + + if ( (n_ptr = krm_NTableSymbolSearch( symbol_name, symbol_type ) ) != NULL) + { /* symbol is already in the name table */ +- if ((n_ptr->ref_count) < ((unsigned short) MAXSHORT)) { ++ if ((n_ptr->ref_count) < ((unsigned short) SHRT_MAX)) { + n_ptr->ref_count++; + } + return( n_ptr->Entry.symbol ); +@@ -1052,7 +1053,7 @@ + if (symbol_name == NULL) return; + if ( (n_ptr = krm_NTableSymbolSearch( symbol_name, symbol_type ) ) != NULL) + { /* symbol is in the name table */ +- if ((n_ptr->ref_count) < ((unsigned short) MAXSHORT)) ++ if ((n_ptr->ref_count) < ((unsigned short) SHRT_MAX)) + { /* No. of references to this symbol don't exceed the max. reference + count. This means it is possible to delete the symbol if the + reference count is zero. |