Merged revisions 241932 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r241932 | seanbright | 2010-01-21 10:25:46 -0500 (Thu, 21 Jan 2010) | 5 lines
  
  Fix configure check for PTHREAD_ONCE_INIT when manually adding -Wall to CFLAGS.
  
  (closes issue #16666)
  Reported by: romain_proformatique
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@241938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Sean Bright
2010-01-21 15:27:42 +00:00
parent 04aa8b1149
commit ce7b0a51f1
2 changed files with 5 additions and 3 deletions

3
configure vendored
View File

@@ -13491,10 +13491,11 @@ CFLAGS="${CFLAGS} -Werror -Wmissing-braces"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <pthread.h> #include <pthread.h>
void empty(){}
int int
main () main ()
{ {
pthread_once_t once = PTHREAD_ONCE_INIT; pthread_once_t once = PTHREAD_ONCE_INIT; pthread_once(&once, empty);
; ;
return 0; return 0;
} }

View File

@@ -533,8 +533,9 @@ saved_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} -Werror -Wmissing-braces" CFLAGS="${CFLAGS} -Werror -Wmissing-braces"
AC_COMPILE_IFELSE( AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM( [AC_LANG_PROGRAM(
[#include <pthread.h>], [#include <pthread.h>
[pthread_once_t once = PTHREAD_ONCE_INIT;]) void empty(){}],
[pthread_once_t once = PTHREAD_ONCE_INIT; pthread_once(&once, empty);])
],[ ],[
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
ac_cv_pthread_once_needsbraces="no" ac_cv_pthread_once_needsbraces="no"