[exim-cvs] Test suite: make cf 64-bit compat for -exact.

Pàgina inicial
Delete this message
Reply to this message
Autor: Exim Git Commits Mailing List
Data:  
A: exim-cvs
Assumpte: [exim-cvs] Test suite: make cf 64-bit compat for -exact.
Gitweb: http://git.exim.org/exim.git/commitdiff/97a033f1d6addb0c5b62e5443b543a142b92bb9f
Commit:     97a033f1d6addb0c5b62e5443b543a142b92bb9f
Parent:     33191679e1a86ba6d9c38a74d0795d00c300f2c5
Author:     Phil Pennock <pdp@???>
AuthorDate: Fri Jan 21 07:26:27 2011 -0500
Committer:  Phil Pennock <pdp@???>
CommitDate: Fri Jan 21 07:26:27 2011 -0500


    Test suite: make cf 64-bit compat for -exact.


    I assume stdint.h and intptr_t available for any platform where we're
    running the test suite.
---
 test/src/cf.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)


diff --git a/test/src/cf.c b/test/src/cf.c
index 4dc3dc0..8931ba6 100644
--- a/test/src/cf.c
+++ b/test/src/cf.c
@@ -31,6 +31,11 @@ Translated back into C, March 1990! */
#ifdef __STDC__
#include <string.h>
#include <stdlib.h>
+#include <stdint.h>
+#endif
+
+#ifndef intptr_t
+# define intptr_t long long int
#endif

/* ----- parameters ----- */
@@ -354,7 +359,7 @@ if (lastline_one != NULL) lastline_one->next = nextline;
lastline_one = nextline;
pline_one = nextline;

-bufnext_one = (char *) (((int)bufnext_one+3) & (-4));
+bufnext_one = (char *) (((intptr_t)bufnext_one+ sizeof (intptr_t) - 1) & (-(sizeof (intptr_t))));
}


@@ -403,7 +408,7 @@ if (lastline_two != NULL) lastline_two->next = nextline;
lastline_two = nextline;
pline_two = nextline;

-bufnext_two = (char *) (((int)bufnext_two+3) & (-4));
+bufnext_two = (char *) (((intptr_t)bufnext_two+ sizeof (intptr_t) - 1) & (-(sizeof (intptr_t))));
}