forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mailx-8.1.2.20050715-offsetof.patch
36 lines (35 loc) · 1.53 KB
/
mailx-8.1.2.20050715-offsetof.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
diff -r -u mailx-8.1.2-0.20050715cvs.orig.orig/def.h mailx-8.1.2-0.20050715cvs.orig/def.h
--- mailx-8.1.2-0.20050715cvs.orig.orig/def.h 2003-10-14 21:50:20.000000000 +0900
+++ mailx-8.1.2-0.20050715cvs.orig/def.h 2010-03-31 10:29:37.000000000 +0900
@@ -97,7 +97,7 @@
* Given a file address, determine the block number it represents.
*/
#define blockof(off) ((int) ((off) / 4096))
-#define offsetof(off) ((int) ((off) % 4096))
+#define offsetofmailx(off) ((int) ((off) % 4096))
#define positionof(block, offset) ((off_t)(block) * 4096 + (offset))
/*
diff -r -u mailx-8.1.2-0.20050715cvs.orig.orig/edit.c mailx-8.1.2-0.20050715cvs.orig/edit.c
--- mailx-8.1.2-0.20050715cvs.orig.orig/edit.c 2004-05-25 01:34:32.000000000 +0900
+++ mailx-8.1.2-0.20050715cvs.orig/edit.c 2010-03-31 10:41:28.000000000 +0900
@@ -111,7 +111,7 @@
(void)fseek(otf, 0L, 2);
size = ftell(otf);
mp->m_block = blockof(size);
- mp->m_offset = offsetof(size);
+ mp->m_offset = offsetofmailx(size);
mp->m_size = fsize(fp);
mp->m_lines = 0;
mp->m_flag |= MODIFY;
diff -r -u mailx-8.1.2-0.20050715cvs.orig.orig/fio.c mailx-8.1.2-0.20050715cvs.orig/fio.c
--- mailx-8.1.2-0.20050715cvs.orig.orig/fio.c 2004-05-25 01:34:32.000000000 +0900
+++ mailx-8.1.2-0.20050715cvs.orig/fio.c 2010-03-31 10:29:28.000000000 +0900
@@ -139,7 +139,7 @@
this.m_size = 0;
this.m_lines = 0;
this.m_block = blockof(offset);
- this.m_offset = offsetof(offset);
+ this.m_offset = offsetofmailx(offset);
inhead = 1;
} else if (linebuf[0] == 0) {
inhead = 0;