Counter Strike : Global Offensive Source Code
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.

92 lines
2.6 KiB

  1. /*===========================================================================
  2. xmlcfg.h
  3. Global/platform spesific definitions + configuration for
  4. GNU libiconv support etc.
  5. ===========================================================================*/
  6. #ifndef XMLCFG__H
  7. #define XMLCFG__H
  8. #ifdef ICONV_SUPPORT
  9. #include "iconv.h"
  10. #else
  11. /* definitions for BufferedIStream encoding callback's encerr error values
  12. (same as errnos set by iconv function) */
  13. #include <errno.h>
  14. #ifndef E2BIG
  15. /* there isn't enough space in outbuf for multibyte char -
  16. request for enlarge the buffer */
  17. #define E2BIG 7
  18. #endif
  19. #ifndef EINVAL
  20. /* partial character in inbuf */
  21. #define EINVAL 22
  22. #endif
  23. #ifndef EILSEQ
  24. /* illegal character in inbuf */
  25. #define EILSEQ 42
  26. #endif
  27. #endif /* ICONV_SUPPORT */
  28. /* util routines: */
  29. #ifndef HAS_STRICMP
  30. extern int stricmp(const char *s1, const char *s2);
  31. #endif
  32. extern unsigned char* xmlMemdup(unsigned char* buf, int len);
  33. /* <stdint.h> would do the trick... but: */
  34. #if (defined(__GNUC__) && defined(__i386__) && !defined(UINT16))
  35. #define UINT16 unsigned short int
  36. #define INT16 short int
  37. #define UINT32 unsigned long int
  38. #define INT32 long int
  39. #endif
  40. #if (defined(_MSC_VER) && !defined(UINT16))
  41. #define UINT16 unsigned short int
  42. #define INT16 short int
  43. #define UINT32 unsigned long int
  44. #define INT32 long int
  45. #endif
  46. #if (defined(__BORLANDC__) && !defined(UINT16))
  47. #define UINT16 unsigned short int
  48. #define INT16 short int
  49. #define UINT32 unsigned long int
  50. #define INT32 long int
  51. #endif
  52. #if (defined(VAXC) && !defined(UINT16))
  53. #define UINT16 unsigned short int
  54. #define INT16 short int
  55. #define UINT32 unsigned long int
  56. #define INT32 long int
  57. #endif
  58. #if (defined(_IBMR2) && !defined(UINT16))
  59. #define UINT16 unsigned short int
  60. #define INT16 short int
  61. #define UINT32 unsigned long int
  62. #define INT32 long int
  63. #endif
  64. #if (defined(sparc) && !defined(UINT16))
  65. #define UINT16 unsigned short int
  66. #define INT16 short int
  67. #define UINT32 unsigned int
  68. #define INT32 int
  69. #endif
  70. #if (defined(__mips) && !defined(UINT16))
  71. #define UINT16 unsigned short int
  72. #define INT16 short int
  73. #define UINT32 unsigned int
  74. #define INT32 int
  75. #endif
  76. #ifndef UINT32
  77. #error "Error: UINT32 cannot be determined for your platform - You must define it manually."
  78. #endif
  79. #endif /* XMLCFG__H */