[libpng16] Added signed/unsigned 16-bit safety net. This removes the dubious
0x8000 flag definitions on 16-bit systems. They aren't supported yet the defs *probably* work, however it seems much safer to do this and be advised if anyone, contrary to advice, is building libpng 1.6 on a 16-bit system. It also adds back various switch default clauses for GCC; GCC errors out if they are not present (with an appropriately high level of warnings).
This commit is contained in:
parent
8ba4b13c55
commit
751cee5ef1
7
ANNOUNCE
7
ANNOUNCE
@ -49,6 +49,13 @@ Version 1.6.19beta02 [August 17, 2015]
|
|||||||
Fixed some bad links in the man page.
|
Fixed some bad links in the man page.
|
||||||
Changed "n bit" to "n-bit" in comments.
|
Changed "n bit" to "n-bit" in comments.
|
||||||
Changed 0xnnnn constants to 0xnnnnUL.
|
Changed 0xnnnn constants to 0xnnnnUL.
|
||||||
|
Added signed/unsigned 16-bit safety net. This removes the dubious
|
||||||
|
0x8000 flag definitions on 16-bit systems. They aren't supported
|
||||||
|
yet the defs *probably* work, however it seems much safer to do this
|
||||||
|
and be advised if anyone, contrary to advice, is building libpng 1.6
|
||||||
|
on a 16-bit system. It also adds back various switch default clauses
|
||||||
|
for GCC; GCC errors out if they are not present (with an appropriately
|
||||||
|
high level of warnings).
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
7
CHANGES
7
CHANGES
@ -5328,6 +5328,13 @@ Version 1.6.19beta02 [August 17, 2015]
|
|||||||
Fixed some bad links in the man page.
|
Fixed some bad links in the man page.
|
||||||
Changed "n bit" to "n-bit" in comments.
|
Changed "n bit" to "n-bit" in comments.
|
||||||
Changed 0xnnnn constants to 0xnnnnUL.
|
Changed 0xnnnn constants to 0xnnnnUL.
|
||||||
|
Added signed/unsigned 16-bit safety net. This removes the dubious
|
||||||
|
0x8000 flag definitions on 16-bit systems. They aren't supported
|
||||||
|
yet the defs *probably* work, however it seems much safer to do this
|
||||||
|
and be advised if anyone, contrary to advice, is building libpng 1.6
|
||||||
|
on a 16-bit system. It also adds back various switch default clauses
|
||||||
|
for GCC; GCC errors out if they are not present (with an appropriately
|
||||||
|
high level of warnings).
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
4
png.h
4
png.h
@ -895,7 +895,9 @@ typedef png_unknown_chunk * * png_unknown_chunkpp;
|
|||||||
#define PNG_INFO_iCCP 0x1000 /* ESR, 1.0.6 */
|
#define PNG_INFO_iCCP 0x1000 /* ESR, 1.0.6 */
|
||||||
#define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */
|
#define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */
|
||||||
#define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */
|
#define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */
|
||||||
|
#if INT_MAX >= 0x8000 /* else this might break */
|
||||||
#define PNG_INFO_IDAT 0x8000 /* ESR, 1.0.6 */
|
#define PNG_INFO_IDAT 0x8000 /* ESR, 1.0.6 */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* This is used for the transformation routines, as some of them
|
/* This is used for the transformation routines, as some of them
|
||||||
* change these values for the row. It also should enable using
|
* change these values for the row. It also should enable using
|
||||||
@ -999,7 +1001,9 @@ PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef);
|
|||||||
#define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */
|
#define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */
|
||||||
/* Added to libpng-1.5.4 */
|
/* Added to libpng-1.5.4 */
|
||||||
#define PNG_TRANSFORM_EXPAND_16 0x4000 /* read only */
|
#define PNG_TRANSFORM_EXPAND_16 0x4000 /* read only */
|
||||||
|
#if INT_MAX >= 0x8000 /* else this might break */
|
||||||
#define PNG_TRANSFORM_SCALE_16 0x8000 /* read only */
|
#define PNG_TRANSFORM_SCALE_16 0x8000 /* read only */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Flags for MNG supported features */
|
/* Flags for MNG supported features */
|
||||||
#define PNG_FLAG_MNG_EMPTY_PLTE 0x01
|
#define PNG_FLAG_MNG_EMPTY_PLTE 0x01
|
||||||
|
@ -1683,7 +1683,7 @@ decode_gamma(png_image_read_control *display, png_uint_32 value, int encoding)
|
|||||||
value *= 257;
|
value *= 257;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef PNG_DEBUG
|
#ifdef __GNUC__
|
||||||
default:
|
default:
|
||||||
png_error(display->image->opaque->png_ptr,
|
png_error(display->image->opaque->png_ptr,
|
||||||
"unexpected encoding (internal error)");
|
"unexpected encoding (internal error)");
|
||||||
@ -2858,7 +2858,7 @@ png_image_read_colormap(png_voidp argument)
|
|||||||
png_set_scale_16(png_ptr);
|
png_set_scale_16(png_ptr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef PNG_DEBUG
|
#ifdef __GNUC__
|
||||||
default:
|
default:
|
||||||
png_error(png_ptr, "bad data option (internal error)");
|
png_error(png_ptr, "bad data option (internal error)");
|
||||||
#endif
|
#endif
|
||||||
@ -3630,7 +3630,7 @@ png_image_read_background(png_voidp argument)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef PNG_DEBUG
|
#ifdef __GNUC__
|
||||||
default:
|
default:
|
||||||
png_error(png_ptr, "unexpected bit depth");
|
png_error(png_ptr, "unexpected bit depth");
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user