|
|
|
@ -31,8 +31,7 @@ |
|
|
|
|
|
|
|
|
|
#include "hb-private.hh" |
|
|
|
|
#include "hb-debug.hh" |
|
|
|
|
|
|
|
|
|
#include "hb-object-private.hh" |
|
|
|
|
#include "hb-blob-private.hh" |
|
|
|
|
|
|
|
|
|
#ifdef HAVE_SYS_MMAN_H |
|
|
|
|
#ifdef HAVE_UNISTD_H |
|
|
|
@ -49,20 +48,6 @@ |
|
|
|
|
#include <fcntl.h> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct hb_blob_t { |
|
|
|
|
hb_object_header_t header; |
|
|
|
|
ASSERT_POD (); |
|
|
|
|
|
|
|
|
|
bool immutable; |
|
|
|
|
|
|
|
|
|
const char *data; |
|
|
|
|
unsigned int length; |
|
|
|
|
hb_memory_mode_t mode; |
|
|
|
|
|
|
|
|
|
void *user_data; |
|
|
|
|
hb_destroy_func_t destroy; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static bool _try_writable (hb_blob_t *blob); |
|
|
|
|
|
|
|
|
@ -507,6 +492,10 @@ _try_writable (hb_blob_t *blob) |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Mmap |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
#if defined(_WIN32) || defined(__CYGWIN__) |
|
|
|
|
#include <windows.h> |
|
|
|
|
#include <io.h> |
|
|
|
|