readme_64-bit.txt 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. If you're using 64-bit processor - which nowadays is quite common - you can
  2. compile 4th as 64-bit compiler. To do this, just delete patch #02 before
  3. compilation. But read the following excerpt from original 4th docs first:
  4. 25.7 <sec:64-bit-platforms>64-bit platforms
  5. Although 4tH will work perfectly well on a 64-bit platform there
  6. are some disadvantages:
  7. • HX files generated by this compiler are not portable to 32-bit
  8. platforms
  9. • Some 4tH library files may not work properly without some
  10. modifications.
  11. A quick fix is to change the size of a cell to a four byte
  12. datatype. The following procedure will usually work. Open 4th.h
  13. and change these lines:
  14. #define CELL_MIN LONG_MIN
  15. #define CELL_MAX LONG_MAX
  16. typedef long cell;
  17. To this:
  18. #define CELL_MIN INT_MIN
  19. #define CELL_MAX INT_MAX
  20. typedef int cell;
  21. Save 4th.h and compile as described in the previous sections. If
  22. you want a full 64-bit 4tH compiler, be aware that:
  23. • You cannot compile 4tH as a shared library
  24. • You have to regenerate the include files manually, unless
  25. you're working with Linux.
  26. Linux automatically recreates the include files each time you
  27. perform a compile. If you're working with a GNU toolset, you may
  28. try the Linux Makefile. If that doesn't work or isn't an option
  29. in your particular situation you'll have to perform the procedure
  30. listed in section [sec:Regenerating-the-include].