[Git][ghc/ghc][master] m4/fp_leading_underscore.m4: Avoid implicit exit function declaration

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Jan 11 05:56:31 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
0470ea7c by Florian Weimer at 2023-01-11T00:56:10-05:00
m4/fp_leading_underscore.m4: Avoid implicit exit function declaration

And switch to a new-style function definition.

Fixes build issues with compilers that do not accept implicit function
declarations.

- - - - -


1 changed file:

- m4/fp_leading_underscore.m4


Changes:

=====================================
m4/fp_leading_underscore.m4
=====================================
@@ -32,17 +32,15 @@ struct nlist xYzzY1[] = {{"xYzzY1", 0},{0}};
 struct nlist xYzzY2[] = {{"_xYzzY2", 0},{0}};
 #endif
 
-int main(argc, argv)
-int argc;
-char **argv;
+int main(int argc, char **argv)
 {
 #if defined(HAVE_NLIST_H)
     if(nlist(argv[0], xYzzY1) == 0 && xYzzY1[0].n_value != 0)
-        exit(1);
+        return 1;
     if(nlist(argv[0], xYzzY2) == 0 && xYzzY2[0].n_value != 0)
-        exit(0);
+        return 0;
 #endif
-    exit(1);
+    return 1;
 }]])],[fptools_cv_leading_underscore=yes],[fptools_cv_leading_underscore=no],[fptools_cv_leading_underscore=no])
 ;;
 esac]);



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0470ea7c92ad2330a9c6dfc8eae3a1dcad41dcb9

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0470ea7c92ad2330a9c6dfc8eae3a1dcad41dcb9
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230111/47338fb6/attachment-0001.html>


More information about the ghc-commits mailing list