2 * Cygwin Compatibility functions
5 * Licensed under the Open Software License version 1.1
19 void *blob_alloc(unsigned long size
)
22 size
= (size
+ 4095) & ~4095;
23 ptr
= mmap(NULL
, size
, PROT_READ
| PROT_WRITE
, MAP_PRIVATE
| MAP_ANONYMOUS
, -1, 0);
24 if (ptr
== MAP_FAILED
)
31 void blob_free(void *addr
, unsigned long size
)
33 size
= (size
+ 4095) & ~4095;
37 long double string_to_ld(const char *nptr
, char **endptr
)
39 return strtod(nptr
, endptr
);