1/* 2The contents of this file are subject to the Mozilla Public License 3Version 1.1 (the "License"); you may not use this file except in 4compliance with the License. You may obtain a copy of the License at 5http://www.mozilla.org/MPL/ 6 7Software distributed under the License is distributed on an "AS IS" 8basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 9License for the specific language governing rights and limitations 10under the License. 11 12The Original Code is expat. 13 14The Initial Developer of the Original Code is James Clark. 15Portions created by James Clark are Copyright (C) 1998, 1999 16James Clark. All Rights Reserved. 17 18Contributor(s): 19 20Alternatively, the contents of this file may be used under the terms 21of the GNU General Public License (the "GPL"), in which case the 22provisions of the GPL are applicable instead of those above. If you 23wish to allow use of your version of this file only under the terms of 24the GPL and not to allow others to use your version of this file under 25the MPL, indicate your decision by deleting the provisions above and 26replace them with the notice and other provisions required by the 27GPL. If you do not delete the provisions above, a recipient may use 28your version of this file under either the MPL or the GPL. 29*/ 30 31#include <string.h> 32 33#ifdef XML_WINLIB 34 35#define WIN32_LEAN_AND_MEAN 36#define STRICT 37#include <windows.h> 38 39#define malloc(x) HeapAlloc(GetProcessHeap(), 0, (x)) 40#define calloc(x, y) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (x)*(y)) 41#define free(x) HeapFree(GetProcessHeap(), 0, (x)) 42#define realloc(x, y) HeapReAlloc(GetProcessHeap(), 0, x, y) 43#define abort() /* as nothing */ 44 45#else /* not XML_WINLIB */ 46 47#include <stdlib.h> 48 49#endif /* not XML_WINLIB */ 50 51/* This file can be used for any definitions needed in 52particular environments. */ 53 54#ifdef MOZILLA 55 56#include "nspr.h" 57#define malloc(x) PR_Malloc(x) 58#define realloc(x, y) PR_Realloc((x), (y)) 59#define calloc(x, y) PR_Calloc((x),(y)) 60#define free(x) PR_Free(x) 61#define int int32 62 63#endif /* MOZILLA */ 64