Use fmemopen to create an in-memory FILE for reading in image
attributes. This avoids creating a separate temporary file for every
image added to the worksheet.
Passing NULL as the first argument creates a buffer managed by fmemopen.
According to the system documentation, fclose will free the buffer, so
no further changes are needed.
fmemopen is defined by POSIX.1-2008, and on some platforms requires
_POSIX_C_SOURCE set to 200809L or greater. This is conditionally set in
the file (src/worksheet.c) where fmemopen is used.
This change includes a new USE_FMEMOPEN option for both CMake and make,
following the tradition set by USE_STANDARD_TMPFILE etc. This new option
is enabled on Travis.
See #287#288
- optional project and binary name
- optimize output folder tree for MSVC configurations
- fix compiler flags issues for MSVC
- fix minor issue when findzlib