Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.7 KiB

  1. /* -----------------------------------------------------------------------------
  2. * See the LICENSE file for information on copyright, usage and redistribution
  3. * of SWIG, and the README file for authors - http://www.swig.org/release.html.
  4. *
  5. * swigarch.i
  6. *
  7. * SWIG library file for 32bit/64bit code specialization and checking.
  8. *
  9. * Use only in extreme cases, when no arch. independent code can be
  10. * generated
  11. *
  12. * To activate architecture specific code, use
  13. *
  14. * swig -DSWIGWORDSIZE32
  15. *
  16. * or
  17. *
  18. * swig -DSWIGWORDSIZE64
  19. *
  20. * Note that extra checking code will be added to the wrapped code,
  21. * which will prevent the compilation in a different architecture.
  22. *
  23. * If you don't specify the SWIGWORDSIZE (the default case), swig will
  24. * generate architecture independent and/or 32bits code, with no extra
  25. * checking code added.
  26. * ----------------------------------------------------------------------------- */
  27. #if !defined(SWIGWORDSIZE32) && !defined(SWIGWORDSIZE64)
  28. # if (__WORDSIZE == 32)
  29. # define SWIGWORDSIZE32
  30. # endif
  31. #endif
  32. #if !defined(SWIGWORDSIZE64) && !defined(SWIGWORDSIZE32)
  33. # if defined(__x86_64) || defined(__x86_64__) || (__WORDSIZE == 64)
  34. # define SWIGWORDSIZE64
  35. # endif
  36. #endif
  37. #ifdef SWIGWORDSIZE32
  38. %{
  39. #define SWIGWORDSIZE32
  40. #ifndef LONG_MAX
  41. #include <limits.h>
  42. #endif
  43. #if (__WORDSIZE == 64) || (LONG_MAX != INT_MAX)
  44. # error "SWIG wrapped code invalid in 64 bit architecture, regenarete code using -DSWIGWORDSIZE64"
  45. #endif
  46. %}
  47. #endif
  48. #ifdef SWIGWORDSIZE64
  49. %{
  50. #define SWIGWORDSIZE64
  51. #ifndef LONG_MAX
  52. #include <limits.h>
  53. #endif
  54. #if (__WORDSIZE == 32) || (LONG_MAX == INT_MAX)
  55. # error "SWIG wrapped code invalid in 32 bit architecture, regenarete code using -DSWIGWORDSIZE32"
  56. #endif
  57. %}
  58. #endif