diff options
author | Kris Kennaway <kris@FreeBSD.org> | 2002-10-05 21:00:05 +0000 |
---|---|---|
committer | Kris Kennaway <kris@FreeBSD.org> | 2002-10-05 21:00:05 +0000 |
commit | 8193f9108d136a7aeed5d51f33015db974330e54 (patch) | |
tree | 8bad2a3e2d7544796aeb11939e4444a47cc3b2fe /math/snns/files/patch-ai | |
parent | Fix build by disabling use of <values.h> (diff) |
Fix build without <values.h> present
Notes
Notes:
svn path=/head/; revision=67399
Diffstat (limited to 'math/snns/files/patch-ai')
-rw-r--r-- | math/snns/files/patch-ai | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/math/snns/files/patch-ai b/math/snns/files/patch-ai new file mode 100644 index 000000000000..7e50a1d85881 --- /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. |