Don't define hb_blob_create_from_file if HB_NO_OPEN is defined
This commit is contained in:
parent
7f3b409e85
commit
12cec6c12e
|
@ -487,6 +487,7 @@ hb_blob_t::try_make_writable ()
|
||||||
* Mmap
|
* Mmap
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef HB_NO_OPEN
|
||||||
#ifdef HAVE_MMAP
|
#ifdef HAVE_MMAP
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
# include <sys/stat.h>
|
# include <sys/stat.h>
|
||||||
|
@ -543,10 +544,6 @@ _hb_mapped_file_destroy (void *file_)
|
||||||
hb_blob_t *
|
hb_blob_t *
|
||||||
hb_blob_create_from_file (const char *file_name)
|
hb_blob_create_from_file (const char *file_name)
|
||||||
{
|
{
|
||||||
#ifdef HB_NO_OPEN
|
|
||||||
return hb_blob_get_empty ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Adopted from glib's gmappedfile.c with Matthias Clasen and
|
/* Adopted from glib's gmappedfile.c with Matthias Clasen and
|
||||||
Allison Lortie permission but changed a lot to suit our need. */
|
Allison Lortie permission but changed a lot to suit our need. */
|
||||||
#if defined(HAVE_MMAP) && !defined(HB_NO_MMAP)
|
#if defined(HAVE_MMAP) && !defined(HB_NO_MMAP)
|
||||||
|
@ -680,3 +677,4 @@ fread_fail_without_close:
|
||||||
free (data);
|
free (data);
|
||||||
return hb_blob_get_empty ();
|
return hb_blob_get_empty ();
|
||||||
}
|
}
|
||||||
|
#endif /* !HB_NO_OPEN */
|
||||||
|
|
Loading…
Reference in New Issue