1 /*
2 expat XML parser
3 Copyright (C) 1998 James Clark
4 
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 */
19 
20 #include <string.h>
21 
22 #ifdef XML_WINLIB
23 
24 #define WIN32_LEAN_AND_MEAN
25 #define STRICT
26 #include <windows.h>
27 
28 #define malloc(x) HeapAlloc(GetProcessHeap(), 0, (x))
29 #define calloc(x, y) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (x)*(y))
30 #define free(x) HeapFree(GetProcessHeap(), 0, (x))
31 #define realloc(x, y) HeapReAlloc(GetProcessHeap(), 0, x, y)
32 #define abort() /* as nothing */
33 
34 #else /* not XML_WINLIB */
35 
36 #include <stdlib.h>
37 
38 #endif /* not XML_WINLIB */
39 
40 /* This file can be used for any definitions needed in
41 particular environments. */
42 
43 #ifdef MOZILLA
44 
45 #include "nspr.h"
46 #define malloc(x) PR_Malloc(x)
47 #define realloc(x, y) PR_Realloc((x), (y))
48 #define calloc(x, y) PR_Calloc((x),(y))
49 #define free(x) PR_Free(x)
50 #define int int32
51 
52 #endif /* MOZILLA */
53