]> git.lizzy.rs Git - irrlicht.git/blobdiff - source/Irrlicht/libpng/pngconf.h
Merging r6145 through r6171 from trunk to ogl-es branch
[irrlicht.git] / source / Irrlicht / libpng / pngconf.h
index 058bcf670bef11423ebc3e99da0d85a8bd90d7c9..dcba9f9d9c458a9758730b8285828c52d82c7ea0 100644 (file)
@@ -1,11 +1,12 @@
 \r
-/* pngconf.h - machine configurable file for libpng\r
+/* pngconf.h - machine-configurable file for libpng\r
  *\r
- * libpng version 1.6.23, June 9, 2016\r
+ * libpng version 1.6.37\r
  *\r
- * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson\r
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\r
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\r
+ * Copyright (c) 2018-2019 Cosmin Truta\r
+ * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson\r
+ * Copyright (c) 1996-1997 Andreas Dilger\r
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\r
  *\r
  * This code is released under the libpng license.\r
  * For conditions of distribution and use, see the disclaimer\r
 \r
 #endif /* PNG_BUILDING_SYMBOL_TABLE */\r
 \r
-/* Prior to 1.6.0 it was possible to turn off 'const' in declarations using\r
- * PNG_NO_CONST; this is no longer supported except for data declarations which\r
- * apparently still cause problems in 2011 on some compilers.\r
+/* Prior to 1.6.0, it was possible to turn off 'const' in declarations,\r
+ * using PNG_NO_CONST.  This is no longer supported.\r
  */\r
 #define PNG_CONST const /* backward compatibility only */\r
 \r
-/* This controls optimization of the reading of 16-bit and 32-bit values\r
- * from PNG files.  It can be set on a per-app-file basis - it\r
+/* This controls optimization of the reading of 16-bit and 32-bit\r
+ * values from PNG files.  It can be set on a per-app-file basis: it\r
  * just changes whether a macro is used when the function is called.\r
  * The library builder sets the default; if read functions are not\r
  * built into the library the macro implementation is forced on.\r
  *\r
  * These cases only differ if the operating system does not use the C\r
  * calling convention, at present this just means the above cases\r
- * (x86 DOS/Windows sytems) and, even then, this does not apply to\r
+ * (x86 DOS/Windows systems) and, even then, this does not apply to\r
  * Cygwin running on those systems.\r
  *\r
  * Note that the value must be defined in pnglibconf.h so that what\r
    * compatible with GCC or Visual C because of different calling conventions.\r
    */\r
 #  if PNG_API_RULE == 2\r
-    /* If this line results in an error, either because __watcall is not\r
-     * understood or because of a redefine just below you cannot use *this*\r
-     * build of the library with the compiler you are using.  *This* build was\r
-     * build using Watcom and applications must also be built using Watcom!\r
-     */\r
+   /* If this line results in an error, either because __watcall is not\r
+    * understood or because of a redefine just below you cannot use *this*\r
+    * build of the library with the compiler you are using.  *This* build was\r
+    * build using Watcom and applications must also be built using Watcom!\r
+    */\r
 #    define PNGCAPI __watcall\r
 #  endif\r
 \r
 #  if defined(__GNUC__) || (defined(_MSC_VER) && (_MSC_VER >= 800))\r
 #    define PNGCAPI __cdecl\r
 #    if PNG_API_RULE == 1\r
-       /* If this line results in an error __stdcall is not understood and\r
-        * PNG_API_RULE should not have been set to '1'.\r
-        */\r
+   /* If this line results in an error __stdcall is not understood and\r
+    * PNG_API_RULE should not have been set to '1'.\r
+    */\r
 #      define PNGAPI __stdcall\r
 #    endif\r
 #  else\r
-    /* An older compiler, or one not detected (erroneously) above,\r
-     * if necessary override on the command line to get the correct\r
-     * variants for the compiler.\r
-     */\r
+   /* An older compiler, or one not detected (erroneously) above,\r
+    * if necessary override on the command line to get the correct\r
+    * variants for the compiler.\r
+    */\r
 #    ifndef PNGCAPI\r
 #      define PNGCAPI _cdecl\r
 #    endif\r
 \r
 #  if (defined(_MSC_VER) && _MSC_VER < 800) ||\\r
       (defined(__BORLANDC__) && __BORLANDC__ < 0x500)\r
-    /* older Borland and MSC\r
-     * compilers used '__export' and required this to be after\r
-     * the type.\r
-     */\r
+   /* older Borland and MSC\r
+    * compilers used '__export' and required this to be after\r
+    * the type.\r
+    */\r
 #    ifndef PNG_EXPORT_TYPE\r
 #      define PNG_EXPORT_TYPE(type) type PNG_IMPEXP\r
 #    endif\r
 #  if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)\r
 #    define PNGAPI _System\r
 #  else /* !Windows/x86 && !OS/2 */\r
