Open ax3l opened 5 years ago
png_convert_from_time_t: gmtime png_convert_from_struct_tm: use struct tm, not png_time_t
Better: use gmtime_s, but that requires C11.
I think it could be done in libpng 1.8 in a C89/C90/C99 compatible way with something like:
typedef struct tm png_time;
....
#define png_convert_from_struct_tm(p, t) (*(p) = *(t))
#define png_convert_from_time_t(p, t) (*(p) = *gmtime(&(t)))
It might also be necessary to include gmtime
is not thread safe) whereas at present there are no warnings.
With
png_convert_from_time_t
andpng_convert_from_struct_tm
being deprecated in the upcoming1.7
branch, what are the recommended replacements for those?Introduced in: https://github.com/glennrp/libpng/commit/4cc89fb733bed1bc2d96953e997da114258e3d1f