comparison src/configure.ac @ 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
1693 * RTLD_GLOBAL will be used and then it is not possible to 1693 * RTLD_GLOBAL will be used and then it is not possible to
1694 * have both python versions enabled in the same vim instance. 1694 * have both python versions enabled in the same vim instance.
1695 * Only the first python version used will be switched on. 1695 * Only the first python version used will be switched on.
1696 */ 1696 */
1697 1697
1698 int no_rtl_global_needed_for(char *python_instsoname, char *prefix) 1698 static int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
1699 { 1699 {
1700 int needed = 0; 1700 int needed = 0;
1701 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL); 1701 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
1702 if (pylib != 0) 1702 if (pylib != 0)
1703 { 1703 {
1712 dlclose(pylib); 1712 dlclose(pylib);
1713 } 1713 }
1714 return !needed; 1714 return !needed;
1715 } 1715 }
1716 1716
1717 int main(int argc, char** argv) 1717 int main()
1718 { 1718 {
1719 int not_needed = 0; 1719 int not_needed = 0;
1720 if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}")) 1720 if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
1721 not_needed = 1; 1721 not_needed = 1;
1722 return !not_needed; 1722 return !not_needed;
1739 * RTLD_GLOBAL will be used and then it is not possible to 1739 * RTLD_GLOBAL will be used and then it is not possible to
1740 * have both python versions enabled in the same vim instance. 1740 * have both python versions enabled in the same vim instance.
1741 * Only the first python version used will be switched on. 1741 * Only the first python version used will be switched on.
1742 */ 1742 */
1743 1743
1744 int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix) 1744 static int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
1745 { 1745 {
1746 int needed = 0; 1746 int needed = 0;
1747 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL); 1747 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
1748 if (pylib != 0) 1748 if (pylib != 0)
1749 { 1749 {
1758 dlclose(pylib); 1758 dlclose(pylib);
1759 } 1759 }
1760 return !needed; 1760 return !needed;
1761 } 1761 }
1762 1762
1763 int main(int argc, char** argv) 1763 int main()
1764 { 1764 {
1765 int not_needed = 0; 1765 int not_needed = 0;
1766 if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}")) 1766 if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
1767 not_needed = 1; 1767 not_needed = 1;
1768 return !not_needed; 1768 return !not_needed;
2418 #include <X11/Xlib.h> 2418 #include <X11/Xlib.h>
2419 #if STDC_HEADERS 2419 #if STDC_HEADERS
2420 # include <stdlib.h> 2420 # include <stdlib.h>
2421 # include <stddef.h> 2421 # include <stddef.h>
2422 #endif 2422 #endif
2423 main() 2423 int main()
2424 { 2424 {
2425 if (sizeof(wchar_t) <= 2) 2425 if (sizeof(wchar_t) <= 2)
2426 exit(1); 2426 exit(1);
2427 exit(0); 2427 exit(0);
2428 }])], 2428 }])],
3216 #include <ctype.h> 3216 #include <ctype.h>
3217 #if STDC_HEADERS 3217 #if STDC_HEADERS
3218 # include <stdlib.h> 3218 # include <stdlib.h>
3219 # include <stddef.h> 3219 # include <stddef.h>
3220 #endif 3220 #endif
3221 main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); } 3221 int main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
3222 ]])],[ 3222 ]])],[
3223 vim_cv_toupper_broken=yes 3223 vim_cv_toupper_broken=yes
3224 ],[ 3224 ],[
3225 vim_cv_toupper_broken=no 3225 vim_cv_toupper_broken=no
3226 ],[ 3226 ],[
3440 #endif 3440 #endif
3441 #if STDC_HEADERS 3441 #if STDC_HEADERS
3442 # include <stdlib.h> 3442 # include <stdlib.h>
3443 # include <stddef.h> 3443 # include <stddef.h>
3444 #endif 3444 #endif
3445 main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }])], 3445 int main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }])],
3446 res="OK", res="FAIL", res="FAIL") 3446 res="OK", res="FAIL", res="FAIL")
3447 if test "$res" = "OK"; then 3447 if test "$res" = "OK"; then
3448 break 3448 break
3449 fi 3449 fi
3450 AC_MSG_RESULT($libname library is not usable) 3450 AC_MSG_RESULT($libname library is not usable)
3479 #endif 3479 #endif
3480 #if STDC_HEADERS 3480 #if STDC_HEADERS
3481 # include <stdlib.h> 3481 # include <stdlib.h>
3482 # include <stddef.h> 3482 # include <stddef.h>
3483 #endif 3483 #endif
3484 main() 3484 int main()
3485 {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); } 3485 {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
3486 ]])],[ 3486 ]])],[
3487 vim_cv_terminfo=no 3487 vim_cv_terminfo=no
3488 ],[ 3488 ],[
3489 vim_cv_terminfo=yes 3489 vim_cv_terminfo=yes
3505 #endif 3505 #endif
3506 #if STDC_HEADERS 3506 #if STDC_HEADERS
3507 # include <stdlib.h> 3507 # include <stdlib.h>
3508 # include <stddef.h> 3508 # include <stddef.h>
3509 #endif 3509 #endif
3510 main() 3510 int main()
3511 {char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); } 3511 {char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
3512 ]])],[ 3512 ]])],[
3513 vim_cv_tgetent=zero 3513 vim_cv_tgetent=zero
3514 ],[ 3514 ],[
3515 vim_cv_tgetent=non-zero 3515 vim_cv_tgetent=non-zero
3668 #include "confdefs.h" 3668 #include "confdefs.h"
3669 #ifdef HAVE_UNISTD_H 3669 #ifdef HAVE_UNISTD_H
3670 #include <unistd.h> 3670 #include <unistd.h>
3671 #endif 3671 #endif
3672 char *dagger[] = { "IFS=pwd", 0 }; 3672 char *dagger[] = { "IFS=pwd", 0 };
3673 main() 3673 int main()
3674 { 3674 {
3675 char buffer[500]; 3675 char buffer[500];
3676 extern char **environ; 3676 extern char **environ;
3677 environ = dagger; 3677 environ = dagger;
3678 return getcwd(buffer, 500) ? 0 : 1; 3678 return getcwd(buffer, 500) ? 0 : 1;
3847 # include <stdlib.h> 3847 # include <stdlib.h>
3848 # include <stddef.h> 3848 # include <stddef.h>
3849 #endif 3849 #endif
3850 #include <sys/types.h> 3850 #include <sys/types.h>
3851 #include <sys/stat.h> 3851 #include <sys/stat.h>
3852 main() {struct stat st; exit(stat("configure/", &st) != 0); } 3852 int main() {struct stat st; exit(stat("configure/", &st) != 0); }
3853 ]])],[ 3853 ]])],[
3854 vim_cv_stat_ignores_slash=yes 3854 vim_cv_stat_ignores_slash=yes
3855 ],[ 3855 ],[
3856 vim_cv_stat_ignores_slash=no 3856 vim_cv_stat_ignores_slash=no
3857 ],[ 3857 ],[
4236 # include <stdint.h> 4236 # include <stdint.h>
4237 #endif 4237 #endif
4238 #ifdef HAVE_INTTYPES_H 4238 #ifdef HAVE_INTTYPES_H
4239 # include <inttypes.h> 4239 # include <inttypes.h>
4240 #endif 4240 #endif
4241 main() { 4241 int main() {
4242 uint32_t nr1 = (uint32_t)-1; 4242 uint32_t nr1 = (uint32_t)-1;
4243 uint32_t nr2 = (uint32_t)0xffffffffUL; 4243 uint32_t nr2 = (uint32_t)0xffffffffUL;
4244 if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1; 4244 if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1;
4245 return 0; 4245 return 0;
4246 }])], 4246 }])],
4258 #endif 4258 #endif
4259 #if STDC_HEADERS 4259 #if STDC_HEADERS
4260 # include <stdlib.h> 4260 # include <stdlib.h>
4261 # include <stddef.h> 4261 # include <stddef.h>
4262 #endif 4262 #endif
4263 main() { 4263 int main() {
4264 char buf[10]; 4264 char buf[10];
4265 strcpy(buf, "abcdefghi"); 4265 strcpy(buf, "abcdefghi");
4266 mch_memmove(buf, buf + 2, 3); 4266 mch_memmove(buf, buf + 2, 3);
4267 if (strncmp(buf, "ababcf", 6)) 4267 if (strncmp(buf, "ababcf", 6))
4268 exit(1); 4268 exit(1);