From: Florian Weimer Date: Mon, 21 Nov 2022 13:12:43 +0000 (+0100) Subject: source3/wscript: Remove implicit int and implicit function declarations X-Git-Tag: talloc-2.4.0~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7779050a6765a37cc0c6438309e512782220dcb3;p=thirdparty%2Fsamba.git source3/wscript: Remove implicit int and implicit function declarations This should fix the remaining C89isms in these configure checks. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15281 Signed-off-by: Florian Weimer Reviewed-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Mon Jan 9 11:46:35 UTC 2023 on sn-devel-184 --- diff --git a/source3/wscript b/source3/wscript index ca27deaa543..e77cd127e60 100644 --- a/source3/wscript +++ b/source3/wscript @@ -1314,7 +1314,7 @@ syscall(SYS_initgroups, 16, NULL, NULL, 0); if conf.CHECK_CODE(''' #include -main() { +int main() { struct tm *tm; if (sizeof(time_t) == 8) { time_t max_time = 0x7fffffffffffffffll; @@ -1345,7 +1345,7 @@ main() { #if defined(HAVE_SYS_SYSMACROS_H) #include #endif -main() { dev_t dev = makedev(1,2); return 0; } +int main() { dev_t dev = makedev(1,2); return 0; } ''', 'HAVE_MAKEDEV', addmain=False, @@ -1355,12 +1355,13 @@ main() { dev_t dev = makedev(1,2); return 0; } #include #include #include +#include void exit_on_core(int ignored) { exit(1); } -main() { +int main() { char *newpath; signal(SIGSEGV, exit_on_core); newpath = realpath("/tmp", NULL); @@ -1517,9 +1518,9 @@ main() { # Check for getcwd allowing a NULL arg. conf.CHECK_CODE(''' #include -main() { +int main() { char *s = getcwd(NULL,0); - exit(s != NULL ? 0 : 1); + return s != NULL ? 0 : 1; }''', 'GETCWD_TAKES_NULL', addmain=False, execute=True, msg="getcwd takes a NULL argument")