00001 /* 00002 The contents of this file are subject to the Mozilla Public License 00003 Version 1.1 (the "License"); you may not use this file except in 00004 compliance with the License. You may obtain a copy of the License at 00005 http://www.mozilla.org/MPL/ 00006 00007 Software distributed under the License is distributed on an "AS IS" 00008 basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 00009 License for the specific language governing rights and limitations 00010 under the License. 00011 00012 The Original Code is expat. 00013 00014 The Initial Developer of the Original Code is James Clark. 00015 Portions created by James Clark are Copyright (C) 1998, 1999 00016 James Clark. All Rights Reserved. 00017 00018 Contributor(s): 00019 00020 Alternatively, the contents of this file may be used under the terms 00021 of the GNU General Public License (the "GPL"), in which case the 00022 provisions of the GPL are applicable instead of those above. If you 00023 wish to allow use of your version of this file only under the terms of 00024 the GPL and not to allow others to use your version of this file under 00025 the MPL, indicate your decision by deleting the provisions above and 00026 replace them with the notice and other provisions required by the 00027 GPL. If you do not delete the provisions above, a recipient may use 00028 your version of this file under either the MPL or the GPL. 00029 */ 00030 00031 #include <string.h> 00032 00033 #ifdef XML_WINLIB 00034 00035 #define WIN32_LEAN_AND_MEAN 00036 #define STRICT 00037 #include <windows.h> 00038 00039 #define malloc(x) HeapAlloc(GetProcessHeap(), 0, (x)) 00040 #define calloc(x, y) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (x)*(y)) 00041 #define free(x) HeapFree(GetProcessHeap(), 0, (x)) 00042 #define realloc(x, y) HeapReAlloc(GetProcessHeap(), 0, x, y) 00043 #define abort() /* as nothing */ 00044 00045 #else /* not XML_WINLIB */ 00046 00047 #include <stdlib.h> 00048 00049 #endif /* not XML_WINLIB */ 00050 00051 /* This file can be used for any definitions needed in 00052 particular environments. */ 00053 00054 #ifdef MOZILLA 00055 00056 #include <nspr.h> 00057 #define malloc(x) PR_Malloc(x) 00058 #define realloc(x, y) PR_Realloc((x), (y)) 00059 #define calloc(x, y) PR_Calloc((x),(y)) 00060 #define free(x) PR_Free(x) 00061 #define int int32 00062 00063 #endif /* MOZILLA */