2 * Cygwin Compatibility functions
5 * Licensed under the Open Software License version 1.1
18 void *blob_alloc(unsigned long size
)
21 size
= (size
+ 4095) & ~4095;
22 ptr
= mmap(NULL
, size
, PROT_READ
| PROT_WRITE
, MAP_PRIVATE
| MAP_ANONYMOUS
, -1, 0);
23 if (ptr
== MAP_FAILED
)
30 void blob_free(void *addr
, unsigned long size
)
32 size
= (size
+ 4095) & ~4095;
36 long double string_to_ld(const char *nptr
, char **endptr
)
38 return strtod(nptr
, endptr
);
41 int identical_files(struct stream
* s
, struct stat
*st
, const char * name
)
43 return (s
->dev
== st
->st_dev
&& s
->ino
== st
->st_ino
);