comparison src/auto/configure @ 29232:204944c81b19 v8.2.5135

patch 8.2.5135: running configure gives warnings for main() return type Commit: https://github.com/vim/vim/commit/0f0d3a7fb6473760b6f6679e3c8a81376220c869 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 19 18:02:05 2022 +0100 patch 8.2.5135: running configure gives warnings for main() return type Problem: Running configure gives warnings for main() return type. Solution: Specify "int" return type. Avoid a few more warnings.
author Bram Moolenaar <Bram@vim.org>
date Sun, 19 Jun 2022 19:15:03 +0200
parents ca46658481cf
children 653bdd2b1fa1
comparison
equal deleted inserted replaced
29231:ff3b9f7abca3 29232:204944c81b19
7011 * RTLD_GLOBAL will be used and then it is not possible to 7011 * RTLD_GLOBAL will be used and then it is not possible to
7012 * have both python versions enabled in the same vim instance. 7012 * have both python versions enabled in the same vim instance.
7013 * Only the first python version used will be switched on. 7013 * Only the first python version used will be switched on.
7014 */ 7014 */
7015 7015
7016 int no_rtl_global_needed_for(char *python_instsoname, char *prefix) 7016 static int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
7017 { 7017 {
7018 int needed = 0; 7018 int needed = 0;
7019 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL); 7019 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
7020 if (pylib != 0) 7020 if (pylib != 0)
7021 { 7021 {
7030 dlclose(pylib); 7030 dlclose(pylib);
7031 } 7031 }
7032 return !needed; 7032 return !needed;
7033 } 7033 }
7034 7034
7035 int main(int argc, char** argv) 7035 int main()
7036 { 7036 {
7037 int not_needed = 0; 7037 int not_needed = 0;
7038 if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}")) 7038 if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
7039 not_needed = 1; 7039 not_needed = 1;
7040 return !not_needed; 7040 return !not_needed;
7077 * RTLD_GLOBAL will be used and then it is not possible to 7077 * RTLD_GLOBAL will be used and then it is not possible to
7078 * have both python versions enabled in the same vim instance. 7078 * have both python versions enabled in the same vim instance.
7079 * Only the first python version used will be switched on. 7079 * Only the first python version used will be switched on.
7080 */ 7080 */
7081 7081
7082 int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix) 7082 static int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
7083 { 7083 {
7084 int needed = 0; 7084 int needed = 0;
7085 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL); 7085 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
7086 if (pylib != 0) 7086 if (pylib != 0)
7087 { 7087 {
7096 dlclose(pylib); 7096 dlclose(pylib);
7097 } 7097 }
7098 return !needed; 7098 return !needed;
7099 } 7099 }
7100 7100
7101 int main(int argc, char** argv) 7101 int main()
7102 { 7102 {
7103 int not_needed = 0; 7103 int not_needed = 0;
7104 if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}")) 7104 if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
7105 not_needed = 1; 7105 not_needed = 1;
7106 return !not_needed; 7106 return !not_needed;
9207 #include <X11/Xlib.h> 9207 #include <X11/Xlib.h>
9208 #if STDC_HEADERS 9208 #if STDC_HEADERS
9209 # include <stdlib.h> 9209 # include <stdlib.h>
9210 # include <stddef.h> 9210 # include <stddef.h>
9211 #endif 9211 #endif
9212 main() 9212 int main()
9213 { 9213 {
9214 if (sizeof(wchar_t) <= 2) 9214 if (sizeof(wchar_t) <= 2)
9215 exit(1); 9215 exit(1);
9216 exit(0); 9216 exit(0);
9217 } 9217 }
10749 #include <ctype.h> 10749 #include <ctype.h>
10750 #if STDC_HEADERS 10750 #if STDC_HEADERS
10751 # include <stdlib.h> 10751 # include <stdlib.h>
10752 # include <stddef.h> 10752 # include <stddef.h>
10753 #endif 10753 #endif
10754 main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); } 10754 int main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
10755 10755
10756 _ACEOF 10756 _ACEOF
10757 if ac_fn_c_try_run "$LINENO"; then : 10757 if ac_fn_c_try_run "$LINENO"; then :
10758 10758
10759 vim_cv_toupper_broken=yes 10759 vim_cv_toupper_broken=yes
11971 #endif 11971 #endif
11972 #if STDC_HEADERS 11972 #if STDC_HEADERS
11973 # include <stdlib.h> 11973 # include <stdlib.h>
11974 # include <stddef.h> 11974 # include <stddef.h>
11975 #endif 11975 #endif
11976 main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); } 11976 int main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
11977 _ACEOF 11977 _ACEOF
11978 if ac_fn_c_try_run "$LINENO"; then : 11978 if ac_fn_c_try_run "$LINENO"; then :
11979 res="OK" 11979 res="OK"
11980 else 11980 else
11981 res="FAIL" 11981 res="FAIL"
12048 #endif 12048 #endif
12049 #if STDC_HEADERS 12049 #if STDC_HEADERS
12050 # include <stdlib.h> 12050 # include <stdlib.h>
12051 # include <stddef.h> 12051 # include <stddef.h>
12052 #endif 12052 #endif
12053 main() 12053 int main()
12054 {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); } 12054 {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
12055 12055
12056 _ACEOF 12056 _ACEOF
12057 if ac_fn_c_try_run "$LINENO"; then : 12057 if ac_fn_c_try_run "$LINENO"; then :
12058 12058
12097 #endif 12097 #endif
12098 #if STDC_HEADERS 12098 #if STDC_HEADERS
12099 # include <stdlib.h> 12099 # include <stdlib.h>
12100 # include <stddef.h> 12100 # include <stddef.h>
12101 #endif 12101 #endif
12102 main() 12102 int main()
12103 {char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); } 12103 {char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
12104 12104
12105 _ACEOF 12105 _ACEOF
12106 if ac_fn_c_try_run "$LINENO"; then : 12106 if ac_fn_c_try_run "$LINENO"; then :
12107 12107
12462 #include "confdefs.h" 12462 #include "confdefs.h"
12463 #ifdef HAVE_UNISTD_H 12463 #ifdef HAVE_UNISTD_H
12464 #include <unistd.h> 12464 #include <unistd.h>
12465 #endif 12465 #endif
12466 char *dagger[] = { "IFS=pwd", 0 }; 12466 char *dagger[] = { "IFS=pwd", 0 };
12467 main() 12467 int main()
12468 { 12468 {
12469 char buffer[500]; 12469 char buffer[500];
12470 extern char **environ; 12470 extern char **environ;
12471 environ = dagger; 12471 environ = dagger;
12472 return getcwd(buffer, 500) ? 0 : 1; 12472 return getcwd(buffer, 500) ? 0 : 1;
13126 # include <stdlib.h> 13126 # include <stdlib.h>
13127 # include <stddef.h> 13127 # include <stddef.h>
13128 #endif 13128 #endif
13129 #include <sys/types.h> 13129 #include <sys/types.h>
13130 #include <sys/stat.h> 13130 #include <sys/stat.h>
13131 main() {struct stat st; exit(stat("configure/", &st) != 0); } 13131 int main() {struct stat st; exit(stat("configure/", &st) != 0); }
13132 13132
13133 _ACEOF 13133 _ACEOF
13134 if ac_fn_c_try_run "$LINENO"; then : 13134 if ac_fn_c_try_run "$LINENO"; then :
13135 13135
13136 vim_cv_stat_ignores_slash=yes 13136 vim_cv_stat_ignores_slash=yes
14280 # include <stdint.h> 14280 # include <stdint.h>
14281 #endif 14281 #endif
14282 #ifdef HAVE_INTTYPES_H 14282 #ifdef HAVE_INTTYPES_H
14283 # include <inttypes.h> 14283 # include <inttypes.h>
14284 #endif 14284 #endif
14285 main() { 14285 int main() {
14286 uint32_t nr1 = (uint32_t)-1; 14286 uint32_t nr1 = (uint32_t)-1;
14287 uint32_t nr2 = (uint32_t)0xffffffffUL; 14287 uint32_t nr2 = (uint32_t)0xffffffffUL;
14288 if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1; 14288 if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1;
14289 return 0; 14289 return 0;
14290 } 14290 }
14308 #endif 14308 #endif
14309 #if STDC_HEADERS 14309 #if STDC_HEADERS
14310 # include <stdlib.h> 14310 # include <stdlib.h>
14311 # include <stddef.h> 14311 # include <stddef.h>
14312 #endif 14312 #endif
14313 main() { 14313 int main() {
14314 char buf[10]; 14314 char buf[10];
14315 strcpy(buf, "abcdefghi"); 14315 strcpy(buf, "abcdefghi");
14316 mch_memmove(buf, buf + 2, 3); 14316 mch_memmove(buf, buf + 2, 3);
14317 if (strncmp(buf, "ababcf", 6)) 14317 if (strncmp(buf, "ababcf", 6))
14318 exit(1); 14318 exit(1);