Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / libs / popupmenu / pmmem.h
blob998e6371179d115d627f5bb379092544c47c099a
1 //
2 // pmmem.h
3 //
4 // Operating System Independent Memory Management
5 //
7 #ifndef PM_MEM_H
8 #define PM_MEM_H
10 #include "pmtypes.h"
12 #ifdef AMIGA
13 #include <proto/exec.h>
14 #define PM_Mem_Alloc(size) PM_AllocVecPooled(size)
15 #define PM_Mem_Free(mem) PM_FreeVecPooled(mem)
16 #define PM_Mem_Copy(s, d, l) CopyMem(s, d, l)
17 #else
18 #include <stdlib.h>
19 #include <memory.h>
20 #define PM_Mem_Alloc(size) malloc(size)
21 #define PM_Mem_Free(mem) free(mem)
22 #define PM_Mem_Copy(s, d, l) memcpy(d, s, l)
23 #endif
25 STRPTR PM_String_Copy(STRPTR Source, STRPTR Dest, LONG Len);
26 ULONG PM_String_Length(STRPTR s);
27 ULONG PM_String_Compare(STRPTR str1, STRPTR str2);
28 void PM_StrCat(STRPTR Dst, STRPTR Src);
30 APTR PM_AllocVecPooled(LONG size);
31 void PM_FreeVecPooled(APTR mem);
33 #endif /* PM_MEM_H */