Release libpng version 1.6.43
diff --git a/ANNOUNCE b/ANNOUNCE
index 2e749c3..bc147ad 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,13 +1,5 @@
-libpng 1.6.43.git
-=================
-
-This is a development version, not intended to be a public release.
-It will be replaced by a public release, or by another development
-version, at a later time.
-
-
-libpng 1.6.42 - January 29, 2024
-================================
+libpng 1.6.43 - February 23, 2024
+=================================
 
 This is a public release of libpng, intended for use in production code.
 
@@ -17,13 +9,13 @@
 
 Source files with LF line endings (for Unix/Linux):
 
- * libpng-1.6.42.tar.xz (LZMA-compressed, recommended)
- * libpng-1.6.42.tar.gz (deflate-compressed)
+ * libpng-1.6.43.tar.xz (LZMA-compressed, recommended)
+ * libpng-1.6.43.tar.gz (deflate-compressed)
 
 Source files with CRLF line endings (for Windows):
 
- * lpng1642.7z (LZMA-compressed, recommended)
- * lpng1642.zip (deflate-compressed)
+ * lpng1643.7z (LZMA-compressed, recommended)
+ * lpng1643.zip (deflate-compressed)
 
 Other information:
 
@@ -33,47 +25,36 @@
  * TRADEMARK.md
 
 
-Changes from version 1.6.41 to version 1.6.42
+Changes from version 1.6.42 to version 1.6.43
 ---------------------------------------------
 
- * Fixed the implementation of the macro function `png_check_sig`.
-   This was an API regression, introduced in libpng-1.6.41.
-   (Reported by Matthieu Darbois)
-
-
-Changes from version 1.6.40 to version 1.6.41
----------------------------------------------
-
- * Added SIMD-optimized code for the Loongarch LSX hardware.
-   (Contributed by GuXiWei, JinBo and ZhangLixia)
- * Fixed the run-time discovery of MIPS MSA hardware.
-   (Contributed by Sui Jingfeng)
- * Fixed an off-by-one error in the function `png_do_check_palette_indexes`,
-   which failed to recognize errors that might have existed in the first
-   column of a broken palette-encoded image. This was a benign regression
-   accidentally introduced in libpng-1.6.33. No pixel was harmed.
-   (Contributed by Adam Richter; reviewed by John Bowler)
- * Fixed, improved and modernized the contrib/pngminus programs, i.e.,
-   png2pnm.c and pnm2png.c
- * Removed old and peculiar portability hacks that were meant to silence
-   warnings issued by gcc version 7.1 alone.
+ * Fixed the row width check in png_check_IHDR().
+   This corrected a bug that was specific to the 16-bit platforms,
+   and removed a spurious compiler warning from the 64-bit builds.
+   (Reported by Jacek Caban; fixed by John Bowler)
+ * Added eXIf chunk support to the push-mode reader in pngpread.c.
+   (Contributed by Chris Blume)
+ * Added contrib/pngexif for the benefit of the users who would like
+   to inspect the content of eXIf chunks.
+ * Added contrib/conftest/basic.dfa, a basic build-time configuration.
    (Contributed by John Bowler)
- * Fixed and modernized the CMake file, and raised the minimum required
-   CMake version from 3.1 to 3.6.
-   (Contributed by Clinton Ingram, Timothy Lyanguzov, Tyler Kropp, et al.)
- * Allowed the configure script to disable the building of auxiliary tools
-   and tests, thus catching up with the CMake file.
-   (Contributed by Carlo Bramini)
- * Fixed a build issue on Mac.
-   (Contributed by Zixu Wang)
- * Moved the Autoconf macro files to scripts/autoconf.
- * Moved the CMake files (except for the main CMakeLists.txt) to
-   scripts/cmake and moved the list of their contributing authors to
-   scripts/cmake/AUTHORS.md
- * Updated the CI configurations and scripts.
- * Relicensed the CI scripts to the MIT License.
- * Improved the test coverage.
+ * Fixed a preprocessor condition in pngread.c that broke build-time
+   configurations like contrib/conftest/pngcp.dfa.
    (Contributed by John Bowler)
