mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
timepng: fix builds in certain 1.7 configs
Libpng 1.7 supports read without PNG de-interlace, however this means the old checks on whether contrib/libtests/timepng.c (just checking for sequential read) are inadequate. 1.7 also provides macros to explicitly turn off png_read_png and png_read_image, so use these instead. Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
parent
21f92eef89
commit
a5b340e20b
@ -44,9 +44,19 @@
|
||||
# define voidcast(type, value) (value)
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#if defined (CLOCK_PROCESS_CPUTIME_ID) && \
|
||||
defined (PNG_SEQUENTIAL_READ_SUPPORTED) && defined(PNG_STDIO_SUPPORTED) \
|
||||
&& defined(PNG_EASY_ACCESS_SUPPORTED) && defined(PNG_INFO_IMAGE_SUPPORTED)
|
||||
/* 'CLOCK_PROCESS_CPUTIME_ID' is one of the clock timers for clock_gettime. It
|
||||
* need not be supported even when clock_gettime is available. It returns the
|
||||
* 'CPU' time the process has consumed. 'CPU' time is assumed to include time
|
||||
* when the CPU is actually blocked by a pending cache fill but not time
|
||||
* waiting for page faults. The attempt is to get a measure of the actual time
|
||||
* the implementation takes to read a PNG ignoring the potentially very large IO
|
||||
* overhead.
|
||||
*/
|
||||
#if defined (CLOCK_PROCESS_CPUTIME_ID) && defined(PNG_STDIO_SUPPORTED) &&\
|
||||
defined(PNG_EASY_ACCESS_SUPPORTED) &&\
|
||||
(PNG_LIBPNG_VER >= 10700 ? defined(PNG_READ_PNG_SUPPORTED) :\
|
||||
defined (PNG_SEQUENTIAL_READ_SUPPORTED) &&\
|
||||
defined(PNG_INFO_IMAGE_SUPPORTED))
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user