[libpng16] Use png_get_libpng_ver(NULL), not PNG_LIBPNG_VER_STRING

This commit is contained in:
Glenn Randers-Pehrson
2014-11-04 23:33:46 -06:00
parent 5efb1327df
commit f1b547a509
21 changed files with 56 additions and 50 deletions

View File

@@ -294,7 +294,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
* the compiler header file version, so that we know if the application
* was compiled with a compatible version of the library. REQUIRED
*/
png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
png_ptr = png_create_read_struct(png_get_libpng_ver(NULL),
png_voidp user_error_ptr, user_error_fn, user_warning_fn);
if (png_ptr == NULL)
@@ -613,7 +613,7 @@ initialize_png_reader(png_structp *png_ptr, png_infop *info_ptr)
* the library version is compatible in case we are using dynamically
* linked libraries.
*/
*png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
*png_ptr = png_create_read_struct(png_get_libpng_ver(NULL),
png_voidp user_error_ptr, user_error_fn, user_warning_fn);
if (*png_ptr == NULL)
@@ -779,7 +779,7 @@ void write_png(char *file_name /* , ... other image information ... */)
* the library version is compatible with the one used at compile time,
* in case we are using dynamically linked libraries. REQUIRED.
*/
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,
png_ptr = png_create_write_struct(png_get_libpng_ver(NULL),
png_voidp user_error_ptr, user_error_fn, user_warning_fn);
if (png_ptr == NULL)