+ * Added CMake build support for LoongArch LSX.
+   (Contributed by GuXiWei)
+ * Fixed a CMake build error that occurred under a peculiar state of the
+   dependency tree. This was a regression introduced in libpng-1.6.41.
+   (Contributed by Dan Rosser)
+ * Marked the installed libpng headers as system headers in CMake.
+   (Contributed by Benjamin Buch)
+ * Updated the build support for RISCOS.
+   (Contributed by Cameron Cawley)
+ * Updated the makefiles to allow cross-platform builds to initialize
+   conventional make variables like AR and ARFLAGS.
+ * Added various improvements to the CI scripts in areas like version
+   consistency verification and text linting.
+ * Added version consistency verification to pngtest.c also.
 
 
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
diff --git a/CHANGES b/CHANGES
index 478b63a..441b57e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6130,7 +6130,7 @@
   Cleaned up the code, the build scripts, and the documentation.
 
 Version 1.6.41 [January 24, 2024]
-  Added SIMD-optimized code for the Loongarch LSX hardware.
+  Added SIMD-optimized code for the LoongArch LSX hardware.
     (Contributed by GuXiWei, JinBo and ZhangLixia)
   Fixed the run-time discovery of MIPS MSA hardware.
     (Contributed by Sui Jingfeng)
@@ -6167,7 +6167,34 @@
     (Reported by Matthieu Darbois)
   Fixed and updated the libpng manual.
 
-Version 1.6.43 [TODO]
+Version 1.6.43 [February 23, 2024]
+  Fixed the row width check in png_check_IHDR().
+    This corrected a bug that was specific to the 16-bit platforms,
+    and removed a spurious compiler warning from the 64-bit builds.
+    (Reported by Jacek Caban; fixed by John Bowler)
+  Added eXIf chunk support to the push-mode reader in pngpread.c.
+    (Contributed by Chris Blume)
+  Added contrib/pngexif for the benefit of the users who would like
+    to inspect the content of eXIf chunks.
+  Added contrib/conftest/basic.dfa, a basic build-time configuration.
+    (Contributed by John Bowler)
+  Fixed a preprocessor condition in pngread.c that broke build-time
+    configurations like contrib/conftest/pngcp.dfa.
+    (Contributed by John Bowler)
+  Added CMake build support for LoongArch LSX.
+    (Contributed by GuXiWei)
+  Fixed a CMake build error that occurred under a peculiar state of the
+    dependency tree. This was a regression introduced in libpng-1.6.41.
+    (Contributed by Dan Rosser)
+  Marked the installed libpng headers as system headers in CMake.
+    (Contributed by Benjamin Buch)
+  Updated the build support for RISCOS.
+    (Contributed by Cameron Cawley)
+  Updated the makefiles to allow cross-platform builds to initialize
+    conventional make variables like AR and ARFLAGS.
+  Added various improvements to the CI scripts in areas like version
+    consistency verification and text linting.
+  Added version consistency verification to pngtest.c also.
 
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
 Subscription is required; visit
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a7a9d33..ad3f242 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,8 +20,8 @@
 set(PNGLIB_MAJOR 1)
 set(PNGLIB_MINOR 6)
 set(PNGLIB_REVISION 43)
-#set(PNGLIB_SUBREVISION 0)
-set(PNGLIB_SUBREVISION "git")
+set(PNGLIB_SUBREVISION 0)
+#set(PNGLIB_SUBREVISION "git")
 set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_REVISION})
 set(PNGLIB_ABI_VERSION ${PNGLIB_MAJOR}${PNGLIB_MINOR})
 set(PNGLIB_SHARED_VERSION ${PNGLIB_ABI_VERSION}.${PNGLIB_REVISION}.${PNGLIB_SUBREVISION})
diff --git a/README b/README
index 3f75548..a6ca3ae 100644
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
-README for libpng version 1.6.43.git
-====================================
+README for libpng version 1.6.43
+================================
 
 See the note about version numbers near the top of `png.h`.
 See `INSTALL` for instructions on how to install libpng.
