tclPort.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * tclPort.h --
  3. *
  4. * This header file handles porting issues that occur because
  5. * of differences between systems. It reads in platform specific
  6. * portability files.
  7. *
  8. * Copyright (c) 1994-1995 Sun Microsystems, Inc.
  9. *
  10. * See the file "license.terms" for information on usage and redistribution
  11. * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  12. */
  13. #ifndef _TCLPORT
  14. #define _TCLPORT
  15. #ifdef HAVE_TCL_CONFIG_H
  16. #include "tclConfig.h"
  17. #endif
  18. #if defined(_WIN32)
  19. # include "tclWinPort.h"
  20. #else
  21. # include "tclUnixPort.h"
  22. #endif
  23. #include "tcl.h"
  24. #if !defined(LLONG_MIN)
  25. # ifdef TCL_WIDE_INT_IS_LONG
  26. # define LLONG_MIN LONG_MIN
  27. # else
  28. # ifdef LLONG_BIT
  29. # define LLONG_MIN ((Tcl_WideInt)(Tcl_LongAsWide(1)<<(LLONG_BIT-1)))
  30. # else
  31. /* Assume we're on a system with a 64-bit 'long long' type */
  32. # define LLONG_MIN ((Tcl_WideInt)(Tcl_LongAsWide(1)<<63))
  33. # endif
  34. # endif
  35. /* Assume that if LLONG_MIN is undefined, then so is LLONG_MAX */
  36. # define LLONG_MAX (~LLONG_MIN)
  37. #endif
  38. #define UWIDE_MAX ((Tcl_WideUInt)-1)
  39. #define WIDE_MAX ((Tcl_WideInt)(UWIDE_MAX >> 1))
  40. #define WIDE_MIN ((Tcl_WideInt)((Tcl_WideUInt)WIDE_MAX+1))
  41. #endif /* _TCLPORT */