-    /* Use the defaults, or define PNG*API on the command line (but\r
-     * this will have to be done for every compile!)\r
-     */\r
+   /* Use the defaults, or define PNG*API on the command line (but\r
+    * this will have to be done for every compile!)\r
+    */\r
 #  endif /* other system, !OS/2 */\r
 #endif /* !Windows/x86 */\r
 \r
  */\r
 #ifndef PNG_IMPEXP\r
 #  if defined(PNG_USE_DLL) && defined(PNG_DLL_IMPORT)\r
-     /* This forces use of a DLL, disallowing static linking */\r
+   /* This forces use of a DLL, disallowing static linking */\r
 #    define PNG_IMPEXP PNG_DLL_IMPORT\r
 #  endif\r
 \r
    * less efficient code.\r
    */\r
 #  if defined(__clang__) && defined(__has_attribute)\r
-     /* Clang defines both __clang__ and __GNUC__. Check __clang__ first. */\r
+   /* Clang defines both __clang__ and __GNUC__. Check __clang__ first. */\r
 #    if !defined(PNG_USE_RESULT) && __has_attribute(__warn_unused_result__)\r
 #      define PNG_USE_RESULT __attribute__((__warn_unused_result__))\r
 #    endif\r
 #  error "libpng requires a signed 32-bit (or more) type"\r
 #endif\r
 \r
-#if UINT_MAX > 4294967294\r
+#if UINT_MAX > 4294967294U\r
    typedef unsigned int png_uint_32;\r
-#elif ULONG_MAX > 4294967294\r
+#elif ULONG_MAX > 4294967294U\r
    typedef unsigned long int png_uint_32;\r
 #else\r
 #  error "libpng requires an unsigned 32-bit (or more) type"\r
 #endif\r
 \r
-/* Prior to 1.6.0 it was possible to disable the use of size_t, 1.6.0, however,\r
- * requires an ISOC90 compiler and relies on consistent behavior of sizeof.\r
+/* Prior to 1.6.0, it was possible to disable the use of size_t and ptrdiff_t.\r
+ * From 1.6.0 onwards, an ISO C90 compiler, as well as a standard-compliant\r
+ * behavior of sizeof and ptrdiff_t are required.\r
+ * The legacy typedefs are provided here for backwards compatibility.\r
  */\r
 typedef size_t png_size_t;\r
 typedef ptrdiff_t png_ptrdiff_t;\r
@@ -537,13 +539,12 @@ typedef ptrdiff_t png_ptrdiff_t;
 #  endif\r
 #endif\r
 \r
-/* png_alloc_size_t is guaranteed to be no smaller than png_size_t, and no\r
- * smaller than png_uint_32.  Casts from png_size_t or png_uint_32 to\r
- * png_alloc_size_t are not necessary; in fact, it is recommended not to use\r
- * them at all so that the compiler can complain when something turns out to be\r
- * problematic.\r
+/* png_alloc_size_t is guaranteed to be no smaller than size_t, and no smaller\r
+ * than png_uint_32.  Casts from size_t or png_uint_32 to png_alloc_size_t are\r
+ * not necessary; in fact, it is recommended not to use them at all, so that\r
+ * the compiler can complain when something turns out to be problematic.\r
  *\r
- * Casts in the other direction (from png_alloc_size_t to png_size_t or\r
+ * Casts in the other direction (from png_alloc_size_t to size_t or\r
  * png_uint_32) should be explicitly applied; however, we do not expect to\r
  * encounter practical situations that require such conversions.\r
  *\r
@@ -553,7 +554,7 @@ typedef ptrdiff_t png_ptrdiff_t;
 #ifdef PNG_SMALL_SIZE_T\r
    typedef png_uint_32 png_alloc_size_t;\r
 #else\r
-   typedef png_size_t png_alloc_size_t;\r
+   typedef size_t png_alloc_size_t;\r
 #endif\r
 \r
 /* Prior to 1.6.0 libpng offered limited support for Microsoft C compiler\r
@@ -589,8 +590,8 @@ typedef char                  * png_charp;
 typedef const char            * png_const_charp;\r
 typedef png_fixed_point       * png_fixed_point_p;\r
 typedef const png_fixed_point * png_const_fixed_point_p;\r
-typedef png_size_t            * png_size_tp;\r
-typedef const png_size_t      * png_const_size_tp;\r
+typedef size_t                * png_size_tp;\r
+typedef const size_t          * png_const_size_tp;\r
 \r
 #ifdef PNG_STDIO_SUPPORTED\r
 typedef FILE            * png_FILE_p;\r