I've attached a little patch to cmd4.c to get it to compile cleanly on 64-bit (Ubuntu). The patch is against r1867.
64-bit warning cleanliness patch
Collapse
X
-
Tags: None
-
-
Comment
-
One-line fix for C99 compilers (including GCC on Ubuntu):
Casting void* to intptr_t is always safe in C99. MSVC doesn't have stdint.h as it only implements C90, so the above isn't usable as-is.Code:- int page = (int)vpage; + intptr_t page = (intptr_t)vpage);
Note that on sufficiently strict hardware, you die on the function call to do_cmd_option_aux anyway. If the hardware both requires special pointer registers to do anything, and faults instantly on an invalid pointer entering those registers: fatality during evaluating the arguments for the function call, if not in constructing the reference data structs to begin with.
So, if MSVC is to be supported, the given patch is indeed minimal.Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg.
Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.)
Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011Comment
-
(which is already happening, and will typedef size_t even in C90) Unfortunately, it's implementation-defined in C99 whether size_t is the same as uintptr_t.Code:#include <stddef.h>
Yes. That's probably not what's frying 64-bit *NIX, however.Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg.
Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.)
Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011Comment
Comment