Blame texlive-base-c99-2.patch

963e9ad
Backport of upstream revision r64953:
963e9ad
963e9ad
2022-11-06  Sam James  <sam@gentoo.org>
963e9ad
963e9ad
	* freetype-src/builds/unix/freetype2.m4: placate clang16.
963e9ad
	https://tug.org/pipermail/tlbuild/2022q4/005273.html
963e9ad
963e9ad
2022-11-06  Karl Berry  <karl@freefriends.org>
963e9ad
963e9ad
	* patch-01-do-not-export-internal-zlib: add.
963e9ad
	* patch-04-void-main: add (see ../ChangeLog).
963e9ad
963e9ad
2022-11-06  Sam James  <sam@gentoo.org>
963e9ad
963e9ad
	* libgd-src/tests/xpm/bug00185.c: placate clang16.
963e9ad
	https://tug.org/pipermail/tlbuild/2022q4/005273.html
963e9ad
963e9ad
2022-11-06  Sam James  <sam@gentoo.org>
963e9ad
963e9ad
	* basename.c: placate clang16.
963e9ad
	https://tug.org/pipermail/tlbuild/2022q4/005273.html
963e9ad
963e9ad
2022-11-06  Sam James  <sam@gentoo.org>
963e9ad
963e9ad
	* pmx-src/libf2c/main.c: placate clang16.
963e9ad
	https://tug.org/pipermail/tlbuild/2022q4/005273.html
963e9ad
963e9ad
Index: Build/source/libs/freetype2/TLpatches/patch-01-do-not-export-internal-zlib
963e9ad
===================================================================
963e9ad
--- Build/source/libs/freetype2/TLpatches/patch-01-do-not-export-internal-zlib	(nonexistent)
963e9ad
+++ Build/source/libs/freetype2/TLpatches/patch-01-do-not-export-internal-zlib	(revision 64953)
963e9ad
@@ -0,0 +1,626 @@
963e9ad
+diff -ur freetype-2.12.1/src/gzip/adler32.c freetype-src/src/gzip/adler32.c
963e9ad
+--- freetype-2.12.1/src/gzip/adler32.c	Fri Apr 01 17:24:23 2022
963e9ad
++++ freetype-src/src/gzip/adler32.c	Thu May 05 07:23:26 2022
963e9ad
+@@ -62,7 +62,7 @@
963e9ad
+ #endif
963e9ad
+ 
963e9ad
+ /* ========================================================================= */
963e9ad
+-uLong ZEXPORT adler32_z(
963e9ad
++static uLong ZEXPORT adler32_z(
963e9ad
+     uLong adler,
963e9ad
+     const Bytef *buf,
963e9ad
+     z_size_t len)
963e9ad
+@@ -133,7 +133,7 @@
963e9ad
+ }
963e9ad
+ 
963e9ad
+ /* ========================================================================= */
963e9ad
+-uLong ZEXPORT adler32(
963e9ad
++static uLong ZEXPORT adler32(
963e9ad
+     uLong adler,
963e9ad
+     const Bytef *buf,
963e9ad
+     uInt len)
963e9ad
+@@ -173,7 +173,7 @@
963e9ad
+ }
963e9ad
+ 
963e9ad
+ /* ========================================================================= */
963e9ad
+-uLong ZEXPORT adler32_combine(
963e9ad
++static uLong ZEXPORT adler32_combine(
963e9ad
+     uLong adler1,
963e9ad
+     uLong adler2,
963e9ad
+     z_off_t len2)
963e9ad
+@@ -181,7 +181,7 @@
963e9ad
+     return adler32_combine_(adler1, adler2, len2);
963e9ad
+ }
963e9ad
+ 
963e9ad
+-uLong ZEXPORT adler32_combine64(
963e9ad
++static uLong ZEXPORT adler32_combine64(
963e9ad
+     uLong adler1,
963e9ad
+     uLong adler2,
963e9ad
+     z_off64_t len2)
963e9ad
+diff -ur freetype-2.12.1/src/gzip/crc32.c freetype-src/src/gzip/crc32.c
963e9ad
+--- freetype-2.12.1/src/gzip/crc32.c	Fri Apr 01 16:13:52 2022
963e9ad
++++ freetype-src/src/gzip/crc32.c	Fri May 06 12:34:16 2022
963e9ad
+@@ -583,7 +583,7 @@
963e9ad
+  * This function can be used by asm versions of crc32(), and to force the
963e9ad
+  * generation of the CRC tables in a threaded application.
963e9ad
+  */
963e9ad
+-const z_crc_t FAR * ZEXPORT get_crc_table()
963e9ad
++static const z_crc_t FAR * ZEXPORT get_crc_table()
963e9ad
+ {
963e9ad
+ #ifdef DYNAMIC_CRC_TABLE
963e9ad
+     once(&made, make_crc_table);
963e9ad
+@@ -610,7 +610,7 @@
963e9ad
+ #define Z_BATCH_ZEROS 0xa10d3d0c    /* computed from Z_BATCH = 3990 */
963e9ad
+ #define Z_BATCH_MIN 800             /* fewest words in a final batch */
963e9ad
+ 
963e9ad
+-unsigned long ZEXPORT crc32_z(
963e9ad
++static unsigned long ZEXPORT crc32_z(
963e9ad
+     unsigned long crc,
963e9ad
+     const unsigned char FAR *buf,
963e9ad
+     z_size_t len)
963e9ad
+@@ -736,7 +736,7 @@
963e9ad
+ #endif
963e9ad
+ 
963e9ad
+ /* ========================================================================= */
963e9ad
+-unsigned long ZEXPORT crc32_z(
963e9ad
++static unsigned long ZEXPORT crc32_z(
963e9ad
+     unsigned long crc,
963e9ad
+     const unsigned char FAR *buf,
963e9ad
+     z_size_t len)
963e9ad
+@@ -1060,7 +1060,7 @@
963e9ad
+ #endif
963e9ad
+ 
963e9ad
+ /* ========================================================================= */
963e9ad
+-unsigned long ZEXPORT crc32(
963e9ad
++static unsigned long ZEXPORT crc32(
963e9ad
+     unsigned long crc,
963e9ad
+     const unsigned char FAR *buf,
963e9ad
+     uInt len)
963e9ad
+@@ -1069,7 +1069,7 @@
963e9ad
+ }
963e9ad
+ 
963e9ad
+ /* ========================================================================= */
963e9ad
+-uLong ZEXPORT crc32_combine64(
963e9ad
++static uLong ZEXPORT crc32_combine64(
963e9ad
+     uLong crc1,
963e9ad
+     uLong crc2,
963e9ad
+     z_off64_t len2)
963e9ad
+@@ -1081,7 +1081,7 @@
963e9ad
+ }
963e9ad
+ 
963e9ad
+ /* ========================================================================= */
963e9ad
+-uLong ZEXPORT crc32_combine(
963e9ad
++static uLong ZEXPORT crc32_combine(
963e9ad
+     uLong crc1,
963e9ad
+     uLong crc2,
963e9ad
+     z_off_t len2)
963e9ad
+@@ -1090,7 +1090,7 @@
963e9ad
+ }
963e9ad
+ 
963e9ad
+ /* ========================================================================= */
963e9ad
+-uLong ZEXPORT crc32_combine_gen64(
963e9ad
++static uLong ZEXPORT crc32_combine_gen64(
963e9ad
+     z_off64_t len2)
963e9ad
+ {
963e9ad
+ #ifdef DYNAMIC_CRC_TABLE
963e9ad
+@@ -1100,14 +1100,14 @@
963e9ad
+ }
963e9ad
+ 
963e9ad
+ /* ========================================================================= */
963e9ad
+-uLong ZEXPORT crc32_combine_gen(
963e9ad
++static uLong ZEXPORT crc32_combine_gen(
963e9ad
+     z_off_t len2)
963e9ad
+ {
963e9ad
+     return crc32_combine_gen64(len2);
963e9ad
+ }
963e9ad
+ 
963e9ad
+ /* ========================================================================= */
963e9ad
+-uLong crc32_combine_op(
963e9ad
++static uLong crc32_combine_op(
963e9ad
+     uLong crc1,
963e9ad
+     uLong crc2,
963e9ad
+     uLong op)
963e9ad
+diff -ur freetype-2.12.1/src/gzip/ftgzip.c freetype-src/src/gzip/ftgzip.c
963e9ad
+--- freetype-2.12.1/src/gzip/ftgzip.c	Thu Jan 27 16:43:19 2022
963e9ad
++++ freetype-src/src/gzip/ftgzip.c	Fri May 06 12:01:06 2022
963e9ad
+@@ -80,6 +80,9 @@
963e9ad
+ #define HAVE_HIDDEN  1
963e9ad
+ #define ZEXPORT
963e9ad
+ #define ZEXTERN      static
963e9ad
++#else
963e9ad
++#define ZEXPORT
963e9ad
++#define ZEXTERN      static
963e9ad
+ #endif
963e9ad
+ 
963e9ad
+ #define Z_SOLO      1
963e9ad
+@@ -160,7 +163,7 @@
963e9ad
+ 
963e9ad
+ #if !defined( FT_CONFIG_OPTION_SYSTEM_ZLIB ) && !defined( USE_ZLIB_ZCALLOC )
963e9ad
+ 
963e9ad
+-  voidpf ZLIB_INTERNAL
963e9ad
++  static voidpf ZLIB_INTERNAL
963e9ad
+   zcalloc ( voidpf    opaque,
963e9ad
+             unsigned  items,
963e9ad
+             unsigned  size )
963e9ad
+@@ -169,7 +172,7 @@
963e9ad
+   }
963e9ad
+ 
963e9ad
+ 
963e9ad
+-  void ZLIB_INTERNAL
963e9ad
++  static void ZLIB_INTERNAL
963e9ad
+   zcfree( voidpf  opaque,
963e9ad
+           voidpf  ptr )
963e9ad
+   {
963e9ad
+diff -ur freetype-2.12.1/src/gzip/gzguts.h freetype-src/src/gzip/gzguts.h
963e9ad
+--- freetype-2.12.1/src/gzip/gzguts.h	Fri Apr 01 17:24:23 2022
963e9ad
++++ freetype-src/src/gzip/gzguts.h	Sat May 07 14:12:37 2022
963e9ad
+@@ -12,11 +12,8 @@
963e9ad
+ #  endif
963e9ad
+ #endif
963e9ad
+ 
963e9ad
+-#ifdef HAVE_HIDDEN
963e9ad
+-#  define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
963e9ad
+-#else
963e9ad
+-#  define ZLIB_INTERNAL
963e9ad
+-#endif
963e9ad
++/* we use "static" for all platforms */
963e9ad
++#define ZLIB_INTERNAL
963e9ad
+ 
963e9ad
+ #include <stdio.h>
963e9ad
+ #include "zlib.h"
963e9ad
+@@ -203,9 +200,9 @@
963e9ad
+ typedef gz_state FAR *gz_statep;
963e9ad
+ 
963e9ad
+ /* shared functions */
963e9ad
+-void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *));
963e9ad
++static void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *));
963e9ad
+ #if defined UNDER_CE
963e9ad
+-char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
963e9ad
++static char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
963e9ad
+ #endif
963e9ad
+ 
963e9ad
+ /* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
963e9ad
+@@ -214,6 +211,6 @@
963e9ad
+ #ifdef INT_MAX
963e9ad
+ #  define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
963e9ad
+ #else
963e9ad
+-unsigned ZLIB_INTERNAL gz_intmax OF((void));
963e9ad
++static unsigned ZLIB_INTERNAL gz_intmax OF((void));
963e9ad
+ #  define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
963e9ad
+ #endif
963e9ad
+diff -ur freetype-2.12.1/src/gzip/infback.c freetype-src/src/gzip/infback.c
963e9ad
+--- freetype-2.12.1/src/gzip/infback.c	Fri Apr 01 16:13:52 2022
963e9ad
++++ freetype-src/src/gzip/infback.c	Thu May 05 07:24:06 2022
963e9ad
+@@ -25,7 +25,7 @@
963e9ad
+    windowBits is in the range 8..15, and window is a user-supplied
963e9ad
+    window and output buffer that is 2**windowBits bytes.
963e9ad
+  */
963e9ad
+-int ZEXPORT inflateBackInit_(
963e9ad
++static int ZEXPORT inflateBackInit_(
963e9ad
+     z_streamp strm,
963e9ad
+     int windowBits,
963e9ad
+     unsigned char FAR *window,
963e9ad
+@@ -247,7 +247,7 @@
963e9ad
+    inflateBack() can also return Z_STREAM_ERROR if the input parameters
963e9ad
+    are not correct, i.e. strm is Z_NULL or the state was not initialized.
963e9ad
+  */
963e9ad
+-int ZEXPORT inflateBack(
963e9ad
++static int ZEXPORT inflateBack(
963e9ad
+     z_streamp strm,
963e9ad
+     in_func in,
963e9ad
+     void FAR *in_desc,
963e9ad
+@@ -629,7 +629,7 @@
963e9ad
+     return ret;
963e9ad
+ }
963e9ad
+ 
963e9ad
+-int ZEXPORT inflateBackEnd(
963e9ad
++static int ZEXPORT inflateBackEnd(
963e9ad
+     z_streamp strm)
963e9ad
+ {
963e9ad
+     if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
963e9ad
+diff -ur freetype-2.12.1/src/gzip/inffast.c freetype-src/src/gzip/inffast.c
963e9ad
+--- freetype-2.12.1/src/gzip/inffast.c	Fri Apr 01 16:13:52 2022
963e9ad
++++ freetype-src/src/gzip/inffast.c	Fri May 06 12:01:59 2022
963e9ad
+@@ -47,7 +47,7 @@
963e9ad
+       requires strm->avail_out >= 258 for each loop to avoid checking for
963e9ad
+       output space.
963e9ad
+  */
963e9ad
+-void ZLIB_INTERNAL inflate_fast(
963e9ad
++static void ZLIB_INTERNAL inflate_fast(
963e9ad
+     z_streamp strm,
963e9ad
+     unsigned start)
963e9ad
+ {
963e9ad
+diff -ur freetype-2.12.1/src/gzip/inffast.h freetype-src/src/gzip/inffast.h
963e9ad
+--- freetype-2.12.1/src/gzip/inffast.h	Fri Apr 01 16:13:52 2022
963e9ad
++++ freetype-src/src/gzip/inffast.h	Fri May 06 12:25:15 2022
963e9ad
+@@ -8,4 +8,4 @@
963e9ad
+    subject to change. Applications should only use zlib.h.
963e9ad
+  */
963e9ad
+ 
963e9ad
+-void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));
963e9ad
++static void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));
963e9ad
+diff -ur freetype-2.12.1/src/gzip/inflate.c freetype-src/src/gzip/inflate.c
963e9ad
+--- freetype-2.12.1/src/gzip/inflate.c	Fri Apr 01 17:25:55 2022
963e9ad
++++ freetype-src/src/gzip/inflate.c	Thu May 05 07:24:18 2022
963e9ad
+@@ -118,7 +118,7 @@
963e9ad
+     return 0;
963e9ad
+ }
963e9ad
+ 
963e9ad
+-int ZEXPORT inflateResetKeep(
963e9ad
++static int ZEXPORT inflateResetKeep(
963e9ad
+     z_streamp strm)
963e9ad
+ {
963e9ad
+     struct inflate_state FAR *state;
963e9ad
+@@ -144,7 +144,7 @@
963e9ad
+     return Z_OK;
963e9ad
+ }
963e9ad
+ 
963e9ad
+-int ZEXPORT inflateReset(
963e9ad
++static int ZEXPORT inflateReset(
963e9ad
+     z_streamp strm)
963e9ad
+ {
963e9ad
+     struct inflate_state FAR *state;
963e9ad
+@@ -157,7 +157,7 @@
963e9ad
+     return inflateResetKeep(strm);
963e9ad
+ }
963e9ad
+ 
963e9ad
+-int ZEXPORT inflateReset2(
963e9ad
++static int ZEXPORT inflateReset2(
963e9ad
+     z_streamp strm,
963e9ad
+     int windowBits)
963e9ad
+ {
963e9ad
+@@ -195,7 +195,7 @@
963e9ad
+     return inflateReset(strm);
963e9ad
+ }
963e9ad
+ 
963e9ad
+-int ZEXPORT inflateInit2_(
963e9ad
++static int ZEXPORT inflateInit2_(
963e9ad
+     z_streamp strm,
963e9ad
+     int windowBits,
963e9ad
+     const char *version,
963e9ad
+@@ -239,7 +239,7 @@
963e9ad
+     return ret;
963e9ad
+ }
963e9ad
+ 
963e9ad
+-int ZEXPORT inflateInit_(
963e9ad
++static int ZEXPORT inflateInit_(
963e9ad
+     z_streamp strm,
963e9ad
+     const char *version,
963e9ad
+     int stream_size)
963e9ad
+@@ -249,7 +249,7 @@
963e9ad
+ 
963e9ad
+ #ifndef Z_FREETYPE
963e9ad
+ 
963e9ad
+-int ZEXPORT inflatePrime(
963e9ad
++static int ZEXPORT inflatePrime(
963e9ad
+     z_streamp strm,
963e9ad
+     int bits,
963e9ad
+     int value)
963e9ad
+@@ -626,7 +626,7 @@
963e9ad
+    will return Z_BUF_ERROR if it has not reached the end of the stream.
963e9ad
+  */
963e9ad
+ 
963e9ad
+-int ZEXPORT inflate(
963e9ad
++static int ZEXPORT inflate(
963e9ad
+     z_streamp strm,
963e9ad
+     int flush)
963e9ad
+ {
963e9ad
+@@ -1304,7 +1304,7 @@
963e9ad
+     return ret;
963e9ad
+ }
963e9ad
+ 
963e9ad
+-int ZEXPORT inflateEnd(
963e9ad
++static int ZEXPORT inflateEnd(
963e9ad
+     z_streamp strm)
963e9ad
+ {
963e9ad
+     struct inflate_state FAR *state;
963e9ad
+@@ -1320,7 +1320,7 @@
963e9ad
+ 
963e9ad
+ #ifndef Z_FREETYPE
963e9ad
+ 
963e9ad
+-int ZEXPORT inflateGetDictionary(
963e9ad
++static int ZEXPORT inflateGetDictionary(
963e9ad
+     z_streamp strm,
963e9ad
+     Bytef *dictionary,
963e9ad
+     uInt *dictLength)
963e9ad
+@@ -1343,7 +1343,7 @@
963e9ad
+     return Z_OK;
963e9ad
+ }
963e9ad
+ 
963e9ad
+-int ZEXPORT inflateSetDictionary(
963e9ad
++static int ZEXPORT inflateSetDictionary(
963e9ad
+     z_streamp strm,
963e9ad
+     const Bytef *dictionary,
963e9ad
+     uInt dictLength)
963e9ad
+@@ -1378,7 +1378,7 @@
963e9ad
+     return Z_OK;
963e9ad
+ }
963e9ad
+ 
963e9ad
+-int ZEXPORT inflateGetHeader(
963e9ad
++static int ZEXPORT inflateGetHeader(
963e9ad
+     z_streamp strm,
963e9ad
+     gz_headerp head)
963e9ad
+ {
963e9ad
+@@ -1429,7 +1429,7 @@
963e9ad
+     return next;
963e9ad
+ }
963e9ad
+ 
963e9ad
+-int ZEXPORT inflateSync(
963e9ad
++static int ZEXPORT inflateSync(
963e9ad
+     z_streamp strm)
963e9ad
+ {
963e9ad
+     unsigned len;               /* number of bytes to look at or looked at */
963e9ad
+@@ -1489,7 +1489,7 @@
963e9ad
+    block. When decompressing, PPP checks that at the end of input packet,
963e9ad
+    inflate is waiting for these length bytes.
963e9ad
+  */
963e9ad
+-int ZEXPORT inflateSyncPoint(
963e9ad
++static int ZEXPORT inflateSyncPoint(
963e9ad
+     z_streamp strm)
963e9ad
+ {
963e9ad
+     struct inflate_state FAR *state;
963e9ad
+@@ -1501,7 +1501,7 @@
963e9ad
+ 
963e9ad
+ #ifndef Z_FREETYPE
963e9ad
+ 
963e9ad
+-int ZEXPORT inflateCopy(
963e9ad
++static int ZEXPORT inflateCopy(
963e9ad
+     z_streamp dest,
963e9ad
+     z_streamp source)
963e9ad
+ {
963e9ad
+@@ -1550,7 +1550,7 @@
963e9ad
+ 
963e9ad
+ #endif  /* !Z_FREETYPE */
963e9ad
+ 
963e9ad
+-int ZEXPORT inflateUndermine(
963e9ad
++static int ZEXPORT inflateUndermine(
963e9ad
+     z_streamp strm,
963e9ad
+     int subvert)
963e9ad
+ {
963e9ad
+@@ -1568,7 +1568,7 @@
963e9ad
+ #endif
963e9ad
+ }
963e9ad
+ 
963e9ad
+-int ZEXPORT inflateValidate(
963e9ad
++static int ZEXPORT inflateValidate(
963e9ad
+     z_streamp strm,
963e9ad
+     int check)
963e9ad
+ {
963e9ad
+@@ -1585,7 +1585,7 @@
963e9ad
+ 
963e9ad
+ #ifndef Z_FREETYPE
963e9ad
+ 
963e9ad
+-long ZEXPORT inflateMark(
963e9ad
++static long ZEXPORT inflateMark(
963e9ad
+     z_streamp strm)
963e9ad
+ {
963e9ad
+     struct inflate_state FAR *state;
963e9ad
+@@ -1598,7 +1598,7 @@
963e9ad
+             (state->mode == MATCH ? state->was - state->length : 0));
963e9ad
+ }
963e9ad
+ 
963e9ad
+-unsigned long ZEXPORT inflateCodesUsed(
963e9ad
++static unsigned long ZEXPORT inflateCodesUsed(
963e9ad
+     z_streamp strm)
963e9ad
+ {
963e9ad
+     struct inflate_state FAR *state;
963e9ad
+diff -ur freetype-2.12.1/src/gzip/inftrees.c freetype-src/src/gzip/inftrees.c
963e9ad
+--- freetype-2.12.1/src/gzip/inftrees.c	Fri Apr 01 16:13:52 2022
963e9ad
++++ freetype-src/src/gzip/inftrees.c	Fri May 06 12:33:23 2022
963e9ad
+@@ -8,7 +8,7 @@
963e9ad
+ 
963e9ad
+ #define MAXBITS 15
963e9ad
+ 
963e9ad
+-const char inflate_copyright[] =
963e9ad
++static const char inflate_copyright[] =
963e9ad
+    " inflate 1.2.12 Copyright 1995-2022 Mark Adler ";
963e9ad
+ /*
963e9ad
+   If you use the zlib library in a product, an acknowledgment is welcome
963e9ad
+@@ -29,7 +29,7 @@
963e9ad
+    table index bits.  It will differ if the request is greater than the
963e9ad
+    longest code or if it is less than the shortest code.
963e9ad
+  */
963e9ad
+-int ZLIB_INTERNAL inflate_table(
963e9ad
++static int ZLIB_INTERNAL inflate_table(
963e9ad
+     codetype type,
963e9ad
+     unsigned short FAR *lens,
963e9ad
+     unsigned codes,
963e9ad
+diff -ur freetype-2.12.1/src/gzip/inftrees.h freetype-src/src/gzip/inftrees.h
963e9ad
+--- freetype-2.12.1/src/gzip/inftrees.h	Fri Apr 01 17:24:23 2022
963e9ad
++++ freetype-src/src/gzip/inftrees.h	Fri May 06 12:25:35 2022
963e9ad
+@@ -60,7 +60,7 @@
963e9ad
+     DISTS
963e9ad
+ } codetype;
963e9ad
+ 
963e9ad
+-int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
963e9ad
++static int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
963e9ad
+                              unsigned codes, code FAR * FAR *table,
963e9ad
+                              unsigned FAR *bits, unsigned short FAR *work));
963e9ad
+ 
963e9ad
+diff -ur freetype-2.12.1/src/gzip/zutil.c freetype-src/src/gzip/zutil.c
963e9ad
+--- freetype-2.12.1/src/gzip/zutil.c	Fri Apr 01 16:13:54 2022
963e9ad
++++ freetype-src/src/gzip/zutil.c	Fri May 06 12:08:24 2022
963e9ad
+@@ -10,7 +10,7 @@
963e9ad
+ #  include "gzguts.h"
963e9ad
+ #endif
963e9ad
+ 
963e9ad
+-z_const char * const z_errmsg[10] = {
963e9ad
++static z_const char * const z_errmsg[10] = {
963e9ad
+     (z_const char *)"need dictionary",     /* Z_NEED_DICT       2  */
963e9ad
+     (z_const char *)"stream end",          /* Z_STREAM_END      1  */
963e9ad
+     (z_const char *)"",                    /* Z_OK              0  */
963e9ad
+@@ -24,12 +24,12 @@
963e9ad
+ };
963e9ad
+ 
963e9ad
+ 
963e9ad
+-const char * ZEXPORT zlibVersion()
963e9ad
++static const char * ZEXPORT zlibVersion()
963e9ad
+ {
963e9ad
+     return ZLIB_VERSION;
963e9ad
+ }
963e9ad
+ 
963e9ad
+-uLong ZEXPORT zlibCompileFlags()
963e9ad
++static uLong ZEXPORT zlibCompileFlags()
963e9ad
+ {
963e9ad
+     uLong flags;
963e9ad
+ 
963e9ad
+@@ -117,9 +117,9 @@
963e9ad
+ #  ifndef verbose
963e9ad
+ #    define verbose 0
963e9ad
+ #  endif
963e9ad
+-int ZLIB_INTERNAL z_verbose = verbose;
963e9ad
++static int ZLIB_INTERNAL z_verbose = verbose;
963e9ad
+ 
963e9ad
+-void ZLIB_INTERNAL z_error (
963e9ad
++static void ZLIB_INTERNAL z_error (
963e9ad
+     char *m)
963e9ad
+ {
963e9ad
+     fprintf(stderr, "%s\n", m);
963e9ad
+@@ -130,7 +130,7 @@
963e9ad
+ /* exported to allow conversion of error code to string for compress() and
963e9ad
+  * uncompress()
963e9ad
+  */
963e9ad
+-const char * ZEXPORT zError(
963e9ad
++static const char * ZEXPORT zError(
963e9ad
+     int err)
963e9ad
+ {
963e9ad
+     return ERR_MSG(err);
963e9ad
+@@ -146,7 +146,7 @@
963e9ad
+ 
963e9ad
+ #ifndef HAVE_MEMCPY
963e9ad
+ 
963e9ad
+-void ZLIB_INTERNAL zmemcpy(
963e9ad
++static void ZLIB_INTERNAL zmemcpy(
963e9ad
+     Bytef* dest,
963e9ad
+     const Bytef* source,
963e9ad
+     uInt  len)
963e9ad
+@@ -157,7 +157,7 @@
963e9ad
+     } while (--len != 0);
963e9ad
+ }
963e9ad
+ 
963e9ad
+-int ZLIB_INTERNAL zmemcmp(
963e9ad
++static int ZLIB_INTERNAL zmemcmp(
963e9ad
+     const Bytef* s1,
963e9ad
+     const Bytef* s2,
963e9ad
+     uInt  len)
963e9ad
+@@ -170,7 +170,7 @@
963e9ad
+     return 0;
963e9ad
+ }
963e9ad
+ 
963e9ad
+-void ZLIB_INTERNAL zmemzero(
963e9ad
++static void ZLIB_INTERNAL zmemzero(
963e9ad
+     Bytef* dest,
963e9ad
+     uInt  len)
963e9ad
+ {
963e9ad
+@@ -214,7 +214,7 @@
963e9ad
+  * a protected system like OS/2. Use Microsoft C instead.
963e9ad
+  */
963e9ad
+ 
963e9ad
+-voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size)
963e9ad
++static voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size)
963e9ad
+ {
963e9ad
+     voidpf buf;
963e9ad
+     ulg bsize = (ulg)items*size;
963e9ad
+@@ -240,7 +240,7 @@
963e9ad
+     return buf;
963e9ad
+ }
963e9ad
+ 
963e9ad
+-void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
963e9ad
++static void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
963e9ad
+ {
963e9ad
+     int n;
963e9ad
+ 
963e9ad
+@@ -277,13 +277,13 @@
963e9ad
+ #  define _hfree   hfree
963e9ad
+ #endif
963e9ad
+ 
963e9ad
+-voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size)
963e9ad
++static voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size)
963e9ad
+ {
963e9ad
+     (void)opaque;
963e9ad
+     return _halloc((long)items, size);
963e9ad
+ }
963e9ad
+ 
963e9ad
+-void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
963e9ad
++static void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
963e9ad
+ {
963e9ad
+     (void)opaque;
963e9ad
+     _hfree(ptr);
963e9ad
+@@ -302,7 +302,7 @@
963e9ad
+ extern void   free   OF((voidpf ptr));
963e9ad
+ #endif
963e9ad
+ 
963e9ad
+-voidpf ZLIB_INTERNAL zcalloc (
963e9ad
++static voidpf ZLIB_INTERNAL zcalloc (
963e9ad
+     voidpf opaque,
963e9ad
+     unsigned items,
963e9ad
+     unsigned size)
963e9ad
+@@ -312,7 +312,7 @@
963e9ad
+                               (voidpf)calloc(items, size);
963e9ad
+ }
963e9ad
+ 
963e9ad
+-void ZLIB_INTERNAL zcfree (
963e9ad
++static void ZLIB_INTERNAL zcfree (
963e9ad
+     voidpf opaque,
963e9ad
+     voidpf ptr)
963e9ad
+ {
963e9ad
+diff -ur freetype-2.12.1/src/gzip/zutil.h freetype-src/src/gzip/zutil.h
963e9ad
+--- freetype-2.12.1/src/gzip/zutil.h	Fri Apr 01 17:24:23 2022
963e9ad
++++ freetype-src/src/gzip/zutil.h	Sat May 07 14:13:48 2022
963e9ad
+@@ -13,11 +13,8 @@
963e9ad
+ #ifndef ZUTIL_H
963e9ad
+ #define ZUTIL_H
963e9ad
+ 
963e9ad
+-#ifdef HAVE_HIDDEN
963e9ad
+-#  define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
963e9ad
+-#else
963e9ad
+-#  define ZLIB_INTERNAL
963e9ad
+-#endif
963e9ad
++/* we use "static" for all platforms */
963e9ad
++#define ZLIB_INTERNAL
963e9ad
+ 
963e9ad
+ #include "zlib.h"
963e9ad
+ 
963e9ad
+@@ -53,7 +50,7 @@
963e9ad
+ #  endif
963e9ad
+ #endif
963e9ad
+ 
963e9ad
+-extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
963e9ad
++static z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
963e9ad
+ /* (size given to avoid silly warnings with Visual C++) */
963e9ad
+ 
963e9ad
+ #define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
963e9ad
+@@ -235,16 +232,16 @@
963e9ad
+ #    define zmemzero(dest, len) ft_memset(dest, 0, len)
963e9ad
+ #  endif
963e9ad
+ #else
963e9ad
+-   void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
963e9ad
+-   int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
963e9ad
+-   void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len));
963e9ad
++   static void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
963e9ad
++   static int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
963e9ad
++   static void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len));
963e9ad
+ #endif
963e9ad
+ 
963e9ad
+ /* Diagnostic functions */
963e9ad
+ #ifdef ZLIB_DEBUG
963e9ad
+ #  include <stdio.h>
963e9ad
+-   extern int ZLIB_INTERNAL z_verbose;
963e9ad
+-   extern void ZLIB_INTERNAL z_error OF((char *m));
963e9ad
++   static int ZLIB_INTERNAL z_verbose;
963e9ad
++   static void ZLIB_INTERNAL z_error OF((char *m));
963e9ad
+ #  define Assert(cond,msg) {if(!(cond)) z_error(msg);}
963e9ad
+ #  define Trace(x) {if (z_verbose>=0) fprintf x ;}
963e9ad
+ #  define Tracev(x) {if (z_verbose>0) fprintf x ;}
963e9ad
+@@ -261,9 +258,9 @@
963e9ad
+ #endif
963e9ad
+ 
963e9ad
+ #ifndef Z_SOLO
963e9ad
+-   voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
963e9ad
++   static voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
963e9ad
+                                     unsigned size));
963e9ad
+-   void ZLIB_INTERNAL zcfree  OF((voidpf opaque, voidpf ptr));
963e9ad
++   static void ZLIB_INTERNAL zcfree  OF((voidpf opaque, voidpf ptr));
963e9ad
+ #endif
963e9ad
+ 
963e9ad
+ #define ZALLOC(strm, items, size) \
963e9ad
Index: Build/source/libs/freetype2/TLpatches/patch-04-void-main
963e9ad
===================================================================
963e9ad
--- Build/source/libs/freetype2/TLpatches/patch-04-void-main	(nonexistent)
963e9ad
+++ Build/source/libs/freetype2/TLpatches/patch-04-void-main	(revision 64953)
963e9ad
@@ -0,0 +1,13 @@
963e9ad
+diff --git a/libs/freetype2/freetype-src/builds/unix/freetype2.m4 b/libs/freetype2/freetype-src/builds/unix/freetype2.m4
963e9ad
+index 0cafc8e8c..51843f5fa 100644
963e9ad
+--- a/libs/freetype2/freetype-src/builds/unix/freetype2.m4
963e9ad
++++ b/libs/freetype2/freetype-src/builds/unix/freetype2.m4
963e9ad
+@@ -121,7 +121,7 @@ AC_DEFUN([AC_CHECK_FT2],
963e9ad
+ #include <stdlib.h>
963e9ad
+ 
963e9ad
+ int
963e9ad
+-main()
963e9ad
++main(void)
963e9ad
+ {
963e9ad
+   FT_Library library;
963e9ad
+   FT_Error  error;
963e9ad
Index: Build/source/libs/freetype2/freetype-src/builds/unix/freetype2.m4
963e9ad
===================================================================
963e9ad
--- Build/source/libs/freetype2/freetype-src/builds/unix/freetype2.m4	(revision 64952)
963e9ad
+++ Build/source/libs/freetype2/freetype-src/builds/unix/freetype2.m4	(revision 64953)
963e9ad
@@ -121,7 +121,7 @@
963e9ad
 #include <stdlib.h>
963e9ad
 
963e9ad
 int
963e9ad
-main()
963e9ad
+main(void)
963e9ad
 {
963e9ad
   FT_Library library;
963e9ad
   FT_Error  error;
963e9ad
Index: Build/source/libs/gd/TLpatches/patch-03-void-main
963e9ad
===================================================================
963e9ad
--- Build/source/libs/gd/TLpatches/patch-03-void-main	(nonexistent)
963e9ad
+++ Build/source/libs/gd/TLpatches/patch-03-void-main	(revision 64953)
963e9ad
@@ -0,0 +1,13 @@
963e9ad
+diff --git a/libs/gd/libgd-src/tests/xpm/bug00185.c b/libs/gd/libgd-src/tests/xpm/bug00185.c
963e9ad
+index 3056ed950..37659d6a4 100644
963e9ad
+--- a/libs/gd/libgd-src/tests/xpm/bug00185.c
963e9ad
++++ b/libs/gd/libgd-src/tests/xpm/bug00185.c
963e9ad
+@@ -5,7 +5,7 @@
963e9ad
+ 
963e9ad
+ /* To check memory leaks, run such as 'valgrind --leak-check=full ./bug00185' */
963e9ad
+ int
963e9ad
+-main()
963e9ad
++main(void)
963e9ad
+ {
963e9ad
+ 	gdImagePtr im;
963e9ad
+ 	char *path;
963e9ad
Index: Build/source/libs/gd/libgd-src/tests/xpm/bug00185.c
963e9ad
===================================================================
963e9ad
--- Build/source/libs/gd/libgd-src/tests/xpm/bug00185.c	(revision 64952)
963e9ad
+++ Build/source/libs/gd/libgd-src/tests/xpm/bug00185.c	(revision 64953)
963e9ad
@@ -5,7 +5,7 @@
963e9ad
 
963e9ad
 /* To check memory leaks, run such as 'valgrind --leak-check=full ./bug00185' */
963e9ad
 int
963e9ad
-main()
963e9ad
+main(void)
963e9ad
 {
963e9ad
 	gdImagePtr im;
963e9ad
 	char *path;
963e9ad
Index: Build/source/texk/ps2pk/basename.c
963e9ad
===================================================================
963e9ad
--- Build/source/texk/ps2pk/basename.c	(revision 64952)
963e9ad
+++ Build/source/texk/ps2pk/basename.c	(revision 64953)
963e9ad
@@ -6,11 +6,12 @@
963e9ad
  * AUTHOR:  Piet Tutelaers
963e9ad
  * VERSION: 1.0 (Sept. 1995)
963e9ad
  */
963e9ad
+#include <stdlib.h>     /* exit() */
963e9ad
 #include <stdio.h>	/* printf() */
963e9ad
 #include "basics.h"	/* fatal() */
963e9ad
 #include "filenames.h"	/* basename() */
963e9ad
 
963e9ad
-main(int argc, char **argv)
963e9ad
+int main(int argc, char **argv)
963e9ad
 {
963e9ad
    if (argc < 2 || argc > 3) 
963e9ad
       fatal("Usage: basename string [suffix]\n");
963e9ad
Index: Build/source/utils/m-tx/mtx-src/prepmx.c
963e9ad
===================================================================
963e9ad
--- Build/source/utils/m-tx/mtx-src/prepmx.c	(revision 64952)
963e9ad
+++ Build/source/utils/m-tx/mtx-src/prepmx.c	(revision 64953)
963e9ad
@@ -769,7 +769,7 @@
963e9ad
 }
963e9ad
 
963e9ad
 
963e9ad
-main(int argc, Char *argv[])
963e9ad
+int main(int argc, Char *argv[])
963e9ad
 {  /* ---- Main program ------------------------ */
963e9ad
   PASCAL_MAIN(argc, argv);
963e9ad
   strcpy(this_version, version);
963e9ad
Index: Build/source/utils/pmx/TLpatches/patch-01-main-ret
963e9ad
===================================================================
963e9ad
--- Build/source/utils/pmx/TLpatches/patch-01-main-ret	(nonexistent)
963e9ad
+++ Build/source/utils/pmx/TLpatches/patch-01-main-ret	(revision 64953)
963e9ad
@@ -0,0 +1,13 @@
963e9ad
+diff --git a/utils/pmx/pmx-src/libf2c/main.c b/utils/pmx/pmx-src/libf2c/main.c
963e9ad
+index 453974904..f485a0cd0 100644
963e9ad
+--- a/utils/pmx/pmx-src/libf2c/main.c
963e9ad
++++ b/utils/pmx/pmx-src/libf2c/main.c
963e9ad
+@@ -106,7 +106,7 @@ char **xargv;
963e9ad
+ #ifdef KR_headers
963e9ad
+ main(argc, argv) int argc; char **argv;
963e9ad
+ #else
963e9ad
+-main(int argc, char **argv)
963e9ad
++int main(int argc, char **argv)
963e9ad
+ #endif
963e9ad
+ {
963e9ad
+ xargc = argc;
963e9ad
Index: Build/source/utils/pmx/pmx-src/libf2c/main.c
963e9ad
===================================================================
963e9ad
--- Build/source/utils/pmx/pmx-src/libf2c/main.c	(revision 64952)
963e9ad
+++ Build/source/utils/pmx/pmx-src/libf2c/main.c	(revision 64953)
963e9ad
@@ -106,7 +106,7 @@
963e9ad
 #ifdef KR_headers
963e9ad
 main(argc, argv) int argc; char **argv;
963e9ad
 #else
963e9ad
-main(int argc, char **argv)
963e9ad
+int main(int argc, char **argv)
963e9ad
 #endif
963e9ad
 {
963e9ad
 xargc = argc;