fix up Curl not finding sig_atomic

This commit is contained in:
Fish 2008-03-06 11:11:15 +00:00
parent 1493b68802
commit 1aa38c6353
6 changed files with 409 additions and 32 deletions

View file

@ -284,3 +284,4 @@ script])
fi
])]
)

View file

@ -2019,6 +2019,7 @@ AC_SYS_LARGEFILE
CURL_CHECK_FUNC_RECV
CURL_CHECK_FUNC_SEND
CURL_CHECK_MSG_NOSIGNAL
TYPE_SIG_ATOMIC_T
CURL_CHECK_HEADER_MALLOC
CURL_CHECK_TYPE_SOCKLEN_T
CURL_CHECK_FUNC_GETNAMEINFO
@ -2143,3 +2144,43 @@ AC_SUBST([CURL_LIBS])
AC_SUBST([CURL_CFLAGS])
AM_CONDITIONAL(BUILD_CURL, true)
])
dnl TYPE_SIG_ATOMIC_T
dnl -------------------------------------------------
dnl Check if the sig_atomic_t type is available, and
dnl verify if it is already defined as volatile.
AC_DEFUN([TYPE_SIG_ATOMIC_T], [
AC_CHECK_HEADERS(signal.h)
AC_CHECK_TYPE([sig_atomic_t],[
AC_DEFINE(HAVE_SIG_ATOMIC_T, 1,
[Define to 1 if sig_atomic_t is an available typedef.])
], ,[
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
])
case "$ac_cv_type_sig_atomic_t" in
yes)
#
AC_MSG_CHECKING([if sig_atomic_t is already defined as volatile])
AC_TRY_LINK([
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
],[
static volatile sig_atomic_t dummy = 0;
],[
AC_MSG_RESULT([no])
ac_cv_sig_atomic_t_volatile="no"
],[
AC_MSG_RESULT([yes])
ac_cv_sig_atomic_t_volatile="yes"
])
#
if test "$ac_cv_sig_atomic_t_volatile" = "yes"; then
AC_DEFINE(HAVE_SIG_ATOMIC_T_VOLATILE, 1,
[Define to 1 if sig_atomic_t is already defined as volatile.])
fi
;;
esac
]) # AC_DEFUN

View file

