2000-04-20 23:58:42 -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
|
|
|
|
1998-03-07 22:39:56 -05:00
|
|
|
particular environments. */
|
|
|
|
|
|
|
|
#ifdef MOZILLA
|
|
|
|
|
|
|
|
#include "nspr.h"
|
1998-11-24 03:44:37 -05:00
|
|
|
#define malloc(x) PR_Malloc(x)
|
|
|
|
#define realloc(x, y) PR_Realloc((x), (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)
|
|
|
|
#define int int32
|
|
|
|
|
|
|
|
#endif /* MOZILLA */
|