fbe8f0f
Submitted upstream:
fbe8f0f
fbe8f0f
  <https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9394>
fbe8f0f
fbe8f0f
From 6b218717ac85d6dc9104f470cac0b4fb594104f4 Mon Sep 17 00:00:00 2001
fbe8f0f
From: Florian Weimer <fweimer@redhat.com>
fbe8f0f
Date: Tue, 22 Nov 2022 15:23:50 +0100
fbe8f0f
Subject: [PATCH] m4/fp_leading_underscore.m4: Avoid implicit exit function
fbe8f0f
 declaration
fbe8f0f
Content-type: text/plain
fbe8f0f
fbe8f0f
And switch to a new-style function definition.
fbe8f0f
fbe8f0f
Fixes build issues with compilers that do not accept implicit function
fbe8f0f
declarations.
fbe8f0f
fbe8f0f
diff -ur ghc-8.10.7.orig/aclocal.m4 ghc-8.10.7/aclocal.m4
fbe8f0f
--- ghc-8.10.7.orig/aclocal.m4	2021-06-29 09:24:51.000000000 +0200
fbe8f0f
+++ ghc-8.10.7/aclocal.m4	2023-01-12 12:48:11.461019327 +0100
fbe8f0f
@@ -966,17 +966,15 @@
fbe8f0f
 struct nlist xYzzY2[] = {{"_xYzzY2", 0},{0}};
fbe8f0f
 #endif
fbe8f0f
 
fbe8f0f
-int main(argc, argv)
fbe8f0f
-int argc;
fbe8f0f
-char **argv;
fbe8f0f
+int main(int argc, char **argv)
fbe8f0f
 {
fbe8f0f
 #if defined(HAVE_NLIST_H)
fbe8f0f
     if(nlist(argv[0], xYzzY1) == 0 && xYzzY1[0].n_value != 0)
fbe8f0f
-        exit(1);
fbe8f0f
+        return 1;
fbe8f0f
     if(nlist(argv[0], xYzzY2) == 0 && xYzzY2[0].n_value != 0)
fbe8f0f
-        exit(0);
fbe8f0f
+        return 0;
fbe8f0f
 #endif
fbe8f0f
-    exit(1);
fbe8f0f
+    return 1;
fbe8f0f
 }]])],[fptools_cv_leading_underscore=yes],[fptools_cv_leading_underscore=no],[fptools_cv_leading_underscore=no])
fbe8f0f
 ;;
fbe8f0f
 esac]);
fbe8f0f
Only in ghc-8.10.7: aclocal.m4.orig
fbe8f0f
diff -ur ghc-8.10.7.orig/configure ghc-8.10.7/configure
fbe8f0f
--- ghc-8.10.7.orig/configure	2021-08-26 19:15:31.000000000 +0200
fbe8f0f
+++ ghc-8.10.7/configure	2023-01-12 12:48:23.461897380 +0100
fbe8f0f
@@ -15709,17 +15709,15 @@
fbe8f0f
 struct nlist xYzzY2[] = {{"_xYzzY2", 0},{0}};
fbe8f0f
 #endif
fbe8f0f
 
fbe8f0f
-int main(argc, argv)
fbe8f0f
-int argc;
fbe8f0f
-char **argv;
fbe8f0f
+int main(int argc, char **argv)
fbe8f0f
 {
fbe8f0f
 #if defined(HAVE_NLIST_H)
fbe8f0f
     if(nlist(argv[0], xYzzY1) == 0 && xYzzY1[0].n_value != 0)
fbe8f0f
-        exit(1);
fbe8f0f
+        return 1;
fbe8f0f
     if(nlist(argv[0], xYzzY2) == 0 && xYzzY2[0].n_value != 0)
fbe8f0f
-        exit(0);
fbe8f0f
+        return 0;
fbe8f0f
 #endif
fbe8f0f
-    exit(1);
fbe8f0f
+    return 1;
fbe8f0f
 }
fbe8f0f
 _ACEOF
fbe8f0f
 if ac_fn_c_try_run "$LINENO"
fbe8f0f
Only in ghc-8.10.7: configure.orig