[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

portability of SCHEME



How portable is MIT's source?


We are trying to port the MIT Scheme source to a DOS machine. The documentation
warns that long integers must be 32 bits, but nothing is said about normal
integers.
It so happens that many macros expand to code containing forms like the
folowing:
..
long mask = 1 << 24;
..
Now, our C compilers - Manx 3.2, Lattice, as well as Microsoft - take 16 bits
for an integer, and default constants to the same. The value of 'mask' in the
expression just mentioned therefor will be 0 after the assignment.
Questions:
1) Has anyone met this problem and found a way to circumvent it,
and/or
2) Does someone know about a C compiler that does not show this phenomenon.


NB. We know it does not suffice to turn all integers into longs, since they may
cause problems when used as parameters in a function call.


Scheme-team Nijmegen,
the Netherlands.