arith.h 920 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. /* $Id$ */
  6. /* COMPILER ARITHMETIC */
  7. /* Normally the compiler does its internal arithmetics in longs
  8. native to the source machine, which is always good for local
  9. compilations, and generally OK too for cross compilations
  10. downwards and sidewards. For upwards cross compilation and
  11. to save storage on small machines, SPECIAL_ARITHMETICS will
  12. be handy.
  13. */
  14. #include "spec_arith.h"
  15. #ifndef SPECIAL_ARITHMETICS
  16. #include <em_arith.h> /* obtain definition of "arith" */
  17. #else /* SPECIAL_ARITHMETICS */
  18. /* All preprocessor arithmetic should be done in longs.
  19. */
  20. #define arith long /* dummy */
  21. #endif /* SPECIAL_ARITHMETICS */
  22. #define arith_size (sizeof(arith))
  23. #define arith_sign ((arith) 1 << (arith_size * 8 - 1))
  24. #define max_arith (~arith_sign)