2086
|
1 /*
|
|
2 The contents of this file are subject to the Mozilla Public License
|
|
3 Version 1.1 (the "License"); you may not use this file except in
|
|
4 compliance with the License. You may obtain a copy of the License at
|
|
5 http://www.mozilla.org/MPL/
|
|
6
|
|
7 Software distributed under the License is distributed on an "AS IS"
|
|
8 basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
|
9 License for the specific language governing rights and limitations
|
|
10 under the License.
|
|
11
|
|
12 The Original Code is expat.
|
|
13
|
|
14 The Initial Developer of the Original Code is James Clark.
|
|
15 Portions created by James Clark are Copyright (C) 1998, 1999
|
|
16 James Clark. All Rights Reserved.
|
|
17
|
|
18 Contributor(s):
|
|
19
|
|
20 Alternatively, the contents of this file may be used under the terms
|
|
21 of the GNU General Public License (the "GPL"), in which case the
|
|
22 provisions of the GPL are applicable instead of those above. If you
|
|
23 wish to allow use of your version of this file only under the terms of
|
|
24 the GPL and not to allow others to use your version of this file under
|
|
25 the MPL, indicate your decision by deleting the provisions above and
|
|
26 replace them with the notice and other provisions required by the
|
|
27 GPL. If you do not delete the provisions above, a recipient may use
|
|
28 your 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
|
|
52 particular 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 */
|