diff --git a/configure b/configure
index f83ca64..ca475f7 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.72 for libpng 1.6.43.git.
+# Generated by GNU Autoconf 2.72 for libpng 1.6.43.
 #
 # Report bugs to <png-mng-implement@lists.sourceforge.net>.
 #
@@ -614,8 +614,8 @@
 # Identity of this package.
 PACKAGE_NAME='libpng'
 PACKAGE_TARNAME='libpng'
-PACKAGE_VERSION='1.6.43.git'
-PACKAGE_STRING='libpng 1.6.43.git'
+PACKAGE_VERSION='1.6.43'
+PACKAGE_STRING='libpng 1.6.43'
 PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
 PACKAGE_URL=''
 
@@ -1417,7 +1417,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-'configure' configures libpng 1.6.43.git to adapt to many kinds of systems.
+'configure' configures libpng 1.6.43 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1488,7 +1488,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libpng 1.6.43.git:";;
+     short | recursive ) echo "Configuration of libpng 1.6.43:";;
    esac
   cat <<\_ACEOF
 
@@ -1685,7 +1685,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libpng configure 1.6.43.git
+libpng configure 1.6.43
 generated by GNU Autoconf 2.72
 
 Copyright (C) 2023 Free Software Foundation, Inc.
@@ -1948,7 +1948,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libpng $as_me 1.6.43.git, which was
+It was created by libpng $as_me 1.6.43, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -3248,7 +3248,7 @@
 
 # Define the identity of the package.
  PACKAGE='libpng'
- VERSION='1.6.43.git'
+ VERSION='1.6.43'
 
 
 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -3381,7 +3381,7 @@
 
 
 
-PNGLIB_VERSION=1.6.43.git
+PNGLIB_VERSION=1.6.43
 PNGLIB_MAJOR=1
 PNGLIB_MINOR=6
 PNGLIB_RELEASE=43
@@ -15382,7 +15382,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libpng $as_me 1.6.43.git, which was
+This file was extended by libpng $as_me 1.6.43, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15450,7 +15450,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-libpng config.status 1.6.43.git
+libpng config.status 1.6.43
 configured by $0, generated by GNU Autoconf 2.72,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index eed51a8..505d72f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,7 +25,7 @@
 
 dnl Version number stuff here:
 
-AC_INIT([libpng],[1.6.43.git],[png-mng-implement@lists.sourceforge.net])
+AC_INIT([libpng],[1.6.43],[png-mng-implement@lists.sourceforge.net])
 AC_CONFIG_MACRO_DIR([scripts/autoconf])
 
 # libpng does not follow GNU file name conventions (hence 'foreign')
@@ -46,7 +46,7 @@
 dnl AM_PREREQ([1.11.2])
 dnl stop configure from automagically running automake
 
-PNGLIB_VERSION=1.6.43.git
+PNGLIB_VERSION=1.6.43
 PNGLIB_MAJOR=1
 PNGLIB_MINOR=6
 PNGLIB_RELEASE=43
diff --git a/libpng-manual.txt b/libpng-manual.txt
index d2918ce..7988057 100644
--- a/libpng-manual.txt
+++ b/libpng-manual.txt
@@ -9,7 +9,7 @@
 
  Based on:
 
- libpng version 1.6.36, December 2018, through 1.6.42 - January 2024
+ libpng version 1.6.36, December 2018, through 1.6.43 - February 2024
  Updated and distributed by Cosmin Truta
  Copyright (c) 2018-2024 Cosmin Truta
 
diff --git a/libpng.3 b/libpng.3
index 8875b21..45e76e4 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,6 +1,6 @@
-.TH LIBPNG 3 "January 29, 2024"
+.TH LIBPNG 3 "February 23, 2024"
 .SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.6.42
+libpng \- Portable Network Graphics (PNG) Reference Library 1.6.43
 
 .SH SYNOPSIS
 \fB#include <png.h>\fP
@@ -528,7 +528,7 @@
 
  Based on:
 
