2
0

xmldef.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
  3. See the file copying.txt for copying permission.
  4. */
  5. #include <string.h>
  6. #ifdef XML_WINLIB
  7. #define WIN32_LEAN_AND_MEAN
  8. #ifndef STRICT
  9. #define STRICT 1
  10. #endif
  11. #include <windows.h>
  12. #define malloc(x) HeapAlloc(GetProcessHeap(), 0, (x))
  13. #define calloc(x, y) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (x)*(y))
  14. #define free(x) HeapFree(GetProcessHeap(), 0, (x))
  15. #define realloc(x, y) HeapReAlloc(GetProcessHeap(), 0, x, y)
  16. #define abort() /* as nothing */
  17. #else /* not XML_WINLIB */
  18. #include <stdlib.h>
  19. #endif /* not XML_WINLIB */
  20. /* This file can be used for any definitions needed in
  21. particular environments. */
  22. /* Mozilla specific defines */
  23. #ifdef MOZILLA_CLIENT
  24. #include "nspr.h"
  25. #define malloc(x) PR_Malloc((size_t)(x))
  26. #define realloc(x, y) PR_Realloc((x), (size_t)(y))
  27. #define calloc(x, y) PR_Calloc((x),(y))
  28. #define free(x) PR_Free(x)
  29. #if PR_BYTES_PER_INT != 4
  30. #define int int32
  31. #endif
  32. /* Enable Unicode string processing in expat. */
  33. #ifndef XML_UNICODE
  34. #define XML_UNICODE
  35. #endif
  36. #endif /* MOZILLA_CLIENT */