@ -129,7 +129,7 @@ AC_DEFUN([AX_BERKELEY_DB],
AC_MSG_RESULT([not found])
ifelse([$3], , :, [$3])
else
AC_DEFINE_UNQUOTED(DB_HEADER, ["$DB_HEADER"])
AC_DEFINE_UNQUOTED(DB_HEADER, ["$DB_HEADER"], [Berkeley DB Header])
AC_SUBST(DB_LIBS)
AC_SUBST(DB_CPPFLAGS)
AC_SUBST(DB_LDFLAGS)

342
configure vendored
View file

@ -17117,6 +17117,345 @@ _ACEOF
esac
for ac_header in signal.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
# Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }
# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
{ echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6; }
if test "${ac_cv_type_sig_atomic_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
typedef sig_atomic_t ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
return 0;
if (sizeof (ac__type_new_))
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_sig_atomic_t=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_type_sig_atomic_t=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6; }
if test $ac_cv_type_sig_atomic_t = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_SIG_ATOMIC_T 1
_ACEOF
fi
case "$ac_cv_type_sig_atomic_t" in
yes)
#
{ echo "$as_me:$LINENO: checking if sig_atomic_t is already defined as volatile" >&5
echo $ECHO_N "checking if sig_atomic_t is already defined as volatile... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
int
main ()
{
static volatile sig_atomic_t dummy = 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
ac_cv_sig_atomic_t_volatile="no"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
ac_cv_sig_atomic_t_volatile="yes"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
#
if test "$ac_cv_sig_atomic_t_volatile" = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_SIG_ATOMIC_T_VOLATILE 1
_ACEOF
fi
;;
esac
{ echo "$as_me:$LINENO: checking for malloc.h" >&5
echo $ECHO_N "checking for malloc.h... $ECHO_C" >&6; }
if test "${ac_cv_header_malloc_h+set}" = set; then
@ -26606,7 +26945,8 @@ rm -f core conftest.err conftest.$ac_objext \
echo "${ECHO_T}not found" >&6; }
:
else
cat >>confdefs.h <<_ACEOF
cat >>confdefs.h <<_ACEOF
#define DB_HEADER "$DB_HEADER"
_ACEOF

View file

@ -3,6 +3,9 @@
/* to disable LDAP */
#undef CURL_DISABLE_LDAP
/* Berkeley DB Header */
#undef DB_HEADER
/* 'Enable Debugging' */
#undef DEBUG
@ -61,9 +64,6 @@
/* Define to 1 if you have the <ctype.h> header file. */
#undef HAVE_CTYPE_H
/* Define to 1 if you have the <db.h> header file. */
#undef HAVE_DB_H
/* Define if /dev/poll is available */
#undef HAVE_DEVPOLL
@ -97,6 +97,9 @@
/* Define to 1 if you have the <err.h> header file. */
#undef HAVE_ERR_H
/* Define to 1 if you have the <EXTERN.h> header file. */
#undef HAVE_EXTERN_H
/* Define to 1 if you have the `fcntl' function. */
#undef HAVE_FCNTL
@ -157,9 +160,6 @@
/* Define to 1 if you have the `getopt' function. */
#undef HAVE_GETOPT
/* Define to 1 if you have the `getpass_r' function. */
#undef HAVE_GETPASS_R
/* Define to 1 if you have the `getpwuid' function. */
#undef HAVE_GETPWUID
@ -220,6 +220,9 @@
/* Define to 1 if you have the `dl' library (-ldl). */
#undef HAVE_LIBDL
/* Define to 1 if you have the `m' library (-lm). */
#undef HAVE_LIBM
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
@ -253,9 +256,6 @@
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <memory.y> header file. */
#undef HAVE_MEMORY_Y
/* Define to 1 if you have the MSG_NOSIGNAL flag. */
#undef HAVE_MSG_NOSIGNAL
@ -304,6 +304,9 @@
/* Define to 1 if you have the <pem.h> header file. */
#undef HAVE_PEM_H
/* Define to 1 if you have the <perl.h> header file. */
#undef HAVE_PERL_H
/* Define to 1 if you have the `perror' function. */
#undef HAVE_PERROR
@ -373,6 +376,12 @@
/* Define to 1 if you have the `sigtimedwait' function. */
#undef HAVE_SIGTIMEDWAIT
/* Define to 1 if sig_atomic_t is an available typedef. */
#undef HAVE_SIG_ATOMIC_T
/* Define to 1 if sig_atomic_t is already defined as volatile. */
#undef HAVE_SIG_ATOMIC_T_VOLATILE
/* Define to 1 if you have the `socket' function. */
#undef HAVE_SOCKET
@ -419,9 +428,6 @@
/* Define to 1 if you have the `strerror_r' function. */
#undef HAVE_STRERROR_R
/* Define to 1 if you have the `strftime' function. */
#undef HAVE_STRFTIME
/* Define to 1 if you have the `stricmp' function. */
#undef HAVE_STRICMP
@ -443,15 +449,15 @@
/* Define to 1 if you have the `strnlen' function. */
#undef HAVE_STRNLEN
/* Define to 1 if you have the `strsep' function. */
#undef HAVE_STRSEP
/* Define to 1 if you have the `strspn' function. */
#undef HAVE_STRSPN
/* Define to 1 if you have the `strstr' function. */
#undef HAVE_STRSTR
/* Define to 1 if you have the `strsep' function. */
#undef HAVE_STRSEP
/* Define to 1 if you have the `strtok_r' function. */
#undef HAVE_STRTOK_R
@ -518,12 +524,6 @@
/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
#undef HAVE_TAILQFOREACH
/* Define to 1 if you have the `tcgetattr' function. */
#undef HAVE_TCGETATTR
/* Define to 1 if you have the `tcsetattr' function. */
#undef HAVE_TCSETATTR
/* Define to 1 if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
@ -584,12 +584,12 @@
/* Define to 1 if you have the <x509.h> header file. */
#undef HAVE_X509_H
/* Define to 1 if you have the <XSUB.h> header file. */
#undef HAVE_XSUB_H
/* if you have the zlib.h header file */
#undef HAVE_ZLIB_H
/* Define to 1 if you have the <\> header file. */
#undef HAVE__
/* Define if we have __va_copy */
#undef HAVE___VA_COPY
@ -766,9 +766,6 @@
#undef inline
#endif
/* Define to `long int' if <sys/types.h> does not define. */
#undef off_t
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
@ -799,5 +796,3 @@
/* Define to empty if the keyword `volatile' does not work. Warning: valid
code using `volatile' can become incorrect without. Disable with care. */
#undef volatile
#undef DB_HEADER

View file

@ -150,8 +150,8 @@ static int qs_read_database( database *db )
/* comment char */
if( buf[0] == '#' )
continue;
dlog( DEBUG1, "read %s", buf );
strip(buf);
dlog( DEBUG1, "read %s", buf );
len = strlen( buf );
if( len == 0 )
continue;