1f08c3bdfSopenharmony_ci#ifndef COMPAT_H
2f08c3bdfSopenharmony_ci#define COMPAT_H
3f08c3bdfSopenharmony_ci
4f08c3bdfSopenharmony_ci/*
5f08c3bdfSopenharmony_ci * Various systems get these things wrong. So
6f08c3bdfSopenharmony_ci * we create a small compat library for them.
7f08c3bdfSopenharmony_ci *
8f08c3bdfSopenharmony_ci *  - zeroed anonymous mmap
9f08c3bdfSopenharmony_ci *	Missing in MinGW
10f08c3bdfSopenharmony_ci *  - "string to long double" (C99 strtold())
11f08c3bdfSopenharmony_ci *	Missing in Solaris and MinGW
12f08c3bdfSopenharmony_ci */
13f08c3bdfSopenharmony_ci
14f08c3bdfSopenharmony_ci/*
15f08c3bdfSopenharmony_ci * Our "blob" allocator works on chunks that are multiples
16f08c3bdfSopenharmony_ci * of this size (the underlying allocator may be a mmap that
17f08c3bdfSopenharmony_ci * cannot handle smaller chunks, for example, so trying to
18f08c3bdfSopenharmony_ci * allocate blobs that aren't aligned is not going to work).
19f08c3bdfSopenharmony_ci */
20f08c3bdfSopenharmony_ci#define CHUNK 32768
21f08c3bdfSopenharmony_ci
22f08c3bdfSopenharmony_civoid *blob_alloc(unsigned long size);
23f08c3bdfSopenharmony_civoid blob_free(void *addr, unsigned long size);
24f08c3bdfSopenharmony_cilong double string_to_ld(const char *nptr, char **endptr);
25f08c3bdfSopenharmony_ci
26f08c3bdfSopenharmony_ci#endif
27