[PATCH] AC_LANG_INT_SAVE: Modernize function declarators (C89 and above).

Vincent Lefevre <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Message-ID <[email protected]>
This allows one to avoid a failure with AC_COMPUTE_INT when using
the -Werror=old-style-definition GCC option.

* lib/autoconf/c.m4 (AC_LANG_INT_SAVE): In function declarators,
use "(void)" instead of "()".

Signed-off-by: Vincent Lefevre <[email protected]>
---
 lib/autoconf/c.m4 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index b2129d5d..98e3e40d 100644
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -194,8 +194,8 @@ return test_array @<:@0@:>@;
 # But we include them only after the EXPRESSION has been evaluated.
 m4_define([AC_LANG_INT_SAVE(C)],
 [AC_LANG_PROGRAM([$1
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
+static long int longval (void) { return $2; }
+static unsigned long int ulongval (void) { return $2; }
 @%:@include <stdio.h>
 @%:@include <stdlib.h>],
 [
-- 
2.28.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.