mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-10 09:16:37 +02:00
125 lines
3.6 KiB
Diff
125 lines
3.6 KiB
Diff
Source: https://src.fedoraproject.org/rpms/wol/raw/rawhide/f/wol-configure-c99.patch
|
|
--
|
|
Avoid implicit function declarations for C99 compatibility.
|
|
These are mostly in standard (built-in or gnulib/autoconf archive)
|
|
checks, so there is no need to upstream this (if upstream were stil
|
|
active).
|
|
|
|
diff --git a/configure b/configure
|
|
index 5a5a82660c50b040..38779afcf5cfe28b 100755
|
|
--- a/configure
|
|
+++ b/configure
|
|
@@ -2669,7 +2669,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
(exit $ac_status); }; }; then
|
|
for ac_declaration in \
|
|
- '' \
|
|
+ '#include <stdlib.h>' \
|
|
'extern "C" void std::exit (int) throw (); using std::exit;' \
|
|
'extern "C" void std::exit (int); using std::exit;' \
|
|
'extern "C" void exit (int) throw ();' \
|
|
@@ -3293,8 +3293,8 @@ main ()
|
|
for (i = 0; i < 256; i++)
|
|
if (XOR (islower (i), ISLOWER (i))
|
|
|| toupper (i) != TOUPPER (i))
|
|
- exit(2);
|
|
- exit (0);
|
|
+ return 2;
|
|
+ return 0;
|
|
}
|
|
_ACEOF
|
|
rm -f conftest$ac_exeext
|
|
@@ -4188,7 +4188,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
(exit $ac_status); }; }; then
|
|
for ac_declaration in \
|
|
- '' \
|
|
+ '#include <stdlib.h>' \
|
|
'extern "C" void std::exit (int) throw (); using std::exit;' \
|
|
'extern "C" void std::exit (int); using std::exit;' \
|
|
'extern "C" void exit (int) throw ();' \
|
|
@@ -12227,8 +12227,8 @@ main ()
|
|
for (i = 0; i < 256; i++)
|
|
if (XOR (islower (i), ISLOWER (i))
|
|
|| toupper (i) != TOUPPER (i))
|
|
- exit(2);
|
|
- exit (0);
|
|
+ return 2;
|
|
+ return 0;
|
|
}
|
|
_ACEOF
|
|
rm -f conftest$ac_exeext
|
|
@@ -13410,7 +13410,7 @@ cat >>conftest.$ac_ext <<_ACEOF
|
|
int
|
|
main ()
|
|
{
|
|
- exit (malloc (0) ? 0 : 1);
|
|
+ return malloc (0) ? 0 : 1;
|
|
}
|
|
|
|
_ACEOF
|
|
@@ -13481,7 +13481,7 @@ cat >>conftest.$ac_ext <<_ACEOF
|
|
int
|
|
main ()
|
|
{
|
|
- exit (realloc (0, 0) ? 0 : 1);
|
|
+ return realloc (0, 0) ? 0 : 1;
|
|
}
|
|
|
|
_ACEOF
|
|
@@ -14534,6 +14534,7 @@ cat confdefs.h >>conftest.$ac_ext
|
|
cat >>conftest.$ac_ext <<_ACEOF
|
|
/* end confdefs.h. */
|
|
$ac_includes_default
|
|
+#include <error.h>
|
|
int
|
|
main ()
|
|
{
|
|
@@ -14719,7 +14720,7 @@ cat >>conftest.$ac_ext <<_ACEOF
|
|
if (!in)
|
|
return 1;
|
|
len = getline (&line, &siz, in);
|
|
- exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
|
|
+ return (len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1;
|
|
}
|
|
|
|
_ACEOF
|
|
diff --git a/m4/getline.m4 b/m4/getline.m4
|
|
index d19e56386717afbd..e4da867860cc08fc 100644
|
|
--- a/m4/getline.m4
|
|
+++ b/m4/getline.m4
|
|
@@ -27,7 +27,7 @@ AC_DEFUN([AM_FUNC_GETLINE],
|
|
if (!in)
|
|
return 1;
|
|
len = getline (&line, &siz, in);
|
|
- exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
|
|
+ return (len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1;
|
|
}
|
|
], am_cv_func_working_getline=yes dnl The library version works.
|
|
, am_cv_func_working_getline=no dnl The library version does NOT work.
|
|
diff --git a/m4/malloc.m4 b/m4/malloc.m4
|
|
index 05c66ad6a21012de..35f70572348a2ec6 100644
|
|
--- a/m4/malloc.m4
|
|
+++ b/m4/malloc.m4
|
|
@@ -18,7 +18,7 @@ AC_DEFUN([jm_FUNC_MALLOC],
|
|
int
|
|
main ()
|
|
{
|
|
- exit (malloc (0) ? 0 : 1);
|
|
+ return malloc (0) ? 0 : 1;
|
|
}
|
|
],
|
|
jm_cv_func_working_malloc=yes,
|
|
diff --git a/m4/realloc.m4 b/m4/realloc.m4
|
|
index ff8314dd4fc407e9..9eb71f59aac26f8b 100644
|
|
--- a/m4/realloc.m4
|
|
+++ b/m4/realloc.m4
|
|
@@ -18,7 +18,7 @@ AC_DEFUN([jm_FUNC_REALLOC],
|
|
int
|
|
main ()
|
|
{
|
|
- exit (realloc (0, 0) ? 0 : 1);
|
|
+ return realloc (0, 0) ? 0 : 1;
|
|
}
|
|
],
|
|
jm_cv_func_working_realloc=yes,
|