Commit ae66ca64 authored by Stefan Krah's avatar Stefan Krah

Issue #13057: Include stdio.h when NULL is used in configure.ac.

parent 0ec8f48b
...@@ -5850,6 +5850,7 @@ else ...@@ -5850,6 +5850,7 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <stdio.h>
#include <pthread.h> #include <pthread.h>
void* routine(void* p){return NULL;} void* routine(void* p){return NULL;}
...@@ -5905,6 +5906,7 @@ else ...@@ -5905,6 +5906,7 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <stdio.h>
#include <pthread.h> #include <pthread.h>
void* routine(void* p){return NULL;} void* routine(void* p){return NULL;}
...@@ -5954,6 +5956,7 @@ else ...@@ -5954,6 +5956,7 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <stdio.h>
#include <pthread.h> #include <pthread.h>
void* routine(void* p){return NULL;} void* routine(void* p){return NULL;}
...@@ -6003,6 +6006,7 @@ else ...@@ -6003,6 +6006,7 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <stdio.h>
#include <pthread.h> #include <pthread.h>
void* routine(void* p){return NULL;} void* routine(void* p){return NULL;}
...@@ -8690,6 +8694,8 @@ $as_echo "no" >&6; } ...@@ -8690,6 +8694,8 @@ $as_echo "no" >&6; }
$as_echo_n "checking for pthread_create in -lpthread... " >&6; } $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <stdio.h>
#include <pthread.h> #include <pthread.h>
void * start_routine (void *arg) { exit (0); } void * start_routine (void *arg) { exit (0); }
...@@ -9082,7 +9088,9 @@ else ...@@ -9082,7 +9088,9 @@ else
else else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <pthread.h>
#include <stdio.h>
#include <pthread.h>
void *foo(void *parm) { void *foo(void *parm) {
return NULL; return NULL;
} }
......
...@@ -1233,6 +1233,7 @@ fi ...@@ -1233,6 +1233,7 @@ fi
AC_MSG_CHECKING(whether pthreads are available without options) AC_MSG_CHECKING(whether pthreads are available without options)
AC_CACHE_VAL(ac_cv_pthread_is_default, AC_CACHE_VAL(ac_cv_pthread_is_default,
[AC_RUN_IFELSE([AC_LANG_SOURCE([[ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <pthread.h> #include <pthread.h>
void* routine(void* p){return NULL;} void* routine(void* p){return NULL;}
...@@ -1267,6 +1268,7 @@ AC_CACHE_VAL(ac_cv_kpthread, ...@@ -1267,6 +1268,7 @@ AC_CACHE_VAL(ac_cv_kpthread,
[ac_save_cc="$CC" [ac_save_cc="$CC"
CC="$CC -Kpthread" CC="$CC -Kpthread"
AC_RUN_IFELSE([AC_LANG_SOURCE([[ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <pthread.h> #include <pthread.h>
void* routine(void* p){return NULL;} void* routine(void* p){return NULL;}
...@@ -1295,6 +1297,7 @@ AC_CACHE_VAL(ac_cv_kthread, ...@@ -1295,6 +1297,7 @@ AC_CACHE_VAL(ac_cv_kthread,
[ac_save_cc="$CC" [ac_save_cc="$CC"
CC="$CC -Kthread" CC="$CC -Kthread"
AC_RUN_IFELSE([AC_LANG_SOURCE([[ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <pthread.h> #include <pthread.h>
void* routine(void* p){return NULL;} void* routine(void* p){return NULL;}
...@@ -1323,6 +1326,7 @@ AC_CACHE_VAL(ac_cv_thread, ...@@ -1323,6 +1326,7 @@ AC_CACHE_VAL(ac_cv_thread,
[ac_save_cc="$CC" [ac_save_cc="$CC"
CC="$CC -pthread" CC="$CC -pthread"
AC_RUN_IFELSE([AC_LANG_SOURCE([[ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <pthread.h> #include <pthread.h>
void* routine(void* p){return NULL;} void* routine(void* p){return NULL;}
...@@ -2317,7 +2321,9 @@ yes ...@@ -2317,7 +2321,9 @@ yes
_libs=$LIBS _libs=$LIBS
LIBS="$LIBS -lpthread" LIBS="$LIBS -lpthread"
AC_MSG_CHECKING([for pthread_create in -lpthread]) AC_MSG_CHECKING([for pthread_create in -lpthread])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h> AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <pthread.h>
void * start_routine (void *arg) { exit (0); }]], [[ void * start_routine (void *arg) { exit (0); }]], [[
pthread_create (NULL, NULL, start_routine, NULL)]])],[ pthread_create (NULL, NULL, start_routine, NULL)]])],[
...@@ -2400,7 +2406,9 @@ if test "$posix_threads" = "yes"; then ...@@ -2400,7 +2406,9 @@ if test "$posix_threads" = "yes"; then
AC_MSG_CHECKING(if PTHREAD_SCOPE_SYSTEM is supported) AC_MSG_CHECKING(if PTHREAD_SCOPE_SYSTEM is supported)
AC_CACHE_VAL(ac_cv_pthread_system_supported, AC_CACHE_VAL(ac_cv_pthread_system_supported,
[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <pthread.h> [AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <pthread.h>
void *foo(void *parm) { void *foo(void *parm) {
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment