openjade-1.3.2-wchar_t-uint.patch 496 B

123456789101112131415161718192021222324252627
  1. This fixes Cygwin, where wchar_t is ushort.
  2. --- a/grove/Node.h
  3. +++ b/grove/Node.h
  4. @@ -8,6 +8,7 @@
  5. #endif
  6. #include <stddef.h>
  7. +#include <limits.h>
  8. #include "IList.h"
  9. #ifdef SP_USE_DLL
  10. @@ -34,10 +35,10 @@
  11. #endif
  12. #ifdef SP_MULTI_BYTE
  13. -#ifdef SP_WCHAR_T_USHORT
  14. -typedef wchar_t GroveChar;
  15. -#else
  16. +#if UINT_MAX >= 0xffffffffL /* 2^32 - 1 */
  17. typedef unsigned int GroveChar;
  18. +#else
  19. +typedef unsigned long GroveChar;
  20. #endif
  21. #else /* not SP_MULTI_BYTE */
  22. typedef unsigned char GroveChar;