about summary refs log tree commit diff
path: root/externals/max-long.patch
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-05-12T22·13+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-05-12T22·13+0000
commitaa45027818af8976dc73e6a299d5d918e5c51df1 (patch)
tree6086eb0642bc90477397169d0ee3993c1789200e /externals/max-long.patch
parenta0e3b84fac56cad6377ecd1462058a6b29bb1ea8 (diff)
parent8032f26ca0bd2233de066ce5786ff976bbd641ae (diff)
* Sync with the trunk.
Diffstat (limited to 'externals/max-long.patch')
-rw-r--r--externals/max-long.patch77
1 files changed, 0 insertions, 77 deletions
diff --git a/externals/max-long.patch b/externals/max-long.patch
deleted file mode 100644
index a2f260b970b3..000000000000
--- a/externals/max-long.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-diff -rc aterm-2.8-orig/aterm/hash.c aterm-2.8/aterm/hash.c
-*** aterm-2.8-orig/aterm/hash.c	2008-11-10 13:54:22.000000000 +0100
---- aterm-2.8/aterm/hash.c	2009-01-27 18:14:14.000000000 +0100
-***************
-*** 93,146 ****
-  }
-  
-  /*}}}  */
-- /*{{{  static long calc_long_max() */
-- static long calc_long_max()
-- {
--   long try_long_max;
--   long long_max;
--   long delta;
-- 
--   try_long_max = 1;
--   do {
--     long_max = try_long_max;
--     try_long_max = long_max * 2;
--   } while (try_long_max > 0);
-- 
--   delta = long_max;
--   while (delta > 1) {
--     while (long_max + delta < 0) {
--       delta /= 2;
--     }
--     long_max += delta;
--   }
-- 
--   return long_max;
-- 
-- }
-- /*}}}  */
-  /*{{{  static long calculateNewSize(sizeMinus1, nrdel, nrentries) */
-  
-  static long calculateNewSize
-  (long sizeMinus1, long nr_deletions, long nr_entries)
-  { 
-- 
--   /* Hack: LONG_MAX (limits.h) is often unreliable, we need to find
--    * out the maximum possible value of a signed long dynamically.
--    */
--   static long st_long_max = 0;
-- 
--   /* the resulting length has the form 2^k-1 */
-- 
-    if (nr_deletions >= nr_entries/2) { 
-      return sizeMinus1;
-    }
-  
-!   if (st_long_max == 0) {
-!     st_long_max = calc_long_max();
-!   }
-! 
-!   if (sizeMinus1 > st_long_max / 2) {
-!     return st_long_max-1;
-    }
-  
-    return (2*sizeMinus1)+1;
---- 93,109 ----
-  }
-  
-  /*}}}  */
-  /*{{{  static long calculateNewSize(sizeMinus1, nrdel, nrentries) */
-  
-  static long calculateNewSize
-  (long sizeMinus1, long nr_deletions, long nr_entries)
-  { 
-    if (nr_deletions >= nr_entries/2) { 
-      return sizeMinus1;
-    }
-  
-!   if (sizeMinus1 > LONG_MAX / 2) {
-!     return LONG_MAX-1;
-    }
-  
-    return (2*sizeMinus1)+1;