Make hb_blob_create_from_file more portable (#1027)
authorEbrahim Byagowi <ebrahim@gnu.org>
Fri, 11 May 2018 09:10:33 +0000 (13:40 +0430)
committerGitHub <noreply@github.com>
Fri, 11 May 2018 09:10:33 +0000 (13:40 +0430)
commit7e76d746e2555d5bba7f65d3958aa97a7f179d7b
treea41159185f1a8c6d64e1e601991da4c4a53b059b
parente99d75ea9c4fe1f64d7f8408093741a682ed5243
Make hb_blob_create_from_file more portable (#1027)

This makes it compatible with ARMCC which I had access in
a collaboration with @imgtec, thanks!

Basically hb_blob_create_from_file features three code paths,
mmap, Win32 and fallback.

We had fallback implementation even before this but it was relied
to "open" which is not available on some environments. This change
improved the situtation by using only fopen and friends for
fallback path.

Interestingly we could use "open" on Windows but in fact it was
emulated by MSVCRT so I've completely split that from Unix path
now that we have a distinct path for fallback path also.
src/hb-blob.cc