25 #ifndef _UCOMMON_CONFIG_H_
29 #ifndef _UCOMMON_CPR_H_
30 #define _UCOMMON_CPR_H_
35 __EXPORT
int cpr_setenv(
const char *s,
const char *v,
int p);
37 inline int setenv(
const char *s,
const char *v,
int overwrite)
38 {
return cpr_setenv(s, v, overwrite);}
58 extern "C" __EXPORT
void *
cpr_memalloc(
size_t size) __MALLOC;
69 extern "C" __EXPORT
void *
cpr_memassign(
size_t size, caddr_t address,
size_t known) __MALLOC;
77 extern "C" __EXPORT
void cpr_memswap(
void *mem1,
void *mem2,
size_t size);
79 #ifndef _UCOMMON_EXTENDED_
85 inline void *
operator new(
size_t size)
93 inline void *
operator new[](
size_t size)
97 #ifndef _UCOMMON_EXTENDED_
106 inline void *
operator new[](
size_t size, caddr_t address)
118 inline void *
operator new[](
size_t size, caddr_t address,
size_t known)
131 inline void *
operator new(
size_t size,
size_t extra)
142 inline void *
operator new(
size_t size, caddr_t address)
155 inline void *
operator new(
size_t size, caddr_t address,
size_t known)
158 #ifndef _UCOMMON_EXTENDED_
163 inline void operator delete(
void *object)
170 inline void operator delete[](
void *array)
174 extern "C" __EXPORT
void __cxa_pure_virtual(
void);
179 __EXPORT uint16_t lsb_getshort(uint8_t *b);
180 __EXPORT uint32_t lsb_getlong(uint8_t *b);
181 __EXPORT uint16_t msb_getshort(uint8_t *b);
182 __EXPORT uint32_t msb_getlong(uint8_t *b);
184 __EXPORT
void lsb_setshort(uint8_t *b, uint16_t v);
185 __EXPORT
void lsb_setlong(uint8_t *b, uint32_t v);
186 __EXPORT
void msb_setshort(uint8_t *b, uint16_t v);
187 __EXPORT
void msb_setlong(uint8_t *b, uint32_t v);
void cpr_runtime_error(const char *text)
Function to handle runtime errors.
Various miscellaneous platform specific headers and defines.
void * cpr_memalloc(size_t size)
Portable memory allocation helper function.
void cpr_memswap(void *mem1, void *mem2, size_t size)
Portable swap code.
void * cpr_memassign(size_t size, caddr_t address, size_t known)
Portable memory placement helper function.