File kvim-configure-in.patch of Package kvim

diff -Naru kvim-6.3_orig/src/configure.in kvim-6.3/src/configure.in
--- kvim-6.3_orig/src/configure.in	2011-01-04 16:04:20.000000000 +0000
+++ kvim-6.3/src/configure.in	2024-09-05 05:51:14.632578165 +0000
@@ -2039,7 +2039,7 @@
 
 AC_MSG_CHECKING(quality of toupper)
 AC_TRY_RUN([#include <ctype.h>
-main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }],
+int main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }],
 	AC_DEFINE(BROKEN_TOUPPER) AC_MSG_RESULT(bad),
 	AC_MSG_RESULT(good), AC_MSG_ERROR(failed to compile test program))
 
@@ -2212,7 +2212,8 @@
 #ifdef HAVE_TERMCAP_H
 # include <termcap.h>
 #endif
-main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }],
+#include <stdlib.h>
+int main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }],
 			  res="OK", res="FAIL", res="FAIL")
       if test "$res" = "OK"; then
 	break
@@ -2228,7 +2229,8 @@
 #ifdef HAVE_TERMCAP_H
 # include <termcap.h>
 #endif
-main()
+#include <stdlib.h>
+int main()
 {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }],
 	  AC_MSG_RESULT([no -- we are in termcap land]),
 	  AC_MSG_RESULT([yes -- terminfo spoken here]); AC_DEFINE(TERMINFO),
@@ -2243,7 +2245,8 @@
 #ifdef HAVE_TERMCAP_H
 # include <termcap.h>
 #endif
-main()
+#include <stdlib.h>
+int main()
 {char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }],
 	  AC_MSG_RESULT(zero); AC_DEFINE(TGETENT_ZERO_ERR, 0),
 	  AC_MSG_RESULT(non-zero),
@@ -2363,7 +2366,8 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <stdio.h>
-main()
+#include <stdlib.h>
+int main()
 {
   struct stat sb;
   char *x,*ttyname();
@@ -2431,7 +2435,7 @@
 AC_MSG_CHECKING(getcwd implementation)
 AC_TRY_RUN([
 char *dagger[] = { "IFS=pwd", 0 };
-main()
+int main()
 {
   char buffer[500];
   extern char **environ;
@@ -2468,7 +2472,8 @@
 AC_TRY_RUN(
 [#include <sys/types.h>
 #include <sys/stat.h>
-main() {struct stat st;  exit(stat("configure/", &st) != 0); }],
+#include <stdlib.h>
+int main() {struct stat st;  exit(stat("configure/", &st) != 0); }],
 	AC_MSG_RESULT(yes); AC_DEFINE(STAT_IGNORES_SLASH),
 	AC_MSG_RESULT(no), AC_MSG_ERROR(failed to compile test program))
 
@@ -2592,6 +2597,7 @@
 AC_TRY_RUN([
 #include <stdio.h>
 #include <stdarg.h>
+#include <stdlib.h>
 	/* Check use of vsnprintf() */
 	void warn(char *fmt, ...);
 	void warn(char *fmt, ...)
@@ -2601,7 +2607,7 @@
 	  vsnprintf(buf, 20, fmt, ap);
 	  va_end(ap);
 	}
-	main()
+	int main()
 	{
 	warn("testing %s\n", "a very long string that won't fit");
 	exit(0);
@@ -2664,7 +2670,8 @@
 AC_MSG_CHECKING(size of int)
 AC_CACHE_VAL(ac_cv_sizeof_int,
 	[AC_TRY_RUN([#include <stdio.h>
-		main()
+		#include <stdlib.h>
+		int main()
 		{
 		  FILE *f=fopen("conftestval", "w");
 		  if (!f) exit(1);
@@ -2679,7 +2686,7 @@
 
 AC_MSG_CHECKING(whether memmove/bcopy/memcpy handle overlaps)
 [bcopy_test_prog='
-main() {
+int main() {
   char buf[10];
   strcpy(buf, "abcdefghi");
   mch_memmove(buf, buf + 2, 3);
openSUSE Build Service is sponsored by