C99 no longer has implicit function declarations and implicit ints.
Current GCC versions enable them as an extension, but this will
change in a future GCC version.
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <limits.h>
+#include <stdlib.h>
int main()
{
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
+#include <stdlib.h>
typedef union _mm_align_test {
void *ptr;
#endif
#include <stdio.h>
+#include <stdlib.h>
#ifdef RTLD_GLOBAL
# define LT_DLGLOBAL RTLD_GLOBAL
# endif
#endif
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
void fnord() { int i=42;}
int main ()
{
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <time.h>
-main() {
+int main() {
char buf[27];
struct tm t;
time_t old = 0;
],[
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <time.h>
-main() {
+int main() {
struct tm t, *s;
time_t old = 0;
char buf[27], *p;
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
+#include <stdlib.h>
$1
- main() {
+ int main() {
int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600);
if (fd < 0) exit(1);
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
+#include <stdlib.h>
$1
- main() {
+ int main() {
char buf[3];
int fd = open("conftest_in", O_RDONLY);
if (fd < 0) exit(1);
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#define _GNU_SOURCE
#include <stdio.h>
+#include <stdlib.h>
struct cookiedata {
__off64_t pos;
cookie_io_functions_t funcs = {reader, writer, seeker, closer};
-main() {
+int main() {
struct cookiedata g = { 0 };
FILE *fp = fopencookie(&g, "r", funcs);
if test "$found" = "yes"; then
ac_libs=$LIBS
LIBS="$LIBS -l$2"
- AC_RUN_IFELSE([AC_LANG_SOURCE([[main() { return (0); }]])],[found=yes],[found=no],[found=no])
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() { return (0); }]])],[found=yes],[found=no],[found=no])
LIBS=$ac_libs
fi
#define TEXT "This is the test message -- "
-main()
+int main()
{
int n;
[[struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g);]])],[AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <netdb.h>
#include <sys/types.h>
+#include <string.h>
+#include <stdlib.h>
#ifndef AF_INET
# include <sys/socket.h>
#endif
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <string.h>
int main(int argc, char **argv)
{
#include <crypt.h>
#endif
+#include <stdlib.h>
+#include <string.h>
+
int main() {
#if HAVE_CRYPT
char *encrypted = crypt("rasmuslerdorf","rl");
#include <crypt.h>
#endif
+#include <stdlib.h>
+#include <string.h>
+
int main() {
#if HAVE_CRYPT
char *encrypted = crypt("rasmuslerdorf","_J9..rasm");
#include <crypt.h>
#endif
+#include <stdlib.h>
+#include <string.h>
+
int main() {
#if HAVE_CRYPT
char salt[15], answer[40];
#include <crypt.h>
#endif
+#include <stdlib.h>
+#include <string.h>
+
int main() {
#if HAVE_CRYPT
char salt[30], answer[70];
#include <crypt.h>
#endif
+#include <stdlib.h>
+#include <string.h>
+
int main() {
#if HAVE_CRYPT
char salt[21], answer[21+86];
#include <crypt.h>
#endif
+#include <stdlib.h>
+#include <string.h>
+
int main() {
#if HAVE_CRYPT
char salt[21], answer[21+43];