Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: dev

[Bug 1171] eval should support 64bit values

 

 

exim dev RSS feed   Index | Next | Previous | View Threaded


jgh146exb at wizmail

May 8, 2012, 2:43 PM

Post #1 of 7 (477 views)
Permalink
[Bug 1171] eval should support 64bit values

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1171

Jeremy Harris <jgh146exb [at] wizmail> changed:

What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|nigel [at] exim |jgh146exb [at] wizmail




--- Comment #2 from Jeremy Harris <jgh146exb [at] wizmail> 2012-05-08 22:43:22 ---
I've pushed a branch with this. It passes the testsuite as cleanly as the
mainline does, modulo obvious changes and additions for the limits on number
size.

I'm wary of just throwing it into the mailing without more eyes to review. In
particular there's a simpleminded assumption that "%lld" does the right thing
with an int64 in sprintf/sscanf (and, indeed, that int64 is usable).


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


pdp at exim

May 8, 2012, 3:07 PM

Post #2 of 7 (462 views)
Permalink
[Bug 1171] eval should support 64bit values [In reply to]

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1171

Phil Pennock <pdp [at] exim> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |pdp [at] exim




--- Comment #3 from Phil Pennock <pdp [at] exim> 2012-05-08 23:07:53 ---
We still build on various older Unices, including Irix and HP-UX, I believe.
At least, those are the main non-BSD/Linux/Solaris ones that have triggered
bug-reports after releases.

Anyone know how up-to-date those are with the C99isms like int64_t ?

Perhaps something like int_eximarith_t which can be set in config.h, defaulting
to int64_t but which can be set back to "int" in os.h-$OS ?

A non-binding suggestion ...


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


jgh146exb at wizmail

May 11, 2012, 6:24 AM

Post #3 of 7 (449 views)
Permalink
[Bug 1171] eval should support 64bit values [In reply to]

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1171

Jeremy Harris <jgh146exb [at] wizmail> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED




--- Comment #4 from Jeremy Harris <jgh146exb [at] wizmail> 2012-05-11 14:24:11 ---
I'm happy with that approach.

+/* Sizes for integer arithmetic. Go for 64bit; can be overridden in
OS/os.h-FOO */
+#define int_eximarith_t int64_t
+#define PR_EXIM_ARITH "%" PRId64 /* C99 standard, printf %lld */
+#define SC_EXIM_ARITH "%" SCNi64 /* scanf incl. 0x prefix */
+#define SC_EXIM_DEC "%" SCNd64 /* scanf decimal */
+
/* End of config.h.defaults */


Unless I hear objections I'll commit in a couple of days. Note that I've not
compiled on anything but Linux (SL6). Who does the builds for those older
platforms?


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


pdp at exim

May 11, 2012, 4:34 PM

Post #4 of 7 (443 views)
Permalink
[Bug 1171] eval should support 64bit values [In reply to]

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1171




--- Comment #5 from Phil Pennock <pdp [at] exim> 2012-05-12 00:34:13 ---
Depending on where you put those, do they need #ifndef guards?

The maintainers do builds on whatever OSes they happen to use. We put out
release candidates. Those who care about other OSes raise any issues which
they encounter.

I tried formalising this in terms of support class and whether we get response
for a given OS, there was really very little take up. So it remains loose.

In practice, Linux (for most maintainers?) and FreeBSD (for myself) get most
testing; Solaris gets checked solidly, MacOS perhaps. We find out about Irix
and HP-UX either with RCs or with a release; I think my pointed comments after
a previous release led to more RC testing there.

I have some thoughts for improving the base level and combinations of testing,
but that's unlikely to get anywhere before the next release.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


jgh146exb at wizmail

May 13, 2012, 2:44 PM

Post #5 of 7 (431 views)
Permalink
[Bug 1171] eval should support 64bit values [In reply to]

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1171

Jeremy Harris <jgh146exb [at] wizmail> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED




--- Comment #6 from Jeremy Harris <jgh146exb [at] wizmail> 2012-05-13 22:44:57 ---
Guards added, 8fd715e80d7848f pushed.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


git at exim

May 13, 2012, 3:17 PM

Post #6 of 7 (435 views)
Permalink
[Bug 1171] eval should support 64bit values [In reply to]

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1171

Git Commit <git [at] exim> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |git [at] exim




--- Comment #7 from Git Commit <git [at] exim> 2012-05-13 23:17:05 ---
Git commit:
http://git.exim.org/exim.git/commitdiff/aa7c82b2e34a4b0b341c6d05f81b4a349dcd06be

commit aa7c82b2e34a4b0b341c6d05f81b4a349dcd06be
Author: Jeremy Harris <jgh146exb [at] wizmail>
AuthorDate: Mon Apr 23 22:47:58 2012 +0100
Commit: Jeremy Harris <jgh146exb [at] wizmail>
CommitDate: Sun May 13 17:15:11 2012 +0100

make integer values 64bit (bug 1171).
----
src/src/expand.c | 109 +++++++++++++++++++++---------------------
src/src/functions.h | 2 +-
test/confs/0439 | 2 +-
test/log/0439 | 6 +-
test/paniclog/0439 | 6 +-
test/scripts/0000-Basic/0002 | 3 +
test/stderr/0439 | 6 +-
test/stdout/0002 | 7 ++-
8 files changed, 74 insertions(+), 67 deletions(-)


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


pdp at exim

May 16, 2012, 4:55 AM

Post #7 of 7 (456 views)
Permalink
[Bug 1171] eval should support 64bit values [In reply to]

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1171




--- Comment #8 from Phil Pennock <pdp [at] exim> 2012-05-16 12:55:10 ---
cc expand.c
expand.c: In function ‘compute_nhash’:
expand.c:1223: warning: format ‘%d’ expects type ‘int’, but argument 2
has type ‘long unsigned int’
expand.c:1231: warning: format ‘%d’ expects type ‘int’, but argument 2
has type ‘long unsigned int’
expand.c:1231: warning: format ‘%d’ expects type ‘int’, but argument 3
has type ‘long unsigned int’
expand.c: In function ‘find_variable’:
expand.c:1523: warning: format ‘%d’ expects type ‘int’, but argument 4
has type ‘long unsigned int’
expand.c: In function ‘eval_number’:
expand.c:3107: error: expected ‘:’ before ‘SCNd64’
expand.c: In function ‘eval_op_mult’:
expand.c:3188: error: expected ‘)’ before ‘PRId64’
expand.c:3189: warning: spurious trailing ‘%’ in format
expand.c: In function ‘expand_string_internal’:
expand.c:4301: warning: too many arguments for format
expand.c:5713: warning: field precision should have type ‘int’, but
argument 3 has type ‘long int’
expand.c:5716: error: expected ‘)’ before ‘PRId64’
expand.c:5716: warning: spurious trailing ‘%’ in format
expand.c:5708: warning: unused variable ‘n’
expand.c:5912: warning: format ‘%ld’ expects type ‘long int’, but
argument 9 has type ‘off_t’
make: *** [expand.o] Error 1

This is on MacOS. Missing <inttypes.h>; adding to exim.h fixes it, but that's
C99 which will break on some of our supported platforms, perhaps. We'll find
out during RC.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##

exim dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.