2000-04-21 00:20:31 -04:00
|
|
|
/*
|
|
|
|
Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
|
|
|
|
See the file copying.txt for copying permission.
|
|
|
|
*/
|
1998-04-05 11:11:29 -04:00
|
|
|
|
1998-11-24 03:39:10 -05:00
|
|
|
#include <string.h>
|
|
|
|
|
1998-11-24 03:06:55 -05:00
|
|
|
#ifdef XML_WINLIB
|
|
|
|
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#define STRICT
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
#define malloc(x) HeapAlloc(GetProcessHeap(), 0, (x))
|
|
|
|
#define calloc(x, y) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (x)*(y))
|
|
|
|
#define free(x) HeapFree(GetProcessHeap(), 0, (x))
|
|
|
|
#define realloc(x, y) HeapReAlloc(GetProcessHeap(), 0, x, y)
|
|
|
|
#define abort() /* as nothing */
|
|
|
|
|
|
|
|
#else /* not XML_WINLIB */
|
|
|
|
|
1998-11-24 02:39:10 -05:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
1998-11-24 03:39:10 -05:00
|
|
|
#endif /* not XML_WINLIB */
|
1998-11-24 03:06:55 -05:00
|
|
|
|
2000-04-21 00:20:31 -04:00
|
|
|
/* This file can be used for any definitions needed in
|
1998-03-07 22:39:56 -05:00
|
|
|
particular environments. */
|
|
|
|
|
2000-05-09 23:05:46 -04:00
|
|
|
/* Mozilla specific defines */
|
|
|
|
|
|
|
|
#ifdef MOZILLA_CLIENT
|
1998-03-07 22:39:56 -05:00
|
|
|
|
|
|
|
#include "nspr.h"
|
2000-05-09 23:05:46 -04:00
|
|
|
#define malloc(x) PR_Malloc((size_t)(x))
|
|
|
|
#define realloc(x, y) PR_Realloc((x), (size_t)(y))
|
1998-03-08 20:26:05 -05:00
|
|
|
#define calloc(x, y) PR_Calloc((x),(y))
|
1998-03-07 22:39:56 -05:00
|
|
|
#define free(x) PR_Free(x)
|
2000-05-09 23:05:46 -04:00
|
|
|
#if PR_BYTES_PER_INT != 4
|
1998-03-07 22:39:56 -05:00
|
|
|
#define int int32
|
2000-05-09 23:05:46 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Enable Unicode string processing in expat. */
|
|
|
|
#ifndef XML_UNICODE
|
|
|
|
#define XML_UNICODE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Enable external parameter entity parsing in expat */
|
|
|
|
#ifndef XML_DTD
|
|
|
|
#define XML_DTD 1
|
|
|
|
#endif
|
1998-03-07 22:39:56 -05:00
|
|
|
|
2000-05-09 23:05:46 -04:00
|
|
|
#endif /* MOZILLA_CLIENT */
|