- libpng version 1.6.36, December 2018, through 1.6.42 - January 2024
+ libpng version 1.6.36, December 2018, through 1.6.43 - February 2024
  Updated and distributed by Cosmin Truta
  Copyright (c) 2018-2024 Cosmin Truta
 
diff --git a/libpngpf.3 b/libpngpf.3
index a469205..0abec74 100644
--- a/libpngpf.3
+++ b/libpngpf.3
@@ -1,6 +1,6 @@
-.TH LIBPNGPF 3 "January 29, 2024"
+.TH LIBPNGPF 3 "February 23, 2024"
 .SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.6.42
+libpng \- Portable Network Graphics (PNG) Reference Library 1.6.43
 (private functions)
 
 .SH SYNOPSIS
diff --git a/png.5 b/png.5
index 1737ba5..a8a6818 100644
--- a/png.5
+++ b/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "January 29, 2024"
+.TH PNG 5 "February 23, 2024"
 .SH NAME
 png \- Portable Network Graphics (PNG) format
 
diff --git a/png.c b/png.c
index 802c61e..9ed3157 100644
--- a/png.c
+++ b/png.c
@@ -14,7 +14,7 @@
 #include "pngpriv.h"
 
 /* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_6_43_git Your_png_h_is_not_version_1_6_43_git;
+typedef png_libpng_version_1_6_43 Your_png_h_is_not_version_1_6_43;
 
 /* Tells libpng that we have already handled the first "num_bytes" bytes
  * of the PNG file signature.  If the PNG data is embedded into another
@@ -794,7 +794,7 @@
    return PNG_STRING_COPYRIGHT
 #else
    return PNG_STRING_NEWLINE \
-      "libpng version 1.6.43.git" PNG_STRING_NEWLINE \
+      "libpng version 1.6.43" PNG_STRING_NEWLINE \
       "Copyright (c) 2018-2024 Cosmin Truta" PNG_STRING_NEWLINE \
       "Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
       PNG_STRING_NEWLINE \
diff --git a/png.h b/png.h
index 013f309..83d3903 100644
--- a/png.h
+++ b/png.h
@@ -1,7 +1,7 @@
 
 /* png.h - header file for PNG reference library
  *
- * libpng version 1.6.43.git
+ * libpng version 1.6.43
  *
  * Copyright (c) 2018-2024 Cosmin Truta
  * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
@@ -15,7 +15,7 @@
  *   libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
  *   libpng versions 0.97, January 1998, through 1.6.35, July 2018:
  *     Glenn Randers-Pehrson
- *   libpng versions 1.6.36, December 2018, through 1.6.42, January 2024:
+ *   libpng versions 1.6.36, December 2018, through 1.6.43, February 2024:
  *     Cosmin Truta
  *   See also "Contributing Authors", below.
  */
@@ -239,7 +239,7 @@
  *    ...
  *    1.5.30                  15    10530  15.so.15.30[.0]
  *    ...
- *    1.6.42                  16    10642  16.so.16.42[.0]
+ *    1.6.43                  16    10643  16.so.16.43[.0]
  *
  *    Henceforth the source version will match the shared-library major and
  *    minor numbers; the shared-library major version number will be used for
@@ -275,7 +275,7 @@
  */
 
 /* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.6.43.git"
+#define PNG_LIBPNG_VER_STRING "1.6.43"
 #define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n"
 
 /* The versions of shared library builds should stay in sync, going forward */
@@ -289,14 +289,14 @@
 #define PNG_LIBPNG_VER_RELEASE 43
 
 /* This should be zero for a public release, or non-zero for a
- * development version.  [Deprecated]
+ * development version.
  */
-#define PNG_LIBPNG_VER_BUILD  1
+#define PNG_LIBPNG_VER_BUILD  0
 
 /* Release Status */
-#define PNG_LIBPNG_BUILD_ALPHA    1 /* [Deprecated] */
+#define PNG_LIBPNG_BUILD_ALPHA    1
 #define PNG_LIBPNG_BUILD_BETA     2
-#define PNG_LIBPNG_BUILD_RC       3 /* [Deprecated] */
+#define PNG_LIBPNG_BUILD_RC       3
 #define PNG_LIBPNG_BUILD_STABLE   4
 #define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7
 
