summaryrefslogtreecommitdiff
path: root/archivers/ruby-lha/files/patch-math-remainder
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--archivers/ruby-lha/files/patch-math-remainder65
1 files changed, 0 insertions, 65 deletions
diff --git a/archivers/ruby-lha/files/patch-math-remainder b/archivers/ruby-lha/files/patch-math-remainder
deleted file mode 100644
index fbcf5c58d7bc..000000000000
--- a/archivers/ruby-lha/files/patch-math-remainder
+++ /dev/null
@@ -1,65 +0,0 @@
-Ruby 2.x #includes <math.h>, which declares a function named
-remainder(). We must rename our variable to avoid name-conflict
-and allow this code to compile with Ruby-2.x
-
- -mi
-
---- ext/slide.c.orig 2006-09-17 17:45:51 UTC
-+++ ext/slide.c
-@@ -87,7 +87,7 @@ static struct decode_option decode_set;
-
- static unsigned int txtsiz;
- static unsigned long dicsiz;
--static unsigned int remainder;
-+static unsigned int iremainder;
-
- struct matchdata {
- int len;
-@@ -162,7 +162,7 @@ update_dict(pos, crc)
-
- n = fread_crc(crc, &text[txtsiz - dicsiz], dicsiz, infile);
-
-- remainder += n;
-+ iremainder += n;
-
- *pos -= dicsiz;
- for (i = 0; i < HSHSIZ; i++) {
-@@ -270,7 +270,7 @@ search_dict(token, pos, min, m)
- /* re-search */
- search_dict_1(token, pos, 0, off+2, m);
-
-- if (m->len > remainder) m->len = remainder;
-+ if (m->len > iremainder) m->len = iremainder;
- }
-
- /* slide dictionary */
-@@ -280,7 +280,7 @@ next_token(token, pos, crc)
- unsigned int *pos;
- unsigned int *crc;
- {
-- remainder--;
-+ iremainder--;
- if (++*pos >= txtsiz - maxmatch) {
- update_dict(pos, crc);
- #ifdef DEBUG
-@@ -316,17 +316,17 @@ encode(intf)
- encode_set.encode_start();
- memset(text, ' ', TXTSIZ);
-
-- remainder = fread_crc(&crc, &text[dicsiz], txtsiz-dicsiz, infile);
-+ iremainder = fread_crc(&crc, &text[dicsiz], txtsiz-dicsiz, infile);
-
- match.len = THRESHOLD - 1;
- match.off = 0;
-- if (match.len > remainder) match.len = remainder;
-+ if (match.len > iremainder) match.len = iremainder;
-
- pos = dicsiz;
- token = INIT_HASH(pos);
- insert_hash(token, pos); /* associate token and pos */
-
-- while (remainder > 0 && ! unpackable) {
-+ while (iremainder > 0 && ! unpackable) {
- last = match;
-
- next_token(&token, &pos, &crc);