mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
chore: Clean up the error directives
Make the error directives uniformly consistent with one another. Remove surrounding quotes and trailing punctuation, and rephrase some of the error messages and some of their associated comments for either brevity or clarity.
This commit is contained in:
parent
c90491724e
commit
69a3e5bfd1
@ -35,14 +35,14 @@
|
|||||||
#ifndef PNG_ARM_NEON_FILE
|
#ifndef PNG_ARM_NEON_FILE
|
||||||
# if defined(__aarch64__) || defined(_M_ARM64)
|
# if defined(__aarch64__) || defined(_M_ARM64)
|
||||||
/* ARM Neon is expected to be unconditionally available on ARM64. */
|
/* ARM Neon is expected to be unconditionally available on ARM64. */
|
||||||
# error "PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on ARM64"
|
# error PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on ARM64
|
||||||
# elif defined(__ARM_NEON__) || defined(__ARM_NEON)
|
# elif defined(__ARM_NEON__) || defined(__ARM_NEON)
|
||||||
/* ARM Neon is expected to be available on the target CPU architecture. */
|
/* ARM Neon is expected to be available on the target CPU architecture. */
|
||||||
# error "PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on this CPU arch"
|
# error PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on this CPU arch
|
||||||
# elif defined(__linux__)
|
# elif defined(__linux__)
|
||||||
# define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c"
|
# define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c"
|
||||||
# else
|
# else
|
||||||
# error "No support for run-time ARM Neon checking; use compile-time options"
|
# error No support for run-time ARM Neon checking; use compile-time options
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ static int png_have_neon(png_structp png_ptr);
|
|||||||
#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */
|
#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */
|
||||||
|
|
||||||
#ifndef PNG_ALIGNED_MEMORY_SUPPORTED
|
#ifndef PNG_ALIGNED_MEMORY_SUPPORTED
|
||||||
# error "ALIGNED_MEMORY is required; set: -DPNG_ALIGNED_MEMORY_SUPPORTED"
|
# error ALIGNED_MEMORY is required; please define PNG_ALIGNED_MEMORY_SUPPORTED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PNG_LIBPNG_VER < 10603 /* 1.6.3 */
|
#if PNG_LIBPNG_VER < 10603 /* 1.6.3 */
|
||||||
# error "pngfix will not work with libpng prior to 1.6.3"
|
# error pngfix requires libpng version 1.6.3 or newer
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_SETJMP_SUPPORTED
|
#ifdef PNG_SETJMP_SUPPORTED
|
||||||
@ -68,7 +68,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef PNG_MAXIMUM_INFLATE_WINDOW
|
#ifndef PNG_MAXIMUM_INFLATE_WINDOW
|
||||||
# error "pngfix not supported in this libpng version"
|
# error pngfix requires libpng with PNG_MAXIMUM_INFLATE_WINDOW supported
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ZLIB_VERNUM >= 0x1240
|
#if ZLIB_VERNUM >= 0x1240
|
||||||
|
@ -48,7 +48,7 @@ static int png_have_msa(png_structp png_ptr);
|
|||||||
#include PNG_MIPS_MSA_FILE
|
#include PNG_MIPS_MSA_FILE
|
||||||
|
|
||||||
#else /* PNG_MIPS_MSA_FILE */
|
#else /* PNG_MIPS_MSA_FILE */
|
||||||
# error "PNG_MIPS_MSA_FILE undefined: no support for run-time MIPS MSA checks"
|
# error PNG_MIPS_MSA_FILE undefined: no support for run-time MIPS MSA checks
|
||||||
#endif /* PNG_MIPS_MSA_FILE */
|
#endif /* PNG_MIPS_MSA_FILE */
|
||||||
#endif /* PNG_MIPS_MSA_CHECK_SUPPORTED */
|
#endif /* PNG_MIPS_MSA_CHECK_SUPPORTED */
|
||||||
|
|
||||||
@ -66,12 +66,12 @@ static int png_have_mmi();
|
|||||||
#include PNG_MIPS_MMI_FILE
|
#include PNG_MIPS_MMI_FILE
|
||||||
|
|
||||||
#else /* PNG_MIPS_MMI_FILE */
|
#else /* PNG_MIPS_MMI_FILE */
|
||||||
# error "PNG_MIPS_MMI_FILE undefined: no support for run-time MIPS MMI checks"
|
# error PNG_MIPS_MMI_FILE undefined: no support for run-time MIPS MMI checks
|
||||||
#endif /* PNG_MIPS_MMI_FILE */
|
#endif /* PNG_MIPS_MMI_FILE */
|
||||||
#endif /* PNG_MIPS_MMI_CHECK_SUPPORTED*/
|
#endif /* PNG_MIPS_MMI_CHECK_SUPPORTED*/
|
||||||
|
|
||||||
#ifndef PNG_ALIGNED_MEMORY_SUPPORTED
|
#ifndef PNG_ALIGNED_MEMORY_SUPPORTED
|
||||||
# error "ALIGNED_MEMORY is required; set: -DPNG_ALIGNED_MEMORY_SUPPORTED"
|
# error ALIGNED_MEMORY is required; please define PNG_ALIGNED_MEMORY_SUPPORTED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* MIPS supports two optimizations: MMI and MSA. The appropriate
|
/* MIPS supports two optimizations: MMI and MSA. The appropriate
|
||||||
|
12
pngconf.h
12
pngconf.h
@ -219,7 +219,7 @@
|
|||||||
/* NOTE: PNGCBAPI always defaults to PNGCAPI. */
|
/* NOTE: PNGCBAPI always defaults to PNGCAPI. */
|
||||||
|
|
||||||
# if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD)
|
# if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD)
|
||||||
# error "PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed"
|
# error PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# define PNG_DLL_EXPORT __declspec(dllexport)
|
# define PNG_DLL_EXPORT __declspec(dllexport)
|
||||||
@ -467,7 +467,7 @@
|
|||||||
#if CHAR_BIT == 8 && UCHAR_MAX == 255
|
#if CHAR_BIT == 8 && UCHAR_MAX == 255
|
||||||
typedef unsigned char png_byte;
|
typedef unsigned char png_byte;
|
||||||
#else
|
#else
|
||||||
# error "libpng requires 8-bit bytes"
|
# error libpng requires 8-bit bytes
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if INT_MIN == -32768 && INT_MAX == 32767
|
#if INT_MIN == -32768 && INT_MAX == 32767
|
||||||
@ -475,7 +475,7 @@
|
|||||||
#elif SHRT_MIN == -32768 && SHRT_MAX == 32767
|
#elif SHRT_MIN == -32768 && SHRT_MAX == 32767
|
||||||
typedef short png_int_16;
|
typedef short png_int_16;
|
||||||
#else
|
#else
|
||||||
# error "libpng requires a signed 16-bit type"
|
# error libpng requires a signed 16-bit integer type
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if UINT_MAX == 65535
|
#if UINT_MAX == 65535
|
||||||
@ -483,7 +483,7 @@
|
|||||||
#elif USHRT_MAX == 65535
|
#elif USHRT_MAX == 65535
|
||||||
typedef unsigned short png_uint_16;
|
typedef unsigned short png_uint_16;
|
||||||
#else
|
#else
|
||||||
# error "libpng requires an unsigned 16-bit type"
|
# error libpng requires an unsigned 16-bit integer type
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if INT_MIN < -2147483646 && INT_MAX > 2147483646
|
#if INT_MIN < -2147483646 && INT_MAX > 2147483646
|
||||||
@ -491,7 +491,7 @@
|
|||||||
#elif LONG_MIN < -2147483646 && LONG_MAX > 2147483646
|
#elif LONG_MIN < -2147483646 && LONG_MAX > 2147483646
|
||||||
typedef long int png_int_32;
|
typedef long int png_int_32;
|
||||||
#else
|
#else
|
||||||
# error "libpng requires a signed 32-bit (or more) type"
|
# error libpng requires a signed 32-bit (or longer) integer type
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if UINT_MAX > 4294967294U
|
#if UINT_MAX > 4294967294U
|
||||||
@ -499,7 +499,7 @@
|
|||||||
#elif ULONG_MAX > 4294967294U
|
#elif ULONG_MAX > 4294967294U
|
||||||
typedef unsigned long int png_uint_32;
|
typedef unsigned long int png_uint_32;
|
||||||
#else
|
#else
|
||||||
# error "libpng requires an unsigned 32-bit (or more) type"
|
# error libpng requires an unsigned 32-bit (or longer) integer type
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Prior to 1.6.0, it was possible to disable the use of size_t and ptrdiff_t.
|
/* Prior to 1.6.0, it was possible to disable the use of size_t and ptrdiff_t.
|
||||||
|
18
pngpriv.h
18
pngpriv.h
@ -1000,17 +1000,15 @@
|
|||||||
* must match that used in the build, or we must be using pnglibconf.h.prebuilt:
|
* must match that used in the build, or we must be using pnglibconf.h.prebuilt:
|
||||||
*/
|
*/
|
||||||
#if PNG_ZLIB_VERNUM != 0 && PNG_ZLIB_VERNUM != ZLIB_VERNUM
|
#if PNG_ZLIB_VERNUM != 0 && PNG_ZLIB_VERNUM != ZLIB_VERNUM
|
||||||
# error ZLIB_VERNUM != PNG_ZLIB_VERNUM \
|
# error The include path of <zlib.h> is incorrect
|
||||||
"-I (include path) error: see the notes in pngpriv.h"
|
/* When pnglibconf.h was built, the copy of zlib.h that it used was not the
|
||||||
/* This means that when pnglibconf.h was built the copy of zlib.h that it
|
* same as the one being used here. Considering how libpng makes decisions
|
||||||
* used is not the same as the one being used here. Because the build of
|
* to use the zlib API based on the zlib version number, the -I options must
|
||||||
* libpng makes decisions to use inflateInit2 and inflateReset2 based on the
|
* match.
|
||||||
* zlib version number and because this affects handling of certain broken
|
|
||||||
* PNG files the -I directives must match.
|
|
||||||
*
|
*
|
||||||
* The most likely explanation is that you passed a -I in CFLAGS. This will
|
* A possible cause of this mismatch is that you passed an -I option in
|
||||||
* not work; all the preprocessor directives and in particular all the -I
|
* CFLAGS, which is unlikely to work. All the preprocessor options, and all
|
||||||
* directives must be in CPPFLAGS.
|
* the -I options in particular, should be in CPPFLAGS.
|
||||||
*/
|
*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ typedef png_libpng_version_1_6_48_git Your_png_h_is_not_version_1_6_48_git;
|
|||||||
PNG_LIBPNG_VER_MINOR) || \
|
PNG_LIBPNG_VER_MINOR) || \
|
||||||
(PNG_LIBPNG_VER_SHAREDLIB != PNG_LIBPNG_VER_SONUM) || \
|
(PNG_LIBPNG_VER_SHAREDLIB != PNG_LIBPNG_VER_SONUM) || \
|
||||||
(PNG_LIBPNG_VER_SHAREDLIB != PNG_LIBPNG_VER_DLLNUM)
|
(PNG_LIBPNG_VER_SHAREDLIB != PNG_LIBPNG_VER_DLLNUM)
|
||||||
# error "Inconsistent version numbers in png.h"
|
# error Inconsistent version numbers in "png.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* In version 1.6.1, we added support for the configure test harness, which
|
/* In version 1.6.1, we added support for the configure test harness, which
|
||||||
@ -116,7 +116,7 @@ typedef png_libpng_version_1_6_48_git Your_png_h_is_not_version_1_6_48_git;
|
|||||||
# define pngtest_debug1(m, p1) ((void)0)
|
# define pngtest_debug1(m, p1) ((void)0)
|
||||||
# define pngtest_debug2(m, p1, p2) ((void)0)
|
# define pngtest_debug2(m, p1, p2) ((void)0)
|
||||||
#else /* PNG_DEBUG < 0 */
|
#else /* PNG_DEBUG < 0 */
|
||||||
# error "Bad PNG_DEBUG value"
|
# error Bad PNG_DEBUG value
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Turn on CPU timing
|
/* Turn on CPU timing
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#if PNG_POWERPC_VSX_OPT > 0
|
#if PNG_POWERPC_VSX_OPT > 0
|
||||||
|
|
||||||
#ifndef __VSX__
|
#ifndef __VSX__
|
||||||
# error "This code requires VSX support (POWER7 and later). Please provide -mvsx compiler flag."
|
# error This code requires VSX support (POWER7 and later); please compile with -mvsx
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define vec_ld_unaligned(vec,data) vec = vec_vsx_ld(0,data)
|
#define vec_ld_unaligned(vec,data) vec = vec_vsx_ld(0,data)
|
||||||
|
@ -46,7 +46,7 @@ static int png_have_vsx(png_structp png_ptr);
|
|||||||
#include PNG_POWERPC_VSX_FILE
|
#include PNG_POWERPC_VSX_FILE
|
||||||
|
|
||||||
#else /* PNG_POWERPC_VSX_FILE */
|
#else /* PNG_POWERPC_VSX_FILE */
|
||||||
# error "PNG_POWERPC_VSX_FILE undefined: no support for run-time POWERPC VSX checks"
|
# error PNG_POWERPC_VSX_FILE undefined: no support for run-time POWERPC VSX checks
|
||||||
#endif /* PNG_POWERPC_VSX_FILE */
|
#endif /* PNG_POWERPC_VSX_FILE */
|
||||||
#endif /* PNG_POWERPC_VSX_CHECK_SUPPORTED */
|
#endif /* PNG_POWERPC_VSX_CHECK_SUPPORTED */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user