@@ -308,7 +308,7 @@
 #define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
                                        PNG_LIBPNG_BUILD_PRIVATE */
 
-#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_BETA
+#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE
 
 /* Careful here.  At one time, Guy wanted to use 082, but that
  * would be octal.  We must not include leading zeros.
@@ -317,7 +317,7 @@
  * From version 1.0.1 it is:
  * XXYYZZ, where XX=major, YY=minor, ZZ=release
  */
-#define PNG_LIBPNG_VER 10643 /* 1.6.43.git */
+#define PNG_LIBPNG_VER 10643 /* 1.6.43 */
 
 /* Library configuration: these options cannot be changed after
  * the library has been built.
@@ -427,7 +427,7 @@
 /* This triggers a compiler error in png.c, if png.c and png.h
  * do not agree upon the version number.
  */
-typedef char* png_libpng_version_1_6_43_git;
+typedef char* png_libpng_version_1_6_43;
 
 /* Basic control structions.  Read libpng-manual.txt or libpng.3 for more info.
  *
diff --git a/pngconf.h b/pngconf.h
index f58d206..000d7b1 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,7 +1,7 @@
 
 /* pngconf.h - machine-configurable file for libpng
  *
- * libpng version 1.6.43.git
+ * libpng version 1.6.43
  *
  * Copyright (c) 2018-2024 Cosmin Truta
  * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
diff --git a/pngrtran.c b/pngrtran.c
index 041f930..1526123 100644
--- a/pngrtran.c
+++ b/pngrtran.c
@@ -302,7 +302,7 @@
     * viewing correction values.  The intent is to weed out the API users
     * who might use the inverse of the gamma value accidentally!
     *
-    * In libpng 1.6.x, we changed from 0.07..3 to 0.01..100, to accommodate
+    * In libpng 1.6.0, we changed from 0.07..3 to 0.01..100, to accommodate
     * the optimal 16-bit gamma of 36 and its reciprocal.
     */
    if (output_gamma < 1000 || output_gamma > 10000000)
diff --git a/pngtest.c b/pngtest.c
index 571ee6a..45ef66a 100644
--- a/pngtest.c
+++ b/pngtest.c
@@ -46,7 +46,7 @@
 #include "png.h"
 
 /* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_6_43_git Your_png_h_is_not_version_1_6_43_git;
+typedef png_libpng_version_1_6_43 Your_png_h_is_not_version_1_6_43;
 
 /* Ensure that all version numbers in png.h are consistent with one another. */
 #if (PNG_LIBPNG_VER != PNG_LIBPNG_VER_MAJOR * 10000 + \
diff --git a/scripts/libpng-config-head.in b/scripts/libpng-config-head.in
index df8d662..37577f4 100644
--- a/scripts/libpng-config-head.in
+++ b/scripts/libpng-config-head.in
@@ -11,7 +11,7 @@
 
 # Modeled after libxml-config.
 
-version=1.6.43.git
+version=1.6.43
 prefix=""
 libdir=""
 libs=""
diff --git a/scripts/libpng.pc.in b/scripts/libpng.pc.in
index 0fc82fa..6a581d1 100644
--- a/scripts/libpng.pc.in
+++ b/scripts/libpng.pc.in
@@ -5,6 +5,6 @@
 
 Name: libpng
 Description: Loads and saves PNG files
-Version: 1.6.43.git
+Version: 1.6.43
 Libs: -L${libdir} -lpng16
 Cflags: -I${includedir}
diff --git a/scripts/pnglibconf.h.prebuilt b/scripts/pnglibconf.h.prebuilt
index 9dd5408..83f09fb 100644
--- a/scripts/pnglibconf.h.prebuilt
+++ b/scripts/pnglibconf.h.prebuilt
@@ -1,6 +1,6 @@
 /* pnglibconf.h - library build configuration */
 
-/* libpng version 1.6.43.git */
+/* libpng version 1.6.43 */
 
 /* Copyright (c) 2018-2024 Cosmin Truta */
 /* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */