From bb4cdf8e0bcc98a036c22cfd44242502b107fb32 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Tue, 25 Jun 2019 01:42:42 +0430 Subject: [PATCH] Replace create_from_file with empty blob if HB_NO_OPEN is defined --- src/main.cc | 4 ++++ src/test-buffer-serialize.cc | 4 ++++ src/test-gpos-size-params.cc | 4 ++++ src/test-gsub-would-substitute.cc | 4 ++++ src/test-ot-color.cc | 4 ++++ src/test-ot-name.cc | 4 ++++ src/test.cc | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/src/main.cc b/src/main.cc index 490b76e5b..0aa4a5b20 100644 --- a/src/main.cc +++ b/src/main.cc @@ -38,6 +38,10 @@ using namespace OT; +#ifdef HB_NO_OPEN +#define hb_blob_create_from_file(x) hb_blob_get_empty () +#endif + int main (int argc, char **argv) { diff --git a/src/test-buffer-serialize.cc b/src/test-buffer-serialize.cc index 28826be8d..6393f0b7f 100644 --- a/src/test-buffer-serialize.cc +++ b/src/test-buffer-serialize.cc @@ -34,6 +34,10 @@ #include +#ifdef HB_NO_OPEN +#define hb_blob_create_from_file(x) hb_blob_get_empty () +#endif + int main (int argc, char **argv) { diff --git a/src/test-gpos-size-params.cc b/src/test-gpos-size-params.cc index acd1c4fc5..ad10ed40d 100644 --- a/src/test-gpos-size-params.cc +++ b/src/test-gpos-size-params.cc @@ -31,6 +31,10 @@ #include +#ifdef HB_NO_OPEN +#define hb_blob_create_from_file(x) hb_blob_get_empty () +#endif + int main (int argc, char **argv) { diff --git a/src/test-gsub-would-substitute.cc b/src/test-gsub-would-substitute.cc index 268f7db98..7ad9e084c 100644 --- a/src/test-gsub-would-substitute.cc +++ b/src/test-gsub-would-substitute.cc @@ -35,6 +35,10 @@ #include "hb-ft.h" #endif +#ifdef HB_NO_OPEN +#define hb_blob_create_from_file(x) hb_blob_get_empty () +#endif + int main (int argc, char **argv) { diff --git a/src/test-ot-color.cc b/src/test-ot-color.cc index e9126c064..3b4c8b6c2 100644 --- a/src/test-ot-color.cc +++ b/src/test-ot-color.cc @@ -27,6 +27,10 @@ #include +#ifdef HB_NO_OPEN +#define hb_blob_create_from_file(x) hb_blob_get_empty () +#endif + #if !defined(HB_NO_COLOR) && defined(CAIRO_HAS_SVG_SURFACE) #include "hb-ot.h" diff --git a/src/test-ot-name.cc b/src/test-ot-name.cc index 44c2c179c..4a484c6d6 100644 --- a/src/test-ot-name.cc +++ b/src/test-ot-name.cc @@ -30,6 +30,10 @@ #include #include +#ifdef HB_NO_OPEN +#define hb_blob_create_from_file(x) hb_blob_get_empty () +#endif + int main (int argc, char **argv) { diff --git a/src/test.cc b/src/test.cc index f0eace8c4..65b469feb 100644 --- a/src/test.cc +++ b/src/test.cc @@ -34,6 +34,10 @@ #include "hb-ft.h" #endif +#ifdef HB_NO_OPEN +#define hb_blob_create_from_file(x) hb_blob_get_empty () +#endif + int main (int argc, char **argv) {