summaryrefslogtreecommitdiff
path: root/security/mhash/files/patch-include-mutils-mincludes.h
diff options
context:
space:
mode:
authorPeter Pentchev <roam@FreeBSD.org>2008-01-16 15:46:05 +0000
committerPeter Pentchev <roam@FreeBSD.org>2008-01-16 15:46:05 +0000
commitd9983ccbfaaedc5fba6456549dabee4f713d8403 (patch)
tree7c93c7b77f036d92775f1d912aadf0e3bb8cedfc /security/mhash/files/patch-include-mutils-mincludes.h
parent- Update HPN patch to hpn12v20 (diff)
Update to mhash-0.9.9, fixing several style issues, lots of memory
leaks, and two serious (even if not easily triggered) bugs.
Notes
Notes: svn path=/head/; revision=205725
Diffstat (limited to 'security/mhash/files/patch-include-mutils-mincludes.h')
-rw-r--r--security/mhash/files/patch-include-mutils-mincludes.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/security/mhash/files/patch-include-mutils-mincludes.h b/security/mhash/files/patch-include-mutils-mincludes.h
new file mode 100644
index 000000000000..74158934e01d
--- /dev/null
+++ b/security/mhash/files/patch-include-mutils-mincludes.h
@@ -0,0 +1,46 @@
+diff -urN -x .svn ../../branches/mhash-dist/include/mutils/mincludes.h ./include/mutils/mincludes.h
+--- ../../branches/mhash-dist/include/mutils/mincludes.h 2008-01-16 02:34:17.000000000 +0200
++++ ./include/mutils/mincludes.h 2008-01-16 02:35:49.000000000 +0200
+@@ -100,20 +100,28 @@
+ #include <stdint.h>
+ #endif
+
+-#if !defined(INT_MAX)
+-#define INT_MAX ((int) (~0U>>1))
+-#endif
+-
+-#if !defined(MAXINT)
+-#define MAXINT INT_MAX
+-#endif
++#ifndef INT_MAX
++#ifdef INTMAX
++#define INT_MAX INTMAX
++#else /* INTMAX */
++#ifdef MAXINT
++#define INT_MAX MAXINT
++#else /* MAXINT */
++#error Cannot find either INT_MAX, INTMAX, or MAXINT
++#endif /* MAXINT */
++#endif /* INTMAX */
++#endif /* INT_MAX */
+
+-#if !defined(INT_MIN)
+-#define INT_MIN (-INT_MAX - 1)
+-#endif
+-
+-#if !defined(MININT)
+-#define MININT INT_MIN
+-#endif
++#ifndef INT_MIN
++#ifdef INTMIN
++#define INT_MIN INTMIN
++#else /* INTMIN */
++#ifdef MININT
++#define INT_MIN MININT
++#else /* MININT */
++#error Cannot find either INT_MIN, INTMIN, or MININT
++#endif /* MININT */
++#endif /* INTMIN */
++#endif /* INT_MIN */
+
+ #endif