summaryrefslogtreecommitdiffstats
path: root/0006-Cygwin-fix-some-implicit-declaration-warnings-and-re.patch
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2021-09-02 17:33:55 -0400
committerYaakov Selkowitz <yselkowi@redhat.com>2021-09-02 17:33:55 -0400
commit041920c9533fad4a517fe6f268ebbd3af2a903a7 (patch)
tree8bd6477a4b39d73a8121d7292ffad82591eacf41 /0006-Cygwin-fix-some-implicit-declaration-warnings-and-re.patch
parent58aad36b016765d2b651b9167f0a4caa6142d5f9 (diff)
downloadcygwin-gcc-041920c9533fad4a517fe6f268ebbd3af2a903a7.tar.gz
cygwin-gcc-041920c9533fad4a517fe6f268ebbd3af2a903a7.tar.xz
cygwin-gcc-041920c9533fad4a517fe6f268ebbd3af2a903a7.zip
cygwin-gcc 11.2.0
Diffstat (limited to '0006-Cygwin-fix-some-implicit-declaration-warnings-and-re.patch')
-rw-r--r--0006-Cygwin-fix-some-implicit-declaration-warnings-and-re.patch111
1 files changed, 111 insertions, 0 deletions
diff --git a/0006-Cygwin-fix-some-implicit-declaration-warnings-and-re.patch b/0006-Cygwin-fix-some-implicit-declaration-warnings-and-re.patch
new file mode 100644
index 0000000..d3d7e09
--- /dev/null
+++ b/0006-Cygwin-fix-some-implicit-declaration-warnings-and-re.patch
@@ -0,0 +1,111 @@
+From 81dd139464851507ecdc4da2a86d802e098998c3 Mon Sep 17 00:00:00 2001
+From: Jonathan Yong <10walls@gmail.com>
+Date: Sat, 28 Jun 2014 10:08:25 +0800
+Subject: [PATCH 06/11] Cygwin: fix some implicit declaration warnings and
+ regenerate configure
+
+# Conflicts:
+# libiberty/aclocal.m4
+---
+ libiberty/acinclude.m4 | 6 +++++-
+ libiberty/configure | 18 +++++++++++++++++-
+ 2 files changed, 22 insertions(+), 2 deletions(-)
+
+diff --git a/libiberty/acinclude.m4 b/libiberty/acinclude.m4
+index 6db0e508517..dfa4c6cac10 100644
+--- a/libiberty/acinclude.m4
++++ b/libiberty/acinclude.m4
+@@ -25,6 +25,8 @@ AC_CACHE_CHECK([for working strncmp], ac_cv_func_strncmp_works,
+ /* Test by Jim Wilson and Kaveh Ghazi.
+ Check whether strncmp reads past the end of its string parameters. */
+ #include <sys/types.h>
++#include <string.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_FCNTL_H
+ #include <fcntl.h>
+@@ -157,7 +159,9 @@ if test $ac_cv_os_cray = yes; then
+ fi
+
+ AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
+-[AC_TRY_RUN([find_stack_direction ()
++[AC_TRY_RUN([
++#include <stdlib.h>
++find_stack_direction ()
+ {
+ static char *addr = 0;
+ auto char dummy;
+diff --git a/libiberty/configure b/libiberty/configure
+index 2ea7c119809..bf899c3e463 100755
+--- a/libiberty/configure
++++ b/libiberty/configure
+@@ -681,6 +681,7 @@ infodir
+ docdir
+ oldincludedir
+ includedir
++runstatedir
+ localstatedir
+ sharedstatedir
+ sysconfdir
+@@ -760,6 +761,7 @@ datadir='${datarootdir}'
+ sysconfdir='${prefix}/etc'
+ sharedstatedir='${prefix}/com'
+ localstatedir='${prefix}/var'
++runstatedir='${localstatedir}/run'
+ includedir='${prefix}/include'
+ oldincludedir='/usr/include'
+ docdir='${datarootdir}/doc/${PACKAGE}'
+@@ -1012,6 +1014,15 @@ do
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
++ -runstatedir | --runstatedir | --runstatedi | --runstated \
++ | --runstate | --runstat | --runsta | --runst | --runs \
++ | --run | --ru | --r)
++ ac_prev=runstatedir ;;
++ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
++ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
++ | --run=* | --ru=* | --r=*)
++ runstatedir=$ac_optarg ;;
++
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+@@ -1149,7 +1160,7 @@ fi
+ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+- libdir localedir mandir
++ libdir localedir mandir runstatedir
+ do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+@@ -1302,6 +1313,7 @@ Fine tuning of the installation directories:
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
++ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+@@ -6722,6 +6734,8 @@ else
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++
++#include <stdlib.h>
+ find_stack_direction ()
+ {
+ static char *addr = 0;
+@@ -7556,6 +7570,8 @@ else
+ /* Test by Jim Wilson and Kaveh Ghazi.
+ Check whether strncmp reads past the end of its string parameters. */
+ #include <sys/types.h>
++#include <string.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_FCNTL_H
+ #include <fcntl.h>
+--
+2